guoyujie
2025-11-11 71a4444510d9067654705f0c5803d5f12a21a092
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -6,6 +6,7 @@
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.erp.common.Constants;
import com.example.erp.common.Result;
import com.example.erp.entity.pp.FlowCard;
import com.example.erp.entity.sd.*;
import com.example.erp.entity.userInfo.Log;
@@ -1567,12 +1568,30 @@
    public Boolean updateTerminationSv(String processId, Integer orderNumber, Integer value) {
        if (processId!=""){
            flowCardMapper.updateTerminationMp(processId,orderNumber,value);
            //获取终止数量与流程卡数量比较
            Map<String, Object> data = flowCardMapper.getTerminationQuantity(processId,orderNumber);
            Integer terminationNum = (Integer) data.get("termination_quantity");
            Integer totalNum = (Integer) data.get("quantity");
            if (terminationNum==totalNum){
                flowCardMapper.updateTerminationStatus(processId,orderNumber);
            }
            return true;
        }else {
            return false;
        }
    }
    public Boolean updateTerminationNoSv(String processId, Integer orderNumber) {
        if (processId!=""){
            flowCardMapper.updateTerminationNoMp(processId,orderNumber);
            return true;
        }else {
            return false;
        }
    }
    public Map<String, Object> selectCompletedSv(String processId, Integer orderNumber, String process) {
@@ -1710,8 +1729,25 @@
    }
    public Result selectProcessCardProgressSv(Map<String, String> object) {
        String orderId = object.get("orderId");
        String processId = object.get("processId");
        String orderNumber = object.get("orderNumber");
        String technologyNumber = object.get("technologyNumber");
        String process = object.get("process");
        Result result = new Result();
        //当流程卡和订单号都为空时,返回提示信息
        if (orderId == null &&processId == null){
            result.setCode(Constants.Code_600);
            result.setMsg("Please enter at least one parameter for the order number and the process card.");
            return result;
        }
        return result.success(
                orderProcessDetailMapper
                        .selectProcessCardProgressSv( orderId, processId, orderNumber, technologyNumber, process)
        );
    }
}