廖井涛
2024-06-26 c46cb6a71c35f38c7f23a2d01ad686f46a3d0e0b
north-glass-erp/src/main/java/com/example/erp/service/pp/ReplenishService.java
@@ -3,13 +3,14 @@
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.erp.entity.pp.FlowCard;
import com.example.erp.entity.pp.PatchLog;
import com.example.erp.entity.pp.Rework;
import com.example.erp.entity.pp.ReportingWork;
import com.example.erp.entity.userInfo.SysError;
import com.example.erp.mapper.pp.PatchLogMapper;
import com.example.erp.mapper.pp.ReportingWorkMapper;
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;
@@ -23,11 +24,20 @@
@DS("pp")
@Transactional(rollbackFor = Exception.class)
public class ReplenishService {
    @Autowired
    final
    PatchLogMapper patchMapper;
    @Autowired
    final
    SysErrorService sysErrorService;
    final
    ReportingWorkMapper reportingWorkMapper;
    public ReplenishService(PatchLogMapper patchMapper, SysErrorService sysErrorService, ReportingWorkMapper reportingWorkMapper) {
        this.patchMapper = patchMapper;
        this.sysErrorService = sysErrorService;
        this.reportingWorkMapper = reportingWorkMapper;
    }
    public List<Map<String, Object>> getSelectReplenish(Integer pageNum, Integer pageSize) {
@@ -114,9 +124,11 @@
            if (!patchLoglist.isEmpty()){
                for (PatchLog patchLog : patchLoglist) {
                    //审核
                    patchMapper.updateReplenish(patchLog,userName);
                   patchMapper.updateReplenish(patchLog,userName);
                    ReportingWork reportingWork = reportingWorkMapper
                            .selectOne(new QueryWrapper<ReportingWork>().eq("reporting_work_id",patchLog.getReportingWorkId()));
                    //修改小片流程卡数量
                    patchMapper.updateOrderProcessDetail(patchLog);
                    patchMapper.updateOrderProcessDetail(patchLog,reportingWork);
                }
            }
@@ -154,7 +166,16 @@
    }
    public Object selectReplenishPrintFlowCardSv(java.sql.Date selectTime1, java.sql.Date selectTime2, String orderId, String project, FlowCard flowCard) {
        if ("null".equals(orderId)) {
            orderId = "";
        }
        if ("null".equals(project)) {
            project = "";
        }
        Map<String, Object> map = new HashMap<>();
       // map.put("data", flowCardMapper.selectPrintFlowCardMp(selectTime1, selectTime2, orderId, project, flowCard));
        return map;
    }
}