chenlu
2024-03-07 f595d1fc19019f30bb1ee8729eb50aab8999f50f
Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
9个文件已修改
77 ■■■■ 已修改文件
north-glass-erp/.idea/dataSources.local.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/ReplenishController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/PatchLogMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/ReplenishService.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/ReworkService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/PatchLogMapper.xml 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/ReworkMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/pp/PatchLogMapper.xml 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/pp/ReworkMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/.idea/dataSources.local.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="dataSourceStorageLocal" created-in="IU-232.9559.62">
  <component name="dataSourceStorageLocal" created-in="IU-232.8660.185">
    <data-source name="@localhost [2]" uuid="165c5447-d19a-4aaf-af5f-cee92ae696c2">
      <database-info product="MySQL" version="8.0.22" jdbc-version="4.2" driver-name="MySQL Connector/J" driver-version="mysql-connector-java-8.0.25 (Revision: 08be9e9b4cba6aa115f9b27b215887af40b159e0)" dbms="MYSQL" exact-version="8.0.22" exact-driver-version="8.0">
        <extra-name-characters>#@</extra-name-characters>
north-glass-erp/src/main/java/com/example/erp/controller/pp/ReplenishController.java
@@ -50,7 +50,7 @@
        }
    }
    @ApiOperation("订单调拨接口")
    @ApiOperation("补片审核接口")
    @PostMapping("/updateReplenish")
    public Result updateReplenish( @RequestBody Map<String,Object> object){
        if(replenishService.updateReplenish(object)){
north-glass-erp/src/main/java/com/example/erp/mapper/pp/PatchLogMapper.java
@@ -26,6 +26,8 @@
    Boolean updateReplenish(@Param("patchLog") PatchLog patchLog ,  @Param("userName") String userName);
    Boolean updateOrderProcessDetail(@Param("patchLog") PatchLog patchLog );
    List<Map<String,Object>> getSelectReplenish(@Param("offset") Integer offset, @Param("pageSize") Integer pageSiz);
north-glass-erp/src/main/java/com/example/erp/service/pp/ReplenishService.java
@@ -11,6 +11,7 @@
import com.example.erp.service.userInfo.SysErrorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import java.text.SimpleDateFormat;
@@ -20,6 +21,7 @@
@Service
@DS("pp")
@Transactional(rollbackFor = Exception.class)
public class ReplenishService {
    @Autowired
    PatchLogMapper patchMapper;
@@ -97,24 +99,37 @@
    public Boolean updateReplenish(Map<String,Object> object) {
        boolean saveState = true;
        String userName = "";
        String userId = "";
        if (object.get("userName") != null) {
            userName = object.get("userName").toString();
        }
        if (object.get("userId") != null) {
            userId = object.get("userId").toString();
        }
        //获取对象集合循环进行新增修改
        List<PatchLog> patchLoglist = JSONArray.parseArray(JSONObject.toJSONString(object.get("patchLog")), PatchLog.class);
        if (!patchLoglist.isEmpty()){
            for (PatchLog patchLog : patchLoglist) {
                //审核
                patchMapper.updateReplenish(patchLog,userName);
        Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint();
        try {
            String userName = "";
            String userId = "";
            if (object.get("userName") != null) {
                userName = object.get("userName").toString();
            }
        }
            if (object.get("userId") != null) {
                userId = object.get("userId").toString();
            }
            //获取对象集合循环进行新增修改
            List<PatchLog> patchLoglist = JSONArray.parseArray(JSONObject.toJSONString(object.get("patchLog")), PatchLog.class);
            if (!patchLoglist.isEmpty()){
                for (PatchLog patchLog : patchLoglist) {
                    //审核
                    patchMapper.updateReplenish(patchLog,userName);
                    //修改小片流程卡数量
                    patchMapper.updateOrderProcessDetail(patchLog);
                }
            }
        } catch (Exception e) {
            TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint);
            //将异常传入数据库
            SysError sysError = new SysError();
            sysError.setError(e.toString());
            sysError.setFunc("saveOrder");
            sysErrorService.insert(sysError);
            saveState = false;
        }
        return saveState;
north-glass-erp/src/main/java/com/example/erp/service/pp/ReworkService.java
@@ -14,6 +14,7 @@
import com.example.erp.service.userInfo.SysErrorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import java.text.SimpleDateFormat;
@@ -23,6 +24,7 @@
@Service
@DS("pp")
@Transactional(rollbackFor = Exception.class)
public class ReworkService {
    @Autowired
    ReworkMapper reworkMapper;
north-glass-erp/src/main/resources/mapper/pp/PatchLogMapper.xml
@@ -88,6 +88,13 @@
        update pp.patch_log set reviewer=#{userName},review_status=1,update_time=now() where id=#{patchLog.id}
    </update>
    <update id="updateOrderProcessDetail"  >
        update sd.order_process_detail set reporting_work_num=reporting_work_num-#{patchLog.patchNum} where order_id=#{patchLog.orderId} and
        order_number=#{patchLog.orderSort} and technology_number=#{patchLog.technologyNumber} and id <![CDATA[<]]> (select a.opdid from(select id as opdid from
        sd.order_process_detail opd where opd.order_id=#{patchLog.orderId} and opd.order_number=#{patchLog.orderSort} and opd.technology_number=#{patchLog.technologyNumber}
        and process=#{patchLog.patchProcesses}) as a)
    </update>
    <update id="updateDamageDetails"  >
        update pp.damage_details set quantity=quantity+#{patchLog.patchNum},patch_status=1 where id=#{patchLog.reviewer}
    </update>
@@ -129,7 +136,7 @@
                 left join (select * from sd.order_glass_detail group by order_id,order_number) as ogd
                           on rw.order_id = ogd.order_id and dd.order_number = ogd.order_number
        where  dd.breakage_quantity-dd.quantity>0 and dd.available=0
        where  dd.breakage_quantity-dd.quantity>0 and dd.available=0 and (dd.responsible_process=rw.this_process or (dd.responsible_process!=rw.this_process and dd.qualityIns_status=1))
    </select>
north-glass-erp/src/main/resources/mapper/pp/ReworkMapper.xml
@@ -98,7 +98,7 @@
                 left join (select * from sd.order_glass_detail group by order_id,order_number) as ogd
                           on rw.order_id = ogd.order_id and dd.order_number = ogd.order_number
        where  dd.breakage_quantity-dd.quantity>0 and dd.available=1
        where  dd.breakage_quantity-dd.quantity>0 and dd.available=1 and dd.qualityIns_status=1
    </select>
north-glass-erp/target/classes/mapper/pp/PatchLogMapper.xml
@@ -88,6 +88,13 @@
        update pp.patch_log set reviewer=#{userName},review_status=1,update_time=now() where id=#{patchLog.id}
    </update>
    <update id="updateOrderProcessDetail"  >
        update sd.order_process_detail set reporting_work_num=reporting_work_num-#{patchLog.patchNum} where order_id=#{patchLog.orderId} and
        order_number=#{patchLog.orderSort} and technology_number=#{patchLog.technologyNumber} and id <![CDATA[<]]> (select a.opdid from(select id as opdid from
        sd.order_process_detail opd where opd.order_id=#{patchLog.orderId} and opd.order_number=#{patchLog.orderSort} and opd.technology_number=#{patchLog.technologyNumber}
        and process=#{patchLog.patchProcesses}) as a)
    </update>
    <update id="updateDamageDetails"  >
        update pp.damage_details set quantity=quantity+#{patchLog.patchNum},patch_status=1 where id=#{patchLog.reviewer}
    </update>
@@ -129,7 +136,7 @@
                 left join (select * from sd.order_glass_detail group by order_id,order_number) as ogd
                           on rw.order_id = ogd.order_id and dd.order_number = ogd.order_number
        where  dd.breakage_quantity-dd.quantity>0 and dd.available=0
        where  dd.breakage_quantity-dd.quantity>0 and dd.available=0 and (dd.responsible_process=rw.this_process or (dd.responsible_process!=rw.this_process and dd.qualityIns_status=1))
    </select>
north-glass-erp/target/classes/mapper/pp/ReworkMapper.xml
@@ -98,7 +98,7 @@
                 left join (select * from sd.order_glass_detail group by order_id,order_number) as ogd
                           on rw.order_id = ogd.order_id and dd.order_number = ogd.order_number
        where  dd.breakage_quantity-dd.quantity>0 and dd.available=1
        where  dd.breakage_quantity-dd.quantity>0 and dd.available=1 and dd.qualityIns_status=1
    </select>