|
@@ -16,6 +16,8 @@ import org.jeecg.modules.afterCode.service.IAfterComplaintProductService;
|
|
|
import org.jeecg.modules.baseCode.service.ISerialPatternService;
|
|
import org.jeecg.modules.baseCode.service.ISerialPatternService;
|
|
|
import org.jeecg.modules.cuspCode.entity.CuspSupplierProfile;
|
|
import org.jeecg.modules.cuspCode.entity.CuspSupplierProfile;
|
|
|
import org.jeecg.modules.cuspCode.service.ICuspSupplierProfileService;
|
|
import org.jeecg.modules.cuspCode.service.ICuspSupplierProfileService;
|
|
|
|
|
+import org.jeecg.modules.purCode.entity.PurOrder;
|
|
|
|
|
+import org.jeecg.modules.purCode.service.IPurOrderService;
|
|
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
|
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
|
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
|
@@ -68,6 +70,8 @@ public class AfterComplaintController {
|
|
|
private IAfterComplaintProductService afterComplaintProductService;
|
|
private IAfterComplaintProductService afterComplaintProductService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ISerialPatternService serialPatternService;
|
|
private ISerialPatternService serialPatternService;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private IPurOrderService purOrderService;
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ICuspSupplierProfileService cuspSupplierProfileService;
|
|
private ICuspSupplierProfileService cuspSupplierProfileService;
|
|
@@ -114,6 +118,22 @@ public class AfterComplaintController {
|
|
|
BeanUtils.copyProperties(afterComplaintPage, afterComplaint);
|
|
BeanUtils.copyProperties(afterComplaintPage, afterComplaint);
|
|
|
|
|
|
|
|
String code = afterComplaint.getBillCode();
|
|
String code = afterComplaint.getBillCode();
|
|
|
|
|
+ String purNumber = afterComplaint.getPurNumber();
|
|
|
|
|
+ if(StringUtils.isNotBlank(purNumber)){
|
|
|
|
|
+
|
|
|
|
|
+ QueryWrapper<PurOrder> queryWrapper = new QueryWrapper();
|
|
|
|
|
+ queryWrapper.eq("bill_code", purNumber.trim());
|
|
|
|
|
+ queryWrapper.eq("del_flag", "0");
|
|
|
|
|
+
|
|
|
|
|
+ List<PurOrder> list = purOrderService.list(queryWrapper);
|
|
|
|
|
+ if (list.size() == 0) {
|
|
|
|
|
+ return Result.error("采购编码错误,请修改!");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ afterComplaint.setPurId(list.get(0).getId());
|
|
|
|
|
+ afterComplaint.setPurNumber(list.get(0).getBillCode());
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
if (StringUtils.isNotBlank(code)) {
|
|
if (StringUtils.isNotBlank(code)) {
|
|
|
|
|
|
|
|
QueryWrapper<AfterComplaint> queryWrapper = new QueryWrapper();
|
|
QueryWrapper<AfterComplaint> queryWrapper = new QueryWrapper();
|
|
@@ -182,6 +202,23 @@ public class AfterComplaintController {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ String purNumber = afterComplaint.getPurNumber();
|
|
|
|
|
+ if(StringUtils.isNotBlank(purNumber)){
|
|
|
|
|
+
|
|
|
|
|
+ QueryWrapper<PurOrder> queryWrapper = new QueryWrapper();
|
|
|
|
|
+ queryWrapper.eq("bill_code", purNumber.trim());
|
|
|
|
|
+ queryWrapper.eq("del_flag", "0");
|
|
|
|
|
+
|
|
|
|
|
+ List<PurOrder> list = purOrderService.list(queryWrapper);
|
|
|
|
|
+ if (list.size() == 0) {
|
|
|
|
|
+ return Result.error("采购编码错误,请修改!");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ afterComplaint.setPurId(list.get(0).getId());
|
|
|
|
|
+ afterComplaint.setPurNumber(list.get(0).getBillCode());
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
afterComplaintService.updateMain(afterComplaint, afterComplaintPage.getAfterComplaintShipList(), afterComplaintPage.getAfterComplaintProductList());
|
|
afterComplaintService.updateMain(afterComplaint, afterComplaintPage.getAfterComplaintShipList(), afterComplaintPage.getAfterComplaintProductList());
|
|
|
return Result.OK("编辑成功!");
|
|
return Result.OK("编辑成功!");
|
|
|
}
|
|
}
|