| | |
| | | param.setLocationCode(bomInfo.getLocationCode()); |
| | | param.setLoadingCode(bomInfo.getLoadingCode()); |
| | | param.setMaterialCode(bomInfo.getMaterialCode()); |
| | | param.setState("否"); |
| | | param.setSpareField1("0"); |
| | | param.setSpareField2(bomInfo.getLineCode()); |
| | | param.setStatus("否"); |
| | | param.setQuantity(0); |
| | | param.setResidueQuantity(0); |
| | | param.setUnit(bomInfo.getLineCode()); |
| | | param.setCreateTime(new Date()); |
| | | orderBatchInfoService.save(param); |
| | | } |
| | |
| | | List<ProductionOrderBatchInfo> checkLocationCodeList = getCheckLocationCodeList(productionOrderBatchInfoParam); |
| | | ProductionOrderBatchInfo batchInfo = checkLocationCodeList.get(0); |
| | | ProductionOrderBatchInfo byId = productionOrderBatchInfoService.getById(batchInfo.getId()); |
| | | byId.setSpareField1(productionOrderBatchInfoParam.getSpareField1()); |
| | | if(batchInfo.getState().equals("是")){ |
| | | if(!productionOrderBatchInfoParam.getLoadingCode().equals(batchInfo.getLoadingCode())){ |
| | | byId.setQuantity(productionOrderBatchInfoParam.getQuantity()); |
| | | byId.setResidueQuantity(productionOrderBatchInfoParam.getResidueQuantity()); |
| | | if(batchInfo.getStatus().equals("是")){ |
| | | if(!productionOrderBatchInfoParam.getBatch().equals(batchInfo.getBatch())){ |
| | | return ResponseData.success("0"); |
| | | }else { |
| | | Integer count1 = Integer.parseInt(productionOrderBatchInfoParam.getSpareField1())+Integer.parseInt(batchInfo.getSpareField1()); |
| | | byId.setSpareField1(count1.toString()); |
| | | Integer count1 = productionOrderBatchInfoParam.getQuantity()+batchInfo.getQuantity(); |
| | | Integer count2 = batchInfo.getResidueQuantity()+productionOrderBatchInfoParam.getResidueQuantity(); |
| | | byId.setQuantity(count1); |
| | | byId.setResidueQuantity(count2); |
| | | } |
| | | } |
| | | byId.setState("是"); |
| | | byId.setLoadingCode(productionOrderBatchInfoParam.getLoadingCode()); |
| | | byId.setStatus("是"); |
| | | byId.setBatch(productionOrderBatchInfoParam.getBatch()); |
| | | productionOrderBatchInfoService.saveOrUpdate(byId); |
| | | return ResponseData.success("1"); |
| | | } |
| | |
| | | @RequestMapping("/resetting") |
| | | public ResponseData resetting(ProductionOrderBatchInfoParam productionOrderBatchInfoParam) { |
| | | ProductionOrderBatchInfo byId = productionOrderBatchInfoService.getById(productionOrderBatchInfoParam.getId()); |
| | | byId.setState("否"); |
| | | byId.setSpareField1("0"); |
| | | byId.setLoadingCode(""); |
| | | byId.setStatus("否"); |
| | | byId.setQuantity(0); |
| | | byId.setResidueQuantity(0); |
| | | byId.setBatch(""); |
| | | productionOrderBatchInfoService.saveOrUpdate(byId); |
| | | return ResponseData.success(); |
| | | } |
| | |
| | | /** |
| | | * 是否上料(是、否) |
| | | */ |
| | | @TableField("state") |
| | | private String state; |
| | | @TableField("status") |
| | | private String status; |
| | | |
| | | @TableField("bar_code") |
| | | private String barCode; |
| | | |
| | | @TableField("quantity") |
| | | private Integer quantity; |
| | | |
| | | @TableField("residue_quantity") |
| | | private Integer residueQuantity; |
| | | |
| | | @TableField("unit") |
| | | private String unit; |
| | | |
| | | @TableField("batch") |
| | | private String batch; |
| | | |
| | | /** |
| | | * 预留字段1 |
| | |
| | | @TableField(value = "update_time", fill = FieldFill.UPDATE) |
| | | private Date updateTime; |
| | | |
| | | |
| | | public Integer getResidueQuantity() { |
| | | return residueQuantity; |
| | | } |
| | | |
| | | public void setResidueQuantity(Integer residueQuantity) { |
| | | this.residueQuantity = residueQuantity; |
| | | } |
| | | |
| | | public Integer getQuantity() { |
| | | return quantity; |
| | | } |
| | | |
| | | public void setQuantity(Integer quantity) { |
| | | this.quantity = quantity; |
| | | } |
| | | |
| | | public String getUnit() { |
| | | return unit; |
| | | } |
| | | |
| | | public void setUnit(String unit) { |
| | | this.unit = unit; |
| | | } |
| | | |
| | | public String getBatch() { |
| | | return batch; |
| | | } |
| | | |
| | | public void setBatch(String batch) { |
| | | this.batch = batch; |
| | | } |
| | | |
| | | public String getLoadingCode() { |
| | | return loadingCode; |
| | |
| | | this.locationCode = locationCode; |
| | | } |
| | | |
| | | public String getState() { |
| | | return state; |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setState(String state) { |
| | | this.state = state; |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getSpareField1() { |
| | |
| | | ", workOrderNo=" + workOrderNo + |
| | | ", productionLine=" + productionLine + |
| | | ", locationCode=" + locationCode + |
| | | ", state=" + state + |
| | | ", status=" + status + |
| | | ", spareField1=" + spareField1 + |
| | | ", spareField2=" + spareField2 + |
| | | ", createUser=" + createUser + |
| | |
| | | <result column="work_order_no" property="workOrderNo" /> |
| | | <result column="production_line" property="productionLine" /> |
| | | <result column="location_code" property="locationCode" /> |
| | | <result column="state" property="state" /> |
| | | <result column="status" property="status" /> |
| | | <result column="spare_field_1" property="spareField1" /> |
| | | <result column="spare_field_2" property="spareField2" /> |
| | | <result column="material_code" property="materialCode" /> |
| | |
| | | <result column="update_time" property="updateTime" /> |
| | | |
| | | <result column="loading_code" property="loadingCode" /> |
| | | <result column="quantity" property="quantity" /> |
| | | <result column="unit" property="unit" /> |
| | | <result column="batch" property="batch" /> |
| | | <result column="residue_quantity" property="residueQuantity" /> |
| | | |
| | | |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | loading_code AS "loadingCode", bar_code AS "barCode", material_code AS "materialCode", id AS "id", work_order_no AS "workOrderNo", production_line AS "productionLine", location_code AS "locationCode", state AS "state", spare_field_1 AS "spareField1", spare_field_2 AS "spareField2", create_user AS "createUser", update_user AS "updateUser", create_time AS "createTime", update_time AS "updateTime" |
| | | residue_quantity AS "residueQuantity", quantity AS "quantity", unit AS "unit", batch AS "batch", loading_code AS "loadingCode", bar_code AS "barCode", material_code AS "materialCode", id AS "id", work_order_no AS "workOrderNo", production_line AS "productionLine", location_code AS "locationCode", status AS "status", spare_field_1 AS "spareField1", spare_field_2 AS "spareField2", create_user AS "createUser", update_user AS "updateUser", create_time AS "createTime", update_time AS "updateTime" |
| | | </sql> |
| | | |
| | | |
| | |
| | | <if test="paramCondition.loadingCode != null and paramCondition.loadingCode != ''"> |
| | | and loading_code like CONCAT('%',#{paramCondition.loadingCode},'%') |
| | | </if> |
| | | |
| | | <if test="paramCondition.status != null and paramCondition.status != ''"> |
| | | and status like CONCAT('%',#{paramCondition.status},'%') |
| | | </if> |
| | | <if test="paramCondition.batch != null and paramCondition.batch != ''"> |
| | | and batch like CONCAT('%',#{paramCondition.batch},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.om.productionOrderBatchInfo.model.params.ProductionOrderBatchInfoParam"> |
| | |
| | | /** |
| | | * 是否上料(是、否) |
| | | */ |
| | | private String state; |
| | | private String status; |
| | | |
| | | private Integer quantity; |
| | | |
| | | private String unit; |
| | | |
| | | private String batch; |
| | | |
| | | private Integer residueQuantity; |
| | | |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 是否上料(是、否) |
| | | */ |
| | | private String state; |
| | | private String status; |
| | | |
| | | private Integer residueQuantity; |
| | | |
| | | |
| | | private Integer quantity; |
| | | |
| | | private String unit; |
| | | |
| | | private String batch; |
| | | |
| | | /** |
| | | * 预留字段1 |
| | |
| | | .eq("work_order_no", productionOrderBatchInfoParam.getWorkOrderNo()) |
| | | .eq("material_code", productionOrderBatchInfoParam.getMaterialCode()) |
| | | ); |
| | | one.setState("是"); |
| | | one.setStatus("是"); |
| | | infoService.saveOrUpdate(one); |
| | | } |
| | | |
| | |
| | | {field: 'locationCode', sort: true, title: '工位编号', width: 100}, |
| | | //{field: 'loadingCode', sort: true, title: '扫码工位编号', width: 105}, |
| | | {field: 'materialCode', sort: true, title: '物料编码', width: 170}, |
| | | {field: 'spareField1', sort: true, title: '上料数量'}, |
| | | {field: 'spareField2', sort: true, title: '单位'}, |
| | | {field: 'loadingCode', sort: true, title: '物料批次',width: 120}, |
| | | {field: 'state', sort: true, title: '是否上料', width: 105,templet: '#stateTpl'}, |
| | | {field: 'batch', sort: true, title: '物料批次',width: 120}, |
| | | {field: 'quantity', sort: true, title: '上料数量',width: 120}, |
| | | {field: 'residueQuantity', sort: true, title: '剩余数量',width: 120}, |
| | | {field: 'unit', sort: true, title: '单位'}, |
| | | {field: 'status', sort: true, title: '是否上料', width: 105,templet: '#stateTpl'}, |
| | | // {field: 'orderStatus', sort: true, title: '状态',align:'center',width:80,templet: '#orderStatusTpl'}, |
| | | |
| | | ]]; |
| | |
| | | // Feng.error("条码信息异常") |
| | | // return |
| | | // } |
| | | var updateOrderBatchInfo = new $ax(Feng.ctxPath + "/productionOrderBatchInfo/updateOrderBatchInfo?materialCode=" + barCode.substring(0, 14) + "&workOrderNo="+ $('#workOrderNo').val()+ "&spareField1="+ number + "&loadingCode="+ batch); |
| | | var updateOrderBatchInfo = new $ax(Feng.ctxPath + "/productionOrderBatchInfo/updateOrderBatchInfo?materialCode=" + barCode.substring(0, 14) + "&workOrderNo="+ $('#workOrderNo').val()+ "&quantity="+ number + "&batch="+ batch+ "&residueQuantity="+ number); |
| | | var updateOrderBatchInfoResult = updateOrderBatchInfo.start(); |
| | | if(updateOrderBatchInfoResult.data === "0"){ |
| | | Feng.error("批次不同无法录入"); |
| | |
| | | {field: 'locationCode', sort: true, title: '工位编号', width: 105}, |
| | | //{field: 'loadingCode', sort: true, title: '扫码工位编号', width: 105}, |
| | | {field: 'materialCode', sort: true, title: '物料编码'}, |
| | | {field: 'loadingCode', sort: true, title: '物料批次'}, |
| | | {field: 'spareField1', sort: true, title: '上料数量'}, |
| | | {field: 'productionLine', sort: true, title: '剩余数量'}, |
| | | {field: 'spareField2', sort: true, title: '单位'}, |
| | | {field: 'batch', sort: true, title: '物料批次'}, |
| | | {field: 'quantity', sort: true, title: '上料数量'}, |
| | | {field: 'residueQuantity', sort: true, title: '剩余数量'}, |
| | | {field: 'unit', sort: true, title: '单位'}, |
| | | |
| | | {field: 'state', sort: true, title: '是否上料', width: 105,templet: '#stateTpl'}, |
| | | {field: 'status', sort: true, title: '是否上料', width: 105,templet: '#stateTpl'}, |
| | | {field: 'createTime', sort: true, title: '创建时间',minWidth:160}, |
| | | // {field: 'updateTime', sort: true, title: '修改时间',minWidth:160}, |
| | | //{align: 'center', toolbar: '#tableBar', title: '操作'} |
| | |
| | | ProductionOrderBatchInfo.search = function () { |
| | | var queryData = {}; |
| | | queryData['workOrderNo'] = $("#workOrderNo").val(); |
| | | queryData['productionLine'] = $("#productionLine").val(); |
| | | queryData['locationCode'] = $("#locationCode").val(); |
| | | queryData['loadingCode'] = $("#loadingCode").val(); |
| | | queryData['status'] = $("#status").val(); |
| | | |
| | | table.reload(ProductionOrderBatchInfo.tableId, { |
| | | where: queryData, page: {curr: 1} |
| | |
| | | workOrderNo: "", |
| | | productionLine: "", |
| | | locationCode: "", |
| | | state: "", |
| | | status: "", |
| | | spareField1: "", |
| | | spareField2: "", |
| | | createUser: "", |
| | |
| | | workOrderNo: "", |
| | | productionLine: "", |
| | | locationCode: "", |
| | | state: "", |
| | | status: "", |
| | | spareField1: "", |
| | | spareField2: "", |
| | | createUser: "", |
| | |
| | | </div> |
| | | </div> |
| | | <script type="text/html" id="stateTpl"> |
| | | {{# if(d.state == '是'){ }} |
| | | {{# if(d.status == '是'){ }} |
| | | <span style="color: green">是</span> |
| | | {{# } else if(d.state == '否'){ }} |
| | | {{# } else if(d.status == '否'){ }} |
| | | <span style="color: red;">否</span> |
| | | {{# } }} |
| | | </script> |
| | |
| | | <input id="workOrderNo" class="layui-input" type="text" placeholder="工单编号"/> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | 产线编号: |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <input id="productionLine" class="layui-input" type="text" placeholder="产品编号"/> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | 工位编号: |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <input id="locationCode" class="layui-input" type="text" placeholder="工位编号"/> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | 批次: |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <input id="bacth" class="layui-input" type="text" placeholder="批次"/> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | 是否上料: |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <select id="status" name="status"> |
| | | <option value=""></option> |
| | | <option value="是">是</option> |
| | | <option value="否">否</option> |
| | | </select> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon"></i>搜索</button> |
| | | <button id="btnAdd" class="layui-btn icon-btn"><i class="layui-icon"></i>添加</button> |
| | | <button id="btnExp" class="layui-btn icon-btn"><i class="layui-icon"></i>导出</button> |
| | |
| | | <div class="layui-inline layui-col-md12"> |
| | | <label class="layui-form-label">是否上料<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="state" name="state" placeholder="请输入是否上料(是、否)" type="text" class="layui-input" lay-verify="required" required/> |
| | | <input id="status" name="status" placeholder="请输入是否上料(是、否)" type="text" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="layui-inline layui-col-md12"> |
| | | <label class="layui-form-label">是否上料<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="state" name="state" placeholder="请输入是否上料(是、否)" type="text" class="layui-input" lay-verify="required" required/> |
| | | <input id="status" name="status" placeholder="请输入是否上料(是、否)" type="text" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | </div> |