增加电子城对接
parent
23730d2a4c
commit
76225d3560
|
@ -291,6 +291,13 @@ public class ApiController {
|
|||
return mdGoodsController.xiadan(mdGoodsstr, uriBuilder);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/weightsave/{username}", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public ResponseMessage<?> list10(@PathVariable("username") String username,
|
||||
@RequestParam(value = "searchstr", required = false) String searchstr ) {
|
||||
return wmomController.weight_save(username, searchstr);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/rfidsave/{username}", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "RFID保存", produces = "application/json", httpMethod = "POST")
|
||||
|
|
|
@ -639,6 +639,7 @@ wmomController {
|
|||
for(wmi1entity t: wmi1entityList){
|
||||
RfidBuseEntity rf = new RfidBuseEntity();
|
||||
rf.setCreateBy(username);
|
||||
rf.setCreateDate(now());
|
||||
rf.setRfidType(rfidType);
|
||||
rf.setRfidBuseno(rfidbuseno);
|
||||
rf.setRfidBusecont(rfidbusecon);
|
||||
|
@ -655,4 +656,29 @@ wmomController {
|
|||
}
|
||||
return Result.success("RFID保存成功");
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/weightsave/{username}", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "weight保存", produces = "application/json", httpMethod = "POST")
|
||||
public synchronized ResponseMessage<?> weight_save(@PathVariable("username") String username,
|
||||
@RequestParam(value="searchstr", required=false)String searchstr ) {
|
||||
|
||||
|
||||
RfidBuseEntity rf = new RfidBuseEntity();
|
||||
rf.setCreateBy(username);
|
||||
rf.setCreateDate(now());
|
||||
rf.setRfidType("weight");
|
||||
rf.setRfidBuseno("1");
|
||||
Double d = Double.parseDouble(searchstr)/100;
|
||||
rf.setRfidBusecont(d.toString());
|
||||
|
||||
|
||||
try{
|
||||
systemService.save(rf);
|
||||
}catch (Exception e){
|
||||
Result.error("保存失败");
|
||||
}
|
||||
return Result.success("保存成功");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.zzjee.wm.controller;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
@ -12,6 +13,8 @@ import javax.servlet.http.HttpServletResponse;
|
|||
import javax.validation.ConstraintViolation;
|
||||
import javax.validation.Validator;
|
||||
|
||||
import com.zzjee.rfid.entity.RfidBuseEntity;
|
||||
import com.zzjee.rfid.service.RfidBuseServiceI;
|
||||
import com.zzjee.wm.entity.*;
|
||||
import com.zzjee.wm.page.confrowpage;
|
||||
import com.zzjee.wm.page.wminqmpage;
|
||||
|
@ -24,6 +27,7 @@ import org.jeecgframework.core.common.exception.BusinessException;
|
|||
import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery;
|
||||
import org.jeecgframework.core.common.model.json.AjaxJson;
|
||||
import org.jeecgframework.core.common.model.json.DataGrid;
|
||||
import org.jeecgframework.core.common.model.json.TreeGrid;
|
||||
import org.jeecgframework.core.constant.Globals;
|
||||
import org.jeecgframework.core.util.DateUtils;
|
||||
import org.jeecgframework.core.util.ExceptionUtil;
|
||||
|
@ -38,6 +42,7 @@ import org.jeecgframework.poi.excel.entity.ImportParams;
|
|||
import org.jeecgframework.poi.excel.entity.vo.NormalExcelConstants;
|
||||
import org.jeecgframework.tag.core.easyui.TagUtil;
|
||||
import org.jeecgframework.web.system.pojo.base.TSBaseUser;
|
||||
import org.jeecgframework.web.system.pojo.base.TSType;
|
||||
import org.jeecgframework.web.system.pojo.base.TSUser;
|
||||
import org.jeecgframework.web.system.service.SystemService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -89,7 +94,8 @@ public class WmInQmIController extends BaseController {
|
|||
private SystemService systemService;
|
||||
@Autowired
|
||||
private Validator validator;
|
||||
|
||||
@Autowired
|
||||
private RfidBuseServiceI rfidBuseService;
|
||||
|
||||
/**
|
||||
* 批量收货列表 页面跳转
|
||||
|
@ -818,6 +824,28 @@ public class WmInQmIController extends BaseController {
|
|||
wmInQmI.setQmOkQuat(Long.toString(quat));
|
||||
wmInQmI.setTinId(wmUtil.gettuopanma());
|
||||
|
||||
if (ResourceUtil.getConfigByName("sys.weight").equals("on")) {
|
||||
String rfidcontent = "";
|
||||
try{
|
||||
CriteriaQuery cq;
|
||||
cq = new CriteriaQuery(RfidBuseEntity.class);
|
||||
cq.eq("rfidType", "weight");
|
||||
cq.ge("createDate", new SimpleDateFormat("yyyy-MM-dd").parse(DateUtils.getDate("yyyy-MM-dd")));
|
||||
cq.add();
|
||||
|
||||
List<RfidBuseEntity> listByCriteriaQuery = rfidBuseService.getListByCriteriaQuery(cq, false);
|
||||
RfidBuseEntity rfidBuseEntity = listByCriteriaQuery.get(listByCriteriaQuery.size()-1);
|
||||
rfidcontent = rfidBuseEntity.getRfidBusecont();
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
wmInQmI.setBaseInGoodscount(rfidcontent);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
req.setAttribute("wmInQmIPage", wmInQmI);
|
||||
|
||||
return new ModelAndView("com/zzjee/wm/wmInQmI-add");
|
||||
|
@ -833,6 +861,32 @@ public class WmInQmIController extends BaseController {
|
|||
if (StringUtil.isNotEmpty(wmInQmI.getId())) {
|
||||
wmInQmI = wmInQmIService.getEntity(WmInQmIEntity.class,
|
||||
wmInQmI.getId());
|
||||
|
||||
if (ResourceUtil.getConfigByName("sys.weight").equals("on")&&StringUtil.isEmpty(wmInQmI.getBaseOutGoodscount())) {
|
||||
String rfidcontent = "";
|
||||
try{
|
||||
CriteriaQuery cq;
|
||||
cq = new CriteriaQuery(RfidBuseEntity.class);
|
||||
cq.eq("rfidType", "weight");
|
||||
cq.ge("createDate", new SimpleDateFormat("yyyy-MM-dd").parse(DateUtils.getDate("yyyy-MM-dd")));
|
||||
cq.add();
|
||||
|
||||
List<RfidBuseEntity> listByCriteriaQuery = rfidBuseService.getListByCriteriaQuery(cq, false);
|
||||
RfidBuseEntity rfidBuseEntity = listByCriteriaQuery.get(listByCriteriaQuery.size()-1);
|
||||
rfidcontent = rfidBuseEntity.getRfidBusecont();
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
wmInQmI.setBaseOutGoodscount(rfidcontent);
|
||||
if(StringUtil.isNotEmpty(wmInQmI.getBaseInGoodscount())&&StringUtil.isNotEmpty(wmInQmI.getBaseOutGoodscount())){
|
||||
Double basecount = Double.parseDouble(wmInQmI.getBaseOutGoodscount()) - Double.parseDouble(wmInQmI.getBaseInGoodscount());
|
||||
String basecountStr = String.format("%.2f", basecount);
|
||||
// wmInQmI.setImQuat(basecountStr);
|
||||
wmInQmI.setQmOkQuat(basecountStr);
|
||||
wmInQmI.setBaseGoodscount(basecountStr);
|
||||
wmInQmI.setTinZhl(basecountStr);
|
||||
}
|
||||
}
|
||||
req.setAttribute("wmInQmIPage", wmInQmI);
|
||||
}
|
||||
return new ModelAndView("com/zzjee/wm/wmInQmI-update");
|
||||
|
|
|
@ -225,6 +225,7 @@ sys.del=database
|
|||
wm.alldown=yes
|
||||
wm.movesta=\u5DF2\u786E\u8BA4
|
||||
cus.role=CUS
|
||||
sys.weight=on
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
|
||||
<div class="easyui-layout" fit="true">
|
||||
<div region="center" style="padding:0px;border:0px">
|
||||
<t:datagrid name="rfidBuseList" checkbox="false" pagination="true" fitColumns="false" title="RFID表" actionUrl="rfidBuseController.do?datagrid" idField="id" fit="true" queryMode="group">
|
||||
<t:datagrid name="rfidBuseList" sortName="createDate" sortOrder="desc" checkbox="false" pagination="true" fitColumns="false" title="RFID表" actionUrl="rfidBuseController.do?datagrid" idField="id" fit="true" queryMode="group">
|
||||
<t:dgCol title="主键" field="id" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="创建人名称" field="createName" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="创建人登录名称" field="createBy" query="true" queryMode="single" width="120"></t:dgCol>
|
||||
|
|
|
@ -210,8 +210,18 @@ window.onload = function() {
|
|||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">托盘</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>入重量:</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="baseInGoodscount" name="baseInGoodscount" type="text" class="form-control"
|
||||
value='${wmInQmIPage.baseInGoodscount}'
|
||||
/>
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">入重量</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id = "sub_tr" style="display: none;">
|
||||
<div class="col-xs-12 layout-header">
|
||||
<div class="col-xs-6"></div>
|
||||
|
|
|
@ -224,6 +224,30 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>入重量:</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="baseInGoodscount" name="baseInGoodscount" type="text" class="form-control"
|
||||
ignore="ignore"
|
||||
value='${wmInQmIPage.baseInGoodscount}' />
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">入重量</label>
|
||||
</div>
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>出重量:</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="baseOutGoodscount" name="baseOutGoodscount" type="text" class="form-control"
|
||||
ignore="ignore"
|
||||
value='${wmInQmIPage.baseOutGoodscount}' />
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">出重量</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id = "sub_tr" style="display: none;">
|
||||
<div class="col-xs-12 layout-header">
|
||||
<div class="col-xs-6"></div>
|
||||
|
|
Loading…
Reference in New Issue