懒羊羊
2024-01-11 be26d5065b4a07123638c220c0792e9250a458e6
批次上料
已修改15个文件
186 ■■■■ 文件已修改
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrdeInfo/service/impl/ProductionOrdeInfoServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/controller/ProductionOrderBatchInfoController.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/entity/ProductionOrderBatchInfo.java 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/mapper/mapping/ProductionOrderBatchInfoMapper.xml 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/model/params/ProductionOrderBatchInfoParam.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/model/result/ProductionOrderBatchInfoResult.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/service/impl/ProductionOrderBatchInfoServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/webapp/assets/modular/kb/materialRegistration/materialRegistration.js 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/webapp/assets/modular/om/productionOrderBatchInfo/productionOrderBatchInfo.js 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/webapp/assets/modular/om/productionOrderBatchInfo/productionOrderBatchInfo_add.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/webapp/assets/modular/om/productionOrderBatchInfo/productionOrderBatchInfo_edit.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/webapp/pages/modular/kb/materialRegistration/materialRegistration.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/webapp/pages/modular/om/productionOrderBatchInfo/productionOrderBatchInfo.html 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/webapp/pages/modular/om/productionOrderBatchInfo/productionOrderBatchInfo_add.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/webapp/pages/modular/om/productionOrderBatchInfo/productionOrderBatchInfo_edit.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrdeInfo/service/impl/ProductionOrdeInfoServiceImpl.java
@@ -137,9 +137,10 @@
                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);
            }
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/controller/ProductionOrderBatchInfoController.java
@@ -171,17 +171,20 @@
        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");
    }
@@ -190,9 +193,10 @@
    @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();
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/entity/ProductionOrderBatchInfo.java
@@ -57,11 +57,23 @@
    /**
     * 是否上料(是、否)
     */
    @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
@@ -99,6 +111,38 @@
      @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;
@@ -156,12 +200,12 @@
        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() {
@@ -219,7 +263,7 @@
        ", workOrderNo=" + workOrderNo +
        ", productionLine=" + productionLine +
        ", locationCode=" + locationCode +
        ", state=" + state +
        ", status=" + status +
        ", spareField1=" + spareField1 +
        ", spareField2=" + spareField2 +
        ", createUser=" + createUser +
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/mapper/mapping/ProductionOrderBatchInfoMapper.xml
@@ -8,7 +8,7 @@
        <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" />
@@ -20,12 +20,17 @@
        <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>
@@ -63,7 +68,12 @@
        <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">
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/model/params/ProductionOrderBatchInfoParam.java
@@ -55,7 +55,15 @@
    /**
     * 是否上料(是、否)
     */
    private String state;
    private String status;
    private Integer quantity;
    private String unit;
    private String batch;
    private Integer residueQuantity;
    /**
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/model/result/ProductionOrderBatchInfoResult.java
@@ -54,7 +54,16 @@
    /**
     * 是否上料(是、否)
     */
    private String state;
    private String status;
    private Integer residueQuantity;
    private Integer quantity;
    private String unit;
    private String batch;
    /**
     * 预留字段1
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/service/impl/ProductionOrderBatchInfoServiceImpl.java
@@ -89,7 +89,7 @@
                .eq("work_order_no", productionOrderBatchInfoParam.getWorkOrderNo())
                .eq("material_code", productionOrderBatchInfoParam.getMaterialCode())
        );
        one.setState("是");
        one.setStatus("是");
        infoService.saveOrUpdate(one);
    }
guns-vip-main/src/main/webapp/assets/modular/kb/materialRegistration/materialRegistration.js
@@ -134,10 +134,11 @@
            {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'},
        ]];
@@ -367,7 +368,7 @@
        //     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("批次不同无法录入");
guns-vip-main/src/main/webapp/assets/modular/om/productionOrderBatchInfo/productionOrderBatchInfo.js
@@ -24,12 +24,12 @@
            {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: '操作'}
@@ -42,8 +42,9 @@
    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}
guns-vip-main/src/main/webapp/assets/modular/om/productionOrderBatchInfo/productionOrderBatchInfo_add.js
@@ -7,7 +7,7 @@
        workOrderNo: "",
        productionLine: "",
        locationCode: "",
        state: "",
        status: "",
        spareField1: "",
        spareField2: "",
        createUser: "",
guns-vip-main/src/main/webapp/assets/modular/om/productionOrderBatchInfo/productionOrderBatchInfo_edit.js
@@ -7,7 +7,7 @@
        workOrderNo: "",
        productionLine: "",
        locationCode: "",
        state: "",
        status: "",
        spareField1: "",
        spareField2: "",
        createUser: "",
guns-vip-main/src/main/webapp/pages/modular/kb/materialRegistration/materialRegistration.html
@@ -207,9 +207,9 @@
    </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>
guns-vip-main/src/main/webapp/pages/modular/om/productionOrderBatchInfo/productionOrderBatchInfo.html
@@ -18,18 +18,28 @@
                                <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">&#xe615;</i>搜索</button>
                                <button id="btnAdd" class="layui-btn icon-btn"><i class="layui-icon">&#xe654;</i>添加</button>
                                <button id="btnExp" class="layui-btn icon-btn"><i class="layui-icon">&#xe67d;</i>导出</button>
guns-vip-main/src/main/webapp/pages/modular/om/productionOrderBatchInfo/productionOrderBatchInfo_add.html
@@ -35,7 +35,7 @@
                    <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>
guns-vip-main/src/main/webapp/pages/modular/om/productionOrderBatchInfo/productionOrderBatchInfo_edit.html
@@ -35,7 +35,7 @@
                    <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>