|
|
|
@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
|
|
import com.dsic.gj_erp.annotation.AuthFunction;
|
|
|
|
import com.dsic.gj_erp.annotation.AuthFunction;
|
|
|
|
import com.dsic.gj_erp.bean.ResultBean;
|
|
|
|
import com.dsic.gj_erp.bean.ResultBean;
|
|
|
|
|
|
|
|
import com.dsic.gj_erp.bean.SpringContextHolder;
|
|
|
|
import com.dsic.gj_erp.bean.jcsj.DmCbxxp;
|
|
|
|
import com.dsic.gj_erp.bean.jcsj.DmCbxxp;
|
|
|
|
import com.dsic.gj_erp.bean.jhgk.DmYdjh;
|
|
|
|
import com.dsic.gj_erp.bean.jhgk.DmYdjh;
|
|
|
|
import com.dsic.gj_erp.bean.kc.ImCkwpkwp;
|
|
|
|
import com.dsic.gj_erp.bean.kc.ImCkwpkwp;
|
|
|
|
@ -21,6 +22,7 @@ import com.dsic.gj_erp.controller.zyjh.dto.PwExportExcel;
|
|
|
|
import com.dsic.gj_erp.controller.zyjh.dto.PwpgDto;
|
|
|
|
import com.dsic.gj_erp.controller.zyjh.dto.PwpgDto;
|
|
|
|
import com.dsic.gj_erp.dao.sy.Dm_zhbmpRepository;
|
|
|
|
import com.dsic.gj_erp.dao.sy.Dm_zhbmpRepository;
|
|
|
|
import com.dsic.gj_erp.exception.CustomException;
|
|
|
|
import com.dsic.gj_erp.exception.CustomException;
|
|
|
|
|
|
|
|
import com.dsic.gj_erp.jiuzhou.SlPlanEvent;
|
|
|
|
import com.dsic.gj_erp.mapper.jhgk.DmYdjhMapper;
|
|
|
|
import com.dsic.gj_erp.mapper.jhgk.DmYdjhMapper;
|
|
|
|
import com.dsic.gj_erp.mapper.kc.ImCkwpkwpMapper;
|
|
|
|
import com.dsic.gj_erp.mapper.kc.ImCkwpkwpMapper;
|
|
|
|
import com.dsic.gj_erp.service.jcsj.DmCbxxpService;
|
|
|
|
import com.dsic.gj_erp.service.jcsj.DmCbxxpService;
|
|
|
|
@ -77,8 +79,6 @@ public class PgdSljhController {
|
|
|
|
DmCbxxpService dmCbxxpService;
|
|
|
|
DmCbxxpService dmCbxxpService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
SYService syService;
|
|
|
|
SYService syService;
|
|
|
|
|
|
|
|
|
|
|
|
@ -95,6 +95,7 @@ public class PgdSljhController {
|
|
|
|
//dw_1.object.dyry[ll_ii] = gs_user
|
|
|
|
//dw_1.object.dyry[ll_ii] = gs_user
|
|
|
|
//dw_1.object.dyrq[ll_ii] = ls_datetime
|
|
|
|
//dw_1.object.dyrq[ll_ii] = ls_datetime
|
|
|
|
List<DmYdjh> ydupList = new ArrayList<>();
|
|
|
|
List<DmYdjh> ydupList = new ArrayList<>();
|
|
|
|
|
|
|
|
List<DmYdjh> ydAddList = new ArrayList<>();
|
|
|
|
List<ImCkwpkwp> ckupList = new ArrayList<>();
|
|
|
|
List<ImCkwpkwp> ckupList = new ArrayList<>();
|
|
|
|
for (SlKc slKc : list) {
|
|
|
|
for (SlKc slKc : list) {
|
|
|
|
String idd = IdWorker.get32UUID();
|
|
|
|
String idd = IdWorker.get32UUID();
|
|
|
|
@ -128,42 +129,6 @@ public class PgdSljhController {
|
|
|
|
ydjh.setZylx(slKc.getZYLX());
|
|
|
|
ydjh.setZylx(slKc.getZYLX());
|
|
|
|
ydjh.setSlbz(slKc.getBZ());
|
|
|
|
ydjh.setSlbz(slKc.getBZ());
|
|
|
|
ydjh.setSldrry((String) req.getAttribute("yhms"));
|
|
|
|
ydjh.setSldrry((String) req.getAttribute("yhms"));
|
|
|
|
// if("1".equals(slKc.getSLDW()) || "13".equals(slKc.getSLDW()) || "14".equals(slKc.getSLDW()) ||"3".equals(slKc.getSLDW())
|
|
|
|
|
|
|
|
// || "6".equals(slKc.getSLDW())|| "7".equals(slKc.getSLDW())||"8".equals(slKc.getSLDW())
|
|
|
|
|
|
|
|
// ){
|
|
|
|
|
|
|
|
// ydjh.setZyq("FP2Q");
|
|
|
|
|
|
|
|
// ydjh.setZyq1("二区");
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// ydjh.setKw(slKc.getSLDW());
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// if("10".equals(slKc.getSLDW()) || "11".equals(slKc.getSLDW()) || "12".equals(slKc.getSLDW()) ||"2".equals(slKc.getSLDW())
|
|
|
|
|
|
|
|
// || "5".equals(slKc.getSLDW())|| "9".equals(slKc.getSLDW())
|
|
|
|
|
|
|
|
// ){
|
|
|
|
|
|
|
|
// ydjh.setZyq("FP3Q");
|
|
|
|
|
|
|
|
// ydjh.setZyq1("三区");
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// ydjh.setKw(slKc.getSLDW());
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// //作业区默认值修正
|
|
|
|
|
|
|
|
// //二跨T型材腹板对应四区
|
|
|
|
|
|
|
|
// //二跨T型材面板对应三区 上面已处理 这里只做记录
|
|
|
|
|
|
|
|
// if("11".equals(slKc.getSLDW())){
|
|
|
|
|
|
|
|
// ydjh.setZyq("FP4Q");
|
|
|
|
|
|
|
|
// ydjh.setZyq1("四区");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// if("4".equals(slKc.getSLDW())|| "15".equals(slKc.getSLDW())
|
|
|
|
|
|
|
|
// ){
|
|
|
|
|
|
|
|
// ydjh.setZyq("FP4Q");
|
|
|
|
|
|
|
|
// ydjh.setZyq1("四区");
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// ydjh.setKw(slKc.getSLDW());
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// if("11".equals(slKc.getSLDW())) {
|
|
|
|
|
|
|
|
// ydjh.setZyq("FP4Q");
|
|
|
|
|
|
|
|
// ydjh.setZyq1("四区");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
ydupList.add(ydjh);
|
|
|
|
ydupList.add(ydjh);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (StringUtils.isBlank(slKc.getYdid()) || StringUtils.isBlank(slKc.getDCTH())) {
|
|
|
|
if (StringUtils.isBlank(slKc.getYdid()) || StringUtils.isBlank(slKc.getDCTH())) {
|
|
|
|
@ -234,6 +199,7 @@ public class PgdSljhController {
|
|
|
|
ydjh.setZyq("FP3Q");
|
|
|
|
ydjh.setZyq("FP3Q");
|
|
|
|
ydjh.setZyq1("三区");
|
|
|
|
ydjh.setZyq1("三区");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ydAddList.add(ydjh);
|
|
|
|
dmYdjhService.save(ydjh);
|
|
|
|
dmYdjhService.save(ydjh);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -241,6 +207,11 @@ public class PgdSljhController {
|
|
|
|
dmYdjhService.updateBatchById(ydupList);
|
|
|
|
dmYdjhService.updateBatchById(ydupList);
|
|
|
|
imCkwpkwpService.updateBatchByMultiId(ckupList);
|
|
|
|
imCkwpkwpService.updateBatchByMultiId(ckupList);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//=================发布推送上料计划到料场的事件========================
|
|
|
|
|
|
|
|
ydAddList.addAll(ydupList);
|
|
|
|
|
|
|
|
SlPlanEvent slPlanEvent = new SlPlanEvent(this, list);
|
|
|
|
|
|
|
|
SpringContextHolder.pushEvent(slPlanEvent);
|
|
|
|
|
|
|
|
//================================================================
|
|
|
|
|
|
|
|
|
|
|
|
List<Dm_zhbmp> qgkws = dm_zhbmpRepository.findByBMLB("QGKW");
|
|
|
|
List<Dm_zhbmp> qgkws = dm_zhbmpRepository.findByBMLB("QGKW");
|
|
|
|
List<Dm_zhbmp> zylxs = dm_zhbmpRepository.findByBMLB("zylx");
|
|
|
|
List<Dm_zhbmp> zylxs = dm_zhbmpRepository.findByBMLB("zylx");
|
|
|
|
@ -288,14 +259,12 @@ public class PgdSljhController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new ResultBean(slKcList);
|
|
|
|
return new ResultBean(slKcList);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/slPrintD")
|
|
|
|
@PostMapping("/slPrintD")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
public ResultBean slPrintD(HttpServletRequest req, @RequestBody List<SlKc> list) throws Exception, CustomException {
|
|
|
|
public ResultBean slPrintD(HttpServletRequest req, @RequestBody List<SlKc> list) throws Exception, CustomException {
|
|
|
|
@ -372,14 +341,12 @@ public class PgdSljhController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new ResultBean(slKcList);
|
|
|
|
return new ResultBean(slKcList);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/slPrintqx")
|
|
|
|
@PostMapping("/slPrintqx")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
public ResultBean slPrintqx(HttpServletRequest req, @RequestBody List<SlKc> list) throws Exception, CustomException {
|
|
|
|
public ResultBean slPrintqx(HttpServletRequest req, @RequestBody List<SlKc> list) throws Exception, CustomException {
|
|
|
|
@ -423,7 +390,6 @@ public class PgdSljhController {
|
|
|
|
imCkwpkwpService.updateBatchByMultiId(ckupList);
|
|
|
|
imCkwpkwpService.updateBatchByMultiId(ckupList);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new ResultBean();
|
|
|
|
return new ResultBean();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -443,7 +409,6 @@ public class PgdSljhController {
|
|
|
|
// 库存标识 不等于 01 没有匹配上
|
|
|
|
// 库存标识 不等于 01 没有匹配上
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (map.get("rqopt").equals("01")) {
|
|
|
|
if (map.get("rqopt").equals("01")) {
|
|
|
|
qw.ne("isnull(ZT,'')", "11");
|
|
|
|
qw.ne("isnull(ZT,'')", "11");
|
|
|
|
} else if (map.get("rqopt").equals("02")) {
|
|
|
|
} else if (map.get("rqopt").equals("02")) {
|
|
|
|
@ -460,7 +425,6 @@ public class PgdSljhController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/getKcAndSljh1")
|
|
|
|
@PostMapping("/getKcAndSljh1")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
public ResultBean getKcAndSljh1(HttpServletRequest req, @RequestBody Map map) throws Exception, CustomException {
|
|
|
|
public ResultBean getKcAndSljh1(HttpServletRequest req, @RequestBody Map map) throws Exception, CustomException {
|
|
|
|
@ -475,7 +439,6 @@ public class PgdSljhController {
|
|
|
|
// 库存标识 不等于 01 没有匹配上
|
|
|
|
// 库存标识 不等于 01 没有匹配上
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (map.get("rqopt").equals("01")) {
|
|
|
|
if (map.get("rqopt").equals("01")) {
|
|
|
|
qw.eq("isnull(ZT,'')", "2").eq("isnull(slkcdw,'')", "");
|
|
|
|
qw.eq("isnull(ZT,'')", "2").eq("isnull(slkcdw,'')", "");
|
|
|
|
} else if (map.get("rqopt").equals("02")) {
|
|
|
|
} else if (map.get("rqopt").equals("02")) {
|
|
|
|
@ -594,9 +557,7 @@ public class PgdSljhController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param req 需求船号 需求批量 流向 抛丸位置 切割跨位(根据 合同号生成) 备注
|
|
|
|
* @param req
|
|
|
|
|
|
|
|
* 需求船号 需求批量 流向 抛丸位置 切割跨位(根据 合同号生成) 备注
|
|
|
|
|
|
|
|
* 根据 需求船号 需求批量 去 dm_ydjh 表中 查询 反写 库存垛位 上料层数,小合同号,合同号,物料号
|
|
|
|
* 根据 需求船号 需求批量 去 dm_ydjh 表中 查询 反写 库存垛位 上料层数,小合同号,合同号,物料号
|
|
|
|
* 库存表 增加 dm_ydjh 表 id (dm_ydjh 中 有数据 )
|
|
|
|
* 库存表 增加 dm_ydjh 表 id (dm_ydjh 中 有数据 )
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
@ -630,7 +591,6 @@ public class PgdSljhController {
|
|
|
|
imCkwpkwp.setYdid(slKc.getYdid());
|
|
|
|
imCkwpkwp.setYdid(slKc.getYdid());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isBlank(slKc.getYdid())) {
|
|
|
|
if (StringUtils.isBlank(slKc.getYdid())) {
|
|
|
|
// 手工进行 批量了
|
|
|
|
// 手工进行 批量了
|
|
|
|
String cjs = "";
|
|
|
|
String cjs = "";
|
|
|
|
@ -896,6 +856,7 @@ public class PgdSljhController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return ""; // Return empty string if hyphen is not found
|
|
|
|
return ""; // Return empty string if hyphen is not found
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("kcAdnSlZx")
|
|
|
|
@PostMapping("kcAdnSlZx")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
public ResultBean kcAdnSlZx(HttpServletRequest req, @RequestBody Map map) throws Exception, CustomException {
|
|
|
|
public ResultBean kcAdnSlZx(HttpServletRequest req, @RequestBody Map map) throws Exception, CustomException {
|
|
|
|
@ -968,7 +929,6 @@ public class PgdSljhController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/saveSljhPgdFk")
|
|
|
|
@PostMapping("/saveSljhPgdFk")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
@AuthFunction
|
|
|
|
@AuthFunction
|
|
|
|
@ -986,7 +946,6 @@ public class PgdSljhController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// @PostMapping("/getKcAndSljh")
|
|
|
|
// @PostMapping("/getKcAndSljh")
|
|
|
|
// @ResponseBody
|
|
|
|
// @ResponseBody
|
|
|
|
// @AuthFunction
|
|
|
|
// @AuthFunction
|
|
|
|
@ -1107,8 +1066,6 @@ public class PgdSljhController {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<DmCbxxp> czList = dmCbxxpService.list();
|
|
|
|
List<DmCbxxp> czList = dmCbxxpService.list();
|
|
|
|
List<DmYdjh> ydupList = new ArrayList<>();
|
|
|
|
List<DmYdjh> ydupList = new ArrayList<>();
|
|
|
|
List<SlKc> ckupList = new ArrayList<>();
|
|
|
|
List<SlKc> ckupList = new ArrayList<>();
|
|
|
|
@ -1157,7 +1114,6 @@ public class PgdSljhController {
|
|
|
|
// ckupList.add(imCkwpkwp);
|
|
|
|
// ckupList.add(imCkwpkwp);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
slKc.setZYLX(getLx(dmYdjh.getLqlb(), dmYdjh.getZl(), dmYdjh.getTzbh()));
|
|
|
|
slKc.setZYLX(getLx(dmYdjh.getLqlb(), dmYdjh.getZl(), dmYdjh.getTzbh()));
|
|
|
|
slKc.setZYCH(dmYdjh.getDcCh());
|
|
|
|
slKc.setZYCH(dmYdjh.getDcCh());
|
|
|
|
slKc.setZYPL(dmYdjh.getDcPl());
|
|
|
|
slKc.setZYPL(dmYdjh.getDcPl());
|
|
|
|
@ -1180,7 +1136,6 @@ public class PgdSljhController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
slKc.setDHH(dmYdjh.getSljhrq());
|
|
|
|
slKc.setDHH(dmYdjh.getSljhrq());
|
|
|
|
//slKc.setPwwz(dmYdjh.getKw());
|
|
|
|
//slKc.setPwwz(dmYdjh.getKw());
|
|
|
|
slKc.setYdid(dmYdjh.getId());
|
|
|
|
slKc.setYdid(dmYdjh.getId());
|
|
|
|
@ -1197,7 +1152,6 @@ public class PgdSljhController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("kcAdnSlBdQX")
|
|
|
|
@PostMapping("kcAdnSlBdQX")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
@ -1277,7 +1231,6 @@ public class PgdSljhController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
int num = 1;
|
|
|
|
int num = 1;
|
|
|
|
for (SlKc slKc : slKcs1) {
|
|
|
|
for (SlKc slKc : slKcs1) {
|
|
|
|
@ -1298,7 +1251,6 @@ public class PgdSljhController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
response.setContentType("application/vnd.ms-excel");
|
|
|
|
response.setContentType("application/vnd.ms-excel");
|
|
|
|
response.setCharacterEncoding("utf-8");
|
|
|
|
response.setCharacterEncoding("utf-8");
|
|
|
|
String fileName = "example.xlsx";
|
|
|
|
String fileName = "example.xlsx";
|
|
|
|
|