chenlu
2024-02-22 45c2ca7404c451b5dc150e3ee564d78dce1d73fb
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -18,41 +18,69 @@
@DS("pp")
public class FlowCardService {
    @Autowired
     FlowCardMapper flowCardMapper;
    FlowCardMapper flowCardMapper;
    public Map<String, Object>  selectProcessCard(Date selectTime1, Date selectTime2, FlowCard flowCard) {
    //流程卡管理查询
    public Map<String, Object> selectProcessCard(Date selectTime1, Date selectTime2, FlowCard flowCard) {
        Map<String, Object> map = new HashMap<>();
        //System.out.println(flowCardMapper.selectFlowCard( selectTime1,selectTime2, flowCard));
        map.put("data", flowCardMapper.selectFlowCard( selectTime1,selectTime2, flowCard));
        map.put("data", flowCardMapper.selectFlowCard(selectTime1, selectTime2, flowCard));
        return map;
    }
    //分架查询
    public Map<String, Object> selectAddProcess(Date selectTime1, Date selectTime2, FlowCard flowCard) {
        Map<String, Object> map = new HashMap<>();
        map.put("data", flowCardMapper.selectFlowCardMp( selectTime1,selectTime2, flowCard));
        map.put("data", flowCardMapper.selectFlowCardMp(selectTime1, selectTime2, flowCard));
        return map;
    }
    public Map<String, Object> DetailsSelectSv(String orderId, FlowCard flowCard) {
    //分架明细查询
    public Map<String, Object> DetailsSelectSv(String orderId, OrderDetail orderDetail) {
        Map<String, Object> map = new HashMap<>();
        map.put("data", flowCardMapper.DetailsSelectMp( orderId, flowCard));
        map.put("data", flowCardMapper.DetailsSelectMp(orderId, orderDetail));
        return map;
    }
    //删除工单
    public Boolean DeleteFlowCardSv(String orderId, String processId) {
        if (!orderId.isEmpty()&&!processId.isEmpty()){
            flowCardMapper.DeleteFlowCardMp(orderId, processId);
            return true;
        }
        else {
        if (!orderId.isEmpty() && !processId.isEmpty()) {
            Integer count=flowCardMapper.ReportingWorkCount(processId);
            if (count==0){
                flowCardMapper.DeleteFlowCardMp(orderId, processId);
                return true;
            }
            else {
                return false;
            }
        } else {
            return false;
        }
    }
    public Map<String, Object> SelectNoCardSv(String orderId, String productionId, FlowCard flowCard) {
    //分架新增明细查询
    public Map<String, Object> SelectNoCardSv(String orderId, String productionId, OrderDetail orderDetail) {
        Map<String, Object> map = new HashMap<>();
        map.put("data", flowCardMapper.SelectNoCardMp( orderId,productionId, flowCard));
        map.put("data", flowCardMapper.SelectNoCardMp(orderId, productionId, orderDetail));
        return map;
    }
    //修改排版状态
    public Boolean UpdateLayoutStatusSv(String processId) {
        if (!processId.isEmpty()) {
            Integer Status = flowCardMapper.SelectLayoutStatus(processId);
            if (Status == 0) {
                flowCardMapper.UpdateLayoutStatusMp(processId);
            } else {
                return false;
            }
            return true;
        } else {
            return false;
        }
    }
}