相关bug修改

master
anthonywj 2 years ago
parent b9e41a4e08
commit 5ba858a8f4

@ -28,6 +28,7 @@ public class BasicProcessStatus {
public static final int NEW_ALL_DATA = 7; //所有最新数据 public static final int NEW_ALL_DATA = 7; //所有最新数据
public static final int NEW_ALL_BUS = 8; public static final int NEW_ALL_BUS = 8;
public static final String NEW_ALL_ORDER = "9"; public static final String NEW_ALL_ORDER = "9";
public static final String NEW_ALL_BUS_ORDER = "11";
public static final int NEW_ALL_DI = 10; public static final int NEW_ALL_DI = 10;
public static final int SCHEDULE_NORMAL = 1; //常规任务 public static final int SCHEDULE_NORMAL = 1; //常规任务

@ -128,7 +128,7 @@ public class UdiRelevanceController extends BaseController {
} }
List<UdiRelevanceResponse> temps = udiRelevanceService.filterUdiGp(filterUdiRelRequest); List<UdiRelevanceResponse> temps = udiRelevanceService.filterUdiGp(filterUdiRelRequest);
if (temps != null && temps.size() > 0) { if (temps != null && temps.size() > 0) {
filterUdiRelRequest.setUuid(temps.get(0).getUuid()); filterUdiRelRequest.setOriginUuid(temps.get(0).getOriginUuid());
filterUdiRelRequest.setNameCode(null); filterUdiRelRequest.setNameCode(null);
} }
} else { } else {
@ -157,7 +157,7 @@ public class UdiRelevanceController extends BaseController {
filterUdiRelRequest.setNameCode(filterUdiRelRequest.getUnionCode()); filterUdiRelRequest.setNameCode(filterUdiRelRequest.getUnionCode());
List<UdiRelevanceResponse> temps = udiRelevanceService.filterUdiGp(filterUdiRelRequest); List<UdiRelevanceResponse> temps = udiRelevanceService.filterUdiGp(filterUdiRelRequest);
if (temps != null && temps.size() > 0) { if (temps != null && temps.size() > 0) {
filterUdiRelRequest.setUuid(temps.get(0).getUuid()); filterUdiRelRequest.setOriginUuid(temps.get(0).getOriginUuid());
filterUdiRelRequest.setNameCode(null); filterUdiRelRequest.setNameCode(null);
} }
} else { } else {

@ -97,7 +97,7 @@ public class UdiRlSupController extends BaseController {
filterUdiInfoRequest.setNameCode(companyProductRelevanceRequest.getUnionCode()); filterUdiInfoRequest.setNameCode(companyProductRelevanceRequest.getUnionCode());
List<UdiRelevanceResponse> temps = udiRelevanceService.filterUdiGp(filterUdiInfoRequest); List<UdiRelevanceResponse> temps = udiRelevanceService.filterUdiGp(filterUdiInfoRequest);
if (temps != null && temps.size() > 0) { if (temps != null && temps.size() > 0) {
companyProductRelevanceRequest.setUuid(temps.get(0).getUuid()); companyProductRelevanceRequest.setOriginUuid(temps.get(0).getOriginUuid());
companyProductRelevanceRequest.setNameCode(filterUdiInfoRequest.getNameCode()); companyProductRelevanceRequest.setNameCode(filterUdiInfoRequest.getNameCode());
companyProductRelevanceRequest.setUnionCode(null); companyProductRelevanceRequest.setUnionCode(null);
} }

@ -99,26 +99,26 @@ public class SupManufacturerController {
String customerId = getCustomerId(); String customerId = getCustomerId();
supManufacturerEntity.setCustomerId(customerId); supManufacturerEntity.setCustomerId(customerId);
//判断用户名和社会信用代码不能重复 //判断用户名和社会信用代码不能重复
FilterSupManufacturerRequest filterSupManufacturerRequest=new FilterSupManufacturerRequest(); FilterSupManufacturerRequest filterSupManufacturerRequest = new FilterSupManufacturerRequest();
filterSupManufacturerRequest.setCompanyName(supManufacturerEntity.getCompanyName()); filterSupManufacturerRequest.setCompanyName(supManufacturerEntity.getCompanyName());
filterSupManufacturerRequest.setCustomerId(getCustomerId()); filterSupManufacturerRequest.setCustomerId(getCustomerId());
List<SupManufacturerEntity> companyEntities = supManufacturerService.getCompanyByNameAndCode(filterSupManufacturerRequest); List<SupManufacturerEntity> companyEntities = supManufacturerService.getCompanyByNameAndCode(filterSupManufacturerRequest);
if(companyEntities.size()>0){ if (companyEntities.size() > 0) {
return ResultVOUtils.error(999,"企业名称不能重复!"); return ResultVOUtils.error(999, "企业名称不能重复!");
} }
filterSupManufacturerRequest=new FilterSupManufacturerRequest(); filterSupManufacturerRequest = new FilterSupManufacturerRequest();
filterSupManufacturerRequest.setCustomerId(getCustomerId()); filterSupManufacturerRequest.setCustomerId(getCustomerId());
filterSupManufacturerRequest.setCreditCode(supManufacturerEntity.getCreditCode()); filterSupManufacturerRequest.setCreditCode(supManufacturerEntity.getCreditCode());
companyEntities = supManufacturerService.getCompanyByNameAndCode(filterSupManufacturerRequest); companyEntities = supManufacturerService.getCompanyByNameAndCode(filterSupManufacturerRequest);
if(companyEntities.size()>0){ if (companyEntities.size() > 0) {
return ResultVOUtils.error(999,"统一社会信用代码不能重复!"); return ResultVOUtils.error(999, "统一社会信用代码不能重复!");
} }
//提交审核 //提交审核
if (supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE || supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_UN) { if (supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE || supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_UN) {
//判断是否上级供应商是否审核通过 //判断是否上级供应商是否审核通过
SupCompanyEntity supCompanyEntity = supCompanyService.findCompany(supManufacturerEntity.getCustomerId()); SupCompanyEntity supCompanyEntity = supCompanyService.findCompany(supManufacturerEntity.getCustomerId());
if (supCompanyEntity.getAuditStatus()==null || supCompanyEntity.getAuditStatus() != ConstantStatus.AUDIT_PASS if (supCompanyEntity.getAuditStatus() == null || supCompanyEntity.getAuditStatus() != ConstantStatus.AUDIT_PASS
) { ) {
return ResultVOUtils.error(500, "所属配送企业资质未通过审核,暂时无法提交!"); return ResultVOUtils.error(500, "所属配送企业资质未通过审核,暂时无法提交!");
} }
@ -129,27 +129,27 @@ public class SupManufacturerController {
List<SupCertSetEntity> supCertSetEntities = supCertSetService.filterCertSets(filterCertSetsRequest); List<SupCertSetEntity> supCertSetEntities = supCertSetService.filterCertSets(filterCertSetsRequest);
List<SupCertEntity> supCertEntityList = supCertService.findAll(supManufacturerEntity.getCustomerId(), supManufacturerEntity.getManufacturerId()); List<SupCertEntity> supCertEntityList = supCertService.findAll(supManufacturerEntity.getCustomerId(), supManufacturerEntity.getManufacturerId());
//判断存在有草稿的未提交的就不能通过 //判断存在有草稿的未提交的就不能通过
for(SupCertEntity obj:supCertEntityList){ for (SupCertEntity obj : supCertEntityList) {
if (obj.getAuditStatus() == 0.) { if (obj.getAuditStatus() == 0.) {
return ResultVOUtils.error(999,"资质证书存在草稿不能提交!"); return ResultVOUtils.error(999, "资质证书存在草稿不能提交!");
} }
} }
ListIterator<SupCertSetEntity> iterable = supCertSetEntities.listIterator(); ListIterator<SupCertSetEntity> iterable = supCertSetEntities.listIterator();
while (iterable.hasNext()) { while (iterable.hasNext()) {
SupCertSetEntity supCertSetEntity = iterable.next(); SupCertSetEntity supCertSetEntity = iterable.next();
if (( supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 2 if ((supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 2
&& StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2")) && StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2"))
|| ||
( (
supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 1 supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 1
&& StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2")) && StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2"))
|| ||
( supCertSetEntity.getForeign() != null (supCertSetEntity.getForeign() != null
&& supCertSetEntity.getForeign() == 1 && supCertSetEntity.getForeign() == 1
&& supManufacturerEntity.getCompanyType().equals("1")) && supManufacturerEntity.getCompanyType().equals("1"))
|| ||
( supCertSetEntity.getForeign() != null (supCertSetEntity.getForeign() != null
&& supCertSetEntity.getForeign() == 3 && supCertSetEntity.getForeign() == 3
&& supManufacturerEntity.getCompanyType().equals("1"))) { && supManufacturerEntity.getCompanyType().equals("1"))) {
for (SupCertEntity supCertEntity : supCertEntityList) { for (SupCertEntity supCertEntity : supCertEntityList) {
@ -197,22 +197,22 @@ public class SupManufacturerController {
if (StrUtil.isEmpty(supManufacturerEntity.getManufacturerId()) || StrUtil.isEmpty(supManufacturerEntity.getCustomerId())) { if (StrUtil.isEmpty(supManufacturerEntity.getManufacturerId()) || StrUtil.isEmpty(supManufacturerEntity.getCustomerId())) {
return ResultVOUtils.error(500, "参数错误!"); return ResultVOUtils.error(500, "参数错误!");
} }
if(supManufacturerEntity.getId()==0){//新增 if (supManufacturerEntity.getId() == 0) {//新增
//判断用户名和社会信用代码不能重复 //判断用户名和社会信用代码不能重复
FilterSupManufacturerRequest filterSupManufacturerRequest=new FilterSupManufacturerRequest(); FilterSupManufacturerRequest filterSupManufacturerRequest = new FilterSupManufacturerRequest();
filterSupManufacturerRequest.setCompanyName(supManufacturerEntity.getCompanyName()); filterSupManufacturerRequest.setCompanyName(supManufacturerEntity.getCompanyName());
filterSupManufacturerRequest.setCustomerId(getCustomerId()); filterSupManufacturerRequest.setCustomerId(getCustomerId());
List<SupManufacturerEntity> companyEntities = supManufacturerService.getCompanyByNameAndCode(filterSupManufacturerRequest); List<SupManufacturerEntity> companyEntities = supManufacturerService.getCompanyByNameAndCode(filterSupManufacturerRequest);
if(companyEntities.size()>0){ if (companyEntities.size() > 0) {
return ResultVOUtils.error(999,"企业名称不能重复!"); return ResultVOUtils.error(999, "企业名称不能重复!");
} }
filterSupManufacturerRequest=new FilterSupManufacturerRequest(); filterSupManufacturerRequest = new FilterSupManufacturerRequest();
filterSupManufacturerRequest.setCustomerId(getCustomerId()); filterSupManufacturerRequest.setCustomerId(getCustomerId());
filterSupManufacturerRequest.setCreditCode(supManufacturerEntity.getCreditCode()); filterSupManufacturerRequest.setCreditCode(supManufacturerEntity.getCreditCode());
companyEntities = supManufacturerService.getCompanyByNameAndCode(filterSupManufacturerRequest); companyEntities = supManufacturerService.getCompanyByNameAndCode(filterSupManufacturerRequest);
if(companyEntities.size()>0){ if (companyEntities.size() > 0) {
return ResultVOUtils.error(999,"统一社会信用代码不能重复!"); return ResultVOUtils.error(999, "统一社会信用代码不能重复!");
} }
} }
//提交审核 //提交审核
@ -231,27 +231,27 @@ public class SupManufacturerController {
List<SupCertSetEntity> supCertSetEntities = supCertSetService.filterCertSets(filterCertSetsRequest); List<SupCertSetEntity> supCertSetEntities = supCertSetService.filterCertSets(filterCertSetsRequest);
List<SupCertEntity> supCertEntityList = supCertService.findAll(supManufacturerEntity.getCustomerId(), supManufacturerEntity.getManufacturerId()); List<SupCertEntity> supCertEntityList = supCertService.findAll(supManufacturerEntity.getCustomerId(), supManufacturerEntity.getManufacturerId());
//判断存在有草稿的未提交的就不能通过 //判断存在有草稿的未提交的就不能通过
for(SupCertEntity obj:supCertEntityList){ for (SupCertEntity obj : supCertEntityList) {
if (obj.getAuditStatus() == 0.) { if (obj.getAuditStatus() == 0.) {
return ResultVOUtils.error(999,"资质证书存在草稿不能提交!"); return ResultVOUtils.error(999, "资质证书存在草稿不能提交!");
} }
} }
ListIterator<SupCertSetEntity> iterable = supCertSetEntities.listIterator(); ListIterator<SupCertSetEntity> iterable = supCertSetEntities.listIterator();
while (iterable.hasNext()) { while (iterable.hasNext()) {
SupCertSetEntity supCertSetEntity = iterable.next(); SupCertSetEntity supCertSetEntity = iterable.next();
if (( supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 2 if ((supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 2
&& StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2")) && StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2"))
|| ||
( (
supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 1 supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 1
&& StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2")) && StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2"))
|| ||
( supCertSetEntity.getForeign() != null (supCertSetEntity.getForeign() != null
&& supCertSetEntity.getForeign() == 1 && supCertSetEntity.getForeign() == 1
&& supManufacturerEntity.getCompanyType().equals("1")) && supManufacturerEntity.getCompanyType().equals("1"))
|| ||
( supCertSetEntity.getForeign() != null (supCertSetEntity.getForeign() != null
&& supCertSetEntity.getForeign() == 3 && supCertSetEntity.getForeign() == 3
&& supManufacturerEntity.getCompanyType().equals("1"))) { && supManufacturerEntity.getCompanyType().equals("1"))) {
for (SupCertEntity supCertEntity : supCertEntityList) { for (SupCertEntity supCertEntity : supCertEntityList) {
@ -305,8 +305,7 @@ public class SupManufacturerController {
} }
if (supManufacturerEntity.getAuditStatus() == 1 || supManufacturerEntity.getAuditStatus() == 4) {
if(supManufacturerEntity.getAuditStatus()==1 || supManufacturerEntity.getAuditStatus()==4){
//查询上传的资质证书 //查询上传的资质证书
FilterSupCertRequest filterSupCertRequest = new FilterSupCertRequest(); FilterSupCertRequest filterSupCertRequest = new FilterSupCertRequest();
filterSupCertRequest.setCustomerId(supManufacturerEntity.getCustomerId()); filterSupCertRequest.setCustomerId(supManufacturerEntity.getCustomerId());
@ -322,18 +321,18 @@ public class SupManufacturerController {
while (iterable.hasNext()) { while (iterable.hasNext()) {
SupCertSetEntity supCertSetEntity = iterable.next(); SupCertSetEntity supCertSetEntity = iterable.next();
if (( supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 2 if ((supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 2
&& StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2")) && StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2"))
|| ||
( (
supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 1 supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 1
&& StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2")) && StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2"))
|| ||
( supCertSetEntity.getForeign() != null (supCertSetEntity.getForeign() != null
&& supCertSetEntity.getForeign() == 1 && supCertSetEntity.getForeign() == 1
&& supManufacturerEntity.getCompanyType().equals("1")) && supManufacturerEntity.getCompanyType().equals("1"))
|| ||
( supCertSetEntity.getForeign() != null (supCertSetEntity.getForeign() != null
&& supCertSetEntity.getForeign() == 3 && supCertSetEntity.getForeign() == 3
&& supManufacturerEntity.getCompanyType().equals("1"))) { && supManufacturerEntity.getCompanyType().equals("1"))) {
for (SupCertEntity supCertEntity : supCertEntityList) { for (SupCertEntity supCertEntity : supCertEntityList) {
@ -355,7 +354,7 @@ public class SupManufacturerController {
} }
} }
String msg=""; String msg = "";
// 查询是否包含审核未通过的证书 // 查询是否包含审核未通过的证书
if (supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_PASS || if (supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_PASS ||
supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE_PASS) { supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE_PASS) {
@ -367,9 +366,10 @@ public class SupManufacturerController {
List<SupCertEntity> supCertEntityList = supCertService.filterCompanyCert(filterSupCertRequest); List<SupCertEntity> supCertEntityList = supCertService.filterCompanyCert(filterSupCertRequest);
if (CollUtil.isNotEmpty(supCertEntityList)) { if (CollUtil.isNotEmpty(supCertEntityList)) {
for (SupCertEntity supCertEntity : supCertEntityList) { for (SupCertEntity supCertEntity : supCertEntityList) {
msg+=supCertEntity.getName()+","; msg += supCertEntity.getName() + ",";
} }
return ResultVOUtils.error(500, "审核失败,还有必须提交证书未确认(" + msg.substring(0,msg.length()-1) + ")"); } return ResultVOUtils.error(500, "审核失败,还有必须提交证书未确认(" + msg.substring(0, msg.length() - 1) + ")");
}
} }
supManufacturerEntity.setUpdateTime(new Date()); supManufacturerEntity.setUpdateTime(new Date());

@ -8,16 +8,22 @@ import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.BasicProcessStatus; import com.glxp.api.constant.BasicProcessStatus;
import com.glxp.api.constant.Constant; import com.glxp.api.constant.Constant;
import com.glxp.api.constant.ConstantStatus; import com.glxp.api.constant.ConstantStatus;
import com.glxp.api.controller.purchase.PurOrderController;
import com.glxp.api.dao.inout.IoCodeTempDao; import com.glxp.api.dao.inout.IoCodeTempDao;
import com.glxp.api.dao.inout.IoOrderDao; import com.glxp.api.dao.inout.IoOrderDao;
import com.glxp.api.dao.inout.IoOrderDetailBizDao; import com.glxp.api.dao.inout.IoOrderDetailBizDao;
import com.glxp.api.dao.inout.IoOrderDetailCodeDao; import com.glxp.api.dao.inout.IoOrderDetailCodeDao;
import com.glxp.api.dao.purchase.PurOrderDao;
import com.glxp.api.dao.purchase.PurOrderDetailDao;
import com.glxp.api.entity.inout.*; import com.glxp.api.entity.inout.*;
import com.glxp.api.entity.purchase.PurOrderDetailEntity;
import com.glxp.api.entity.purchase.PurOrderEntity;
import com.glxp.api.entity.sync.BasicDownloadStatusEntity; import com.glxp.api.entity.sync.BasicDownloadStatusEntity;
import com.glxp.api.entity.sync.BasicExportStatusEntity; import com.glxp.api.entity.sync.BasicExportStatusEntity;
import com.glxp.api.entity.sync.SyncDataBustypeEntity; import com.glxp.api.entity.sync.SyncDataBustypeEntity;
import com.glxp.api.entity.sync.SyncDataSetEntity; import com.glxp.api.entity.sync.SyncDataSetEntity;
import com.glxp.api.req.sync.SpsSyncDataRequest; import com.glxp.api.req.sync.SpsSyncDataRequest;
import com.glxp.api.res.sync.SpsSyncBusOrderResponse;
import com.glxp.api.res.sync.SpsSyncOrderResponse; import com.glxp.api.res.sync.SpsSyncOrderResponse;
import com.glxp.api.res.system.SyncDataSetResponse; import com.glxp.api.res.system.SyncDataSetResponse;
import com.glxp.api.service.inout.IoOrderService; import com.glxp.api.service.inout.IoOrderService;
@ -166,5 +172,67 @@ public class SpsSyncDownloadController {
} }
// 接收中级服务UDI管理系统上传业务单据
@AuthRuleAnnotation("/sps/sync/busOrder/upload")
@PostMapping("/sps/sync/busOrder/upload")
public BaseResponse busOrderSava(@RequestBody @Valid SpsSyncBusOrderResponse spsSyncBusOrderResponse) {
BasicDownloadStatusEntity basicDownloadStatusEntity = new BasicDownloadStatusEntity();
basicDownloadStatusEntity.setId(CustomUtil.getId());
basicDownloadStatusEntity.setTaskId(spsSyncBusOrderResponse.getTaskId());
basicDownloadStatusEntity.setStartTime(new Date());
basicDownloadStatusEntity.setIdDatas(ConstantStatus.SYNC_DOWNLOAD_SCAN_ORDER);
basicDownloadStatusEntity.setStatus(ConstantStatus.SYNC_STATUS_WAIT); //下载中
basicDownloadStatusEntity.setType(BasicProcessStatus.NEW_ALL_BUS_ORDER);
basicDownloadStatusEntity.setScheduleType(1);
basicDownloadService.insertDownloadStatus(basicDownloadStatusEntity);
StringBuffer remark = new StringBuffer();
SqlSession batchSession = sqlSessionFactory.openSession(ExecutorType.BATCH, TransactionIsolationLevel.READ_COMMITTED);
if (CollUtil.isNotEmpty(spsSyncBusOrderResponse.getPurOrderEntities())) {
try {
List<PurOrderEntity> orderEntities = spsSyncBusOrderResponse.getPurOrderEntities();
PurOrderDao mapper = batchSession.getMapper(PurOrderDao.class);
for (PurOrderEntity orderEntity : orderEntities) {
orderEntity.setUpdateTime(null);
IoOrderEntity temp = orderService.findById(orderEntity.getBillNo());
if (temp == null) {
orderEntity.setId(null);
mapper.insert(orderEntity);
if (CollUtil.isNotEmpty(spsSyncBusOrderResponse.getPurOrderDetailEntities())) {
PurOrderDetailDao codeMappert = batchSession.getMapper(PurOrderDetailDao.class);
List<PurOrderDetailEntity> warehouseEntityList = spsSyncBusOrderResponse.getPurOrderDetailEntities();
for (PurOrderDetailEntity warehouseEntity : warehouseEntityList) {
PurOrderDetailEntity codeTempEntity = new PurOrderDetailEntity();
BeanUtils.copyProperties(warehouseEntity, codeTempEntity);
codeTempEntity.setId(null);
codeMappert.insert(codeTempEntity);
}
}
batchSession.commit();
}
}
batchSession.commit();
String logs = "";
if (CollUtil.isNotEmpty(spsSyncBusOrderResponse.getPurOrderEntities()))
logs = logs + "单据:" + spsSyncBusOrderResponse.getPurOrderEntities().size() + "条\n";
if (CollUtil.isNotEmpty(spsSyncBusOrderResponse.getPurOrderDetailEntities()))
logs = logs + "单据详情:" + spsSyncBusOrderResponse.getPurOrderDetailEntities().size() + "条\n";
remark.append(logs);
} catch (Exception e) {
e.printStackTrace();
}
}
batchSession.close();
basicDownloadStatusEntity.setUpdateTime(new Date());
basicDownloadStatusEntity.setEndTime(new Date());
basicDownloadStatusEntity.setRemark(remark.toString());
basicDownloadStatusEntity.setStatus(ConstantStatus.SYNC_STATUS_SUCCESS);
basicDownloadService.updateDownloadStatus(basicDownloadStatusEntity);
return ResultVOUtils.success("上传成功!");
}
} }

@ -105,4 +105,35 @@ public class InvProductEntity {
@TableField(value = "updateTime") @TableField(value = "updateTime")
private Date updateTime; private Date updateTime;
/**
*
*/
@TableField(value = "nowStock")
private Integer nowStock;
/**
*
*/
@TableField(value = "frozenCount")
private Integer frozenCount;
/**
*
*/
@TableField(value = "planInCount")
private Integer planInCount;
/**
*
*/
@TableField(value = "planOutCount")
private Integer planOutCount;
/**
*
*/
@TableField(value = "onWayCount")
private Integer onWayCount;
/**
*
*/
@TableField(value = "availableStock")
private Integer availableStock;
} }

@ -11,6 +11,7 @@ public class CompanyProductRelevanceRequest extends ListPageRequest {
private String cpmctymc; private String cpmctymc;
private String nameCode; private String nameCode;
private String uuid; private String uuid;
private String originUuid;
private String ggxh; private String ggxh;
private String thirdId; private String thirdId;
private String id; private String id;

@ -12,6 +12,7 @@ public class FilterUdiRelRequest extends ListPageRequest {
private String cpmctymc; private String cpmctymc;
private String nameCode; private String nameCode;
private String uuid; private String uuid;
private String originUuid;
private String ggxh; private String ggxh;
private String thirdId; private String thirdId;
private Long id; private Long id;
@ -56,7 +57,6 @@ public class FilterUdiRelRequest extends ListPageRequest {
private String uniqueNameCode; private String uniqueNameCode;
private String supName; private String supName;
private String unitFk; private String unitFk;
private String originUuid;
private String relId; private String relId;
private String companyName; private String companyName;

@ -0,0 +1,16 @@
package com.glxp.api.res.sync;
import com.glxp.api.entity.purchase.PurOrderDetailEntity;
import com.glxp.api.entity.purchase.PurOrderEntity;
import lombok.Data;
import java.util.List;
@Data
public class SpsSyncBusOrderResponse {
private String taskId;
private List<PurOrderEntity> purOrderEntities;
private List<PurOrderDetailEntity> purOrderDetailEntities;
}

@ -17,6 +17,4 @@ public class SpsSyncOrderResponse {
List<IoOrderDetailResultEntity> orderDetailResultEntities; List<IoOrderDetailResultEntity> orderDetailResultEntities;
} }

@ -4,9 +4,9 @@ server:
spring: spring:
datasource: datasource:
driver-class-name: com.p6spy.engine.spy.P6SpyDriver driver-class-name: com.p6spy.engine.spy.P6SpyDriver
jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_spms?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true jdbc-url: jdbc:p6spy:mysql://192.168.0.66:3364/udi_spms_wmd?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: root username: root
password: 123456 password: Glxp@6066
hikari: hikari:
connection-timeout: 60000 connection-timeout: 60000
maximum-pool-size: 20 maximum-pool-size: 20

@ -2,45 +2,42 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.api.dao.basic.CompanyProductRelevanceDao"> <mapper namespace="com.glxp.api.dao.basic.CompanyProductRelevanceDao">
<insert id="insertCompanyProductRelevance" <insert id="insertCompanyProductRelevance"
parameterType="com.glxp.api.entity.basic.CompanyProductRelevanceEntity"> parameterType="com.glxp.api.entity.basic.CompanyProductRelevanceEntity">
replace replace
INTO company_product_relevance(customerId,productId,enterpriseId,registrationId, INTO company_product_relevance(customerId, productId, enterpriseId, registrationId,
createTime,updateTime,auditStatus,productUuid,udiRlIdFk,unitFk,price) values createTime, updateTime, auditStatus, productUuid, udiRlIdFk, unitFk,
( price)
#{customerId}, values (#{customerId},
#{productId}, #{productId},
#{enterpriseId}, #{enterpriseId},
#{registrationId}, #{registrationId},
#{createTime}, #{createTime},
#{updateTime}, #{updateTime},
#{auditStatus}, #{auditStatus},
#{productUuid}, #{productUuid},
#{udiRlIdFk}, #{udiRlIdFk},
#{unitFk},#{price} #{unitFk}, #{price})
)
</insert> </insert>
<insert id="importCompanyProductRelevance" <insert id="importCompanyProductRelevance"
parameterType="com.glxp.api.entity.basic.CompanyProductRelevanceEntity"> parameterType="com.glxp.api.entity.basic.CompanyProductRelevanceEntity">
replace replace
INTO company_product_relevance(id,customerId,productId,enterpriseId,registrationId, INTO company_product_relevance(id, customerId, productId, enterpriseId, registrationId,
create_time,update_time,auditStatus,productUuid,udiRlIdFk,unitFk,price) values create_time, update_time, auditStatus, productUuid, udiRlIdFk, unitFk,
( price)
#{id}, values (#{id},
#{customerId}, #{customerId},
#{productId}, #{productId},
#{enterpriseId}, #{enterpriseId},
#{registrationId}, #{registrationId},
#{create_time}, #{create_time},
#{update_time}, #{update_time},
#{auditStatus}, #{auditStatus},
#{productUuid}, #{productUuid},
#{udiRlIdFk}, #{udiRlIdFk},
#{unitFk},#{price} #{unitFk}, #{price})
)
</insert> </insert>
<delete id="deleteById" parameterType="Map"> <delete id="deleteById" parameterType="Map">
@ -58,101 +55,99 @@
<select id="filterUdiGp" parameterType="com.glxp.api.req.basic.CompanyProductRelevanceRequest" <select id="filterUdiGp" parameterType="com.glxp.api.req.basic.CompanyProductRelevanceRequest"
resultType="com.glxp.api.res.basic.CompanyProductRelevanceResponse"> resultType="com.glxp.api.res.basic.CompanyProductRelevanceResponse">
SELECT SELECT company_product_relevance.id,
company_product_relevance.id, company_product_relevance.customerId,
company_product_relevance.customerId, company_product_relevance.auditStatus,
company_product_relevance.auditStatus, basic_udirel.thirdId,
basic_udirel.thirdId, basic_udirel.id rlId,
basic_udirel.id rlId, basic_udirel.isUseDy,
basic_udirel.isUseDy, basic_udirel.isLock,
basic_udirel.isLock, basic_udirel.thirdId1,
basic_udirel.thirdId1, basic_udirel.thirdId2,
basic_udirel.thirdId2, basic_udirel.thirdId3,
basic_udirel.thirdId3, basic_udirel.thirdId4,
basic_udirel.thirdId4, basic_udirel.lockStatus,
basic_udirel.lockStatus, basic_products.allowNoBatch,
basic_products.allowNoBatch, basic_products.allowNoExpire,
basic_products.allowNoExpire, basic_products.allowNoProduct,
basic_products.allowNoProduct, basic_products.allowNoSerial,
basic_products.allowNoSerial, basic_products.productType,
basic_products.productType, basic_products.nameCode,
basic_products.nameCode, basic_products.packRatio,
basic_products.packRatio, basic_products.packLevel,
basic_products.packLevel, basic_products.bhxjsl,
basic_products.bhxjsl, basic_products.bhzxxsbzsl,
basic_products.bhzxxsbzsl, basic_products.zxxsbzbhsydysl,
basic_products.zxxsbzbhsydysl, basic_products.bhxjcpbm,
basic_products.bhxjcpbm, basic_products.bzcj,
basic_products.bzcj, basic_udirel.isDisable,
basic_udirel.isDisable, basic_products.deviceRecordKey,
basic_products.deviceRecordKey, basic_products.cpmctymc,
basic_products.cpmctymc, basic_products.cplb,
basic_products.cplb, basic_products.flbm,
basic_products.flbm, basic_products.ggxh,
basic_products.ggxh, basic_products.qxlb,
basic_products.qxlb, basic_products.tyshxydm,
basic_products.tyshxydm, basic_products.ylqxzcrbarmc,
basic_products.ylqxzcrbarmc, basic_products.zczbhhzbapzbh,
basic_products.zczbhhzbapzbh, basic_products.ylqxzcrbarywmc,
basic_products.ylqxzcrbarywmc, basic_products.sydycpbs,
basic_products.sydycpbs, basic_products.uuid,
basic_products.uuid, basic_products.sjcpbm,
basic_products.sjcpbm, basic_products.versionNumber,
basic_products.versionNumber, basic_products.diType,
basic_products.diType, customer_info.companyName,
customer_info.companyName, basic_udirel.mainId,
basic_udirel.mainId, basic_udirel.isAdavence,
basic_udirel.isAdavence, basic_products.scbssfbhph,
basic_products.scbssfbhph, basic_products.scbssfbhxlh,
basic_products.scbssfbhxlh, basic_products.scbssfbhscrq,
basic_products.scbssfbhscrq, basic_products.cpdls,
basic_products.cpdls, basic_products.scbssfbhsxrq,
basic_products.scbssfbhsxrq, basic_products.cpms,
basic_products.cpms, basic_products.originUuid,
basic_products.originUuid, company_product_relevance.price,
company_product_relevance.price, basic_products.spmc,
basic_products.spmc, basic_products.basicPrductRemak1,
basic_products.basicPrductRemak1, basic_products.basicPrductRemak2,
basic_products.basicPrductRemak2, basic_products.basicPrductRemak3,
basic_products.basicPrductRemak3, basic_products.basicPrductRemak4,
basic_products.basicPrductRemak4, basic_products.basicPrductRemak5,
basic_products.basicPrductRemak5, basic_products.basicPrductRemak6,
basic_products.basicPrductRemak6, basic_products.basicPrductRemak7,
basic_products.basicPrductRemak7, basic_products.basicPrductRemak8
basic_products.basicPrductRemak8 FROM company_product_relevance
FROM INNER JOIN basic_udirel ON company_product_relevance.udiRlIdFk = basic_udirel.id
company_product_relevance INNER JOIN basic_products ON basic_udirel.uuid = basic_products.uuid
INNER JOIN basic_udirel ON company_product_relevance.udiRlIdFk = basic_udirel.id INNER JOIN customer_info ON customer_info.customerId = company_product_relevance.customerId
INNER JOIN basic_products ON basic_udirel.uuid = basic_products.uuid
INNER JOIN customer_info ON customer_info.customerId = company_product_relevance.customerId
<where> <where>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null"> <if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
AND ylqxzcrbarmc LIKE concat(#{ylqxzcrbarmc},'%') AND ylqxzcrbarmc LIKE concat(#{ylqxzcrbarmc}, '%')
</if> </if>
<if test="cpmctymc != '' and cpmctymc != null"> <if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat(#{cpmctymc},'%') AND cpmctymc LIKE concat(#{cpmctymc}, '%')
</if> </if>
<if test="nameCode != '' and nameCode != null"> <if test="nameCode != '' and nameCode != null">
AND nameCode LIKE concat(#{nameCode},'%') AND nameCode LIKE concat(#{nameCode}, '%')
</if> </if>
<if test="ggxh != '' and ggxh != null"> <if test="ggxh != '' and ggxh != null">
AND ggxh LIKE concat('%',#{ggxh},'%') AND ggxh LIKE concat('%', #{ggxh}, '%')
</if> </if>
<if test="unionCode != '' and unionCode != null"> <if test="unionCode != '' and unionCode != null">
and ( and (
nameCode LIKE concat('%',#{unionCode},'%') nameCode LIKE concat('%', #{unionCode}, '%')
or basic_products.ybbm LIKE concat('%',#{unionCode},'%') or basic_products.ybbm LIKE concat('%', #{unionCode}, '%')
or basic_products.sptm LIKE concat('%',#{unionCode},'%') or basic_products.sptm LIKE concat('%', #{unionCode}, '%')
) )
</if> </if>
<if test="thrPiId != '' and thrPiId != null"> <if test="thrPiId != '' and thrPiId != null">
and ( and (
thirdId LIKE concat('%',#{thrPiId},'%') thirdId LIKE concat('%', #{thrPiId}, '%')
or thirdId1 LIKE concat('%',#{thrPiId},'%') or thirdId1 LIKE concat('%', #{thrPiId}, '%')
or thirdId2 LIKE concat('%',#{thrPiId},'%') or thirdId2 LIKE concat('%', #{thrPiId}, '%')
or thirdId3 LIKE concat('%',#{thrPiId},'%') or thirdId3 LIKE concat('%', #{thrPiId}, '%')
or thirdId4 LIKE concat('%',#{thrPiId},'%') or thirdId4 LIKE concat('%', #{thrPiId}, '%')
) )
</if> </if>
<if test="uuid != '' and uuid != null"> <if test="uuid != '' and uuid != null">
AND basic_udirel.uuid = #{uuid} AND basic_udirel.uuid = #{uuid}
@ -161,33 +156,38 @@
AND thirdId = #{thirdId} AND thirdId = #{thirdId}
</if> </if>
<if test="zczbhhzbapzbh != '' and zczbhhzbapzbh != null"> <if test="zczbhhzbapzbh != '' and zczbhhzbapzbh != null">
AND zczbhhzbapzbh LIKE concat(#{zczbhhzbapzbh},'%') AND zczbhhzbapzbh LIKE concat(#{zczbhhzbapzbh}, '%')
</if> </if>
<if test="diType != '' and diType != null"> <if test="diType != '' and diType != null">
AND diType =#{diType} AND diType = #{diType}
</if> </if>
<if test="filterType != null and filterType == 1"> <if test="filterType != null and filterType == 1">
AND (thirdId <![CDATA[<>]]> '' or thirdId1 <![CDATA[<>]]> '' or thirdId2 <![CDATA[<>]]> '' or AND (thirdId <![CDATA[<>]]> '' or thirdId1 <![CDATA[<>]]> '' or thirdId2 <![CDATA[<>]]> '' or
thirdId3 <![CDATA[<>]]> '' or thirdId4 <![CDATA[<>]]> '' ) thirdId3 <![CDATA[<>]]> '' or thirdId4 <![CDATA[<>]]> '')
and basic_products.originUuid <![CDATA[<>]]> '' and basic_products.originUuid <![CDATA[<>]]> ''
</if> </if>
<if test="filterType != null and filterType == 2"> <if test="filterType != null and filterType == 2">
AND basic_products.originUuid is NULL AND basic_products.originUuid is NULL
</if> </if>
<if test="filterType != null and filterType == 3"> <if test="filterType != null and filterType == 3">
AND mainId is NULL and basic_products.originUuid <![CDATA[<>]]> '' AND mainId is NULL
and basic_products.originUuid <![CDATA[<>]]> ''
</if> </if>
<if test="filterType != null and filterType == 4"> <if test="filterType != null and filterType == 4">
AND thirdId1 is NULL and basic_products.flbm <![CDATA[<>]]> '' AND thirdId1 is NULL
and basic_products.flbm <![CDATA[<>]]> ''
</if> </if>
<if test="filterType != null and filterType == 5"> <if test="filterType != null and filterType == 5">
AND thirdId2 is NULL and basic_products.flbm <![CDATA[<>]]> '' AND thirdId2 is NULL
and basic_products.flbm <![CDATA[<>]]> ''
</if> </if>
<if test="filterType != null and filterType == 6"> <if test="filterType != null and filterType == 6">
AND thirdId3 is NULL and basic_products.flbm <![CDATA[<>]]> '' AND thirdId3 is NULL
and basic_products.flbm <![CDATA[<>]]> ''
</if> </if>
<if test="filterType != null and filterType == 7"> <if test="filterType != null and filterType == 7">
AND thirdId4 is NULL and basic_products.flbm <![CDATA[<>]]> '' AND thirdId4 is NULL
and basic_products.flbm <![CDATA[<>]]> ''
</if> </if>
<if test="filterType != null and filterType == 10"> <if test="filterType != null and filterType == 10">
AND basic_udirel.updateTime is NULL AND basic_udirel.updateTime is NULL
@ -214,11 +214,13 @@
<if test="unitFk != null and unitFk != ''"> <if test="unitFk != null and unitFk != ''">
and unitFk = #{unitFk} and unitFk = #{unitFk}
</if> </if>
<if test="originUuid != null and originUuid != ''">
and originUuid = #{originUuid}
</if>
<if test="isDisable == false"> <if test="isDisable == false">
AND (basic_udirel.isDisable is null or basic_udirel.isDisable = false ) AND (basic_udirel.isDisable is null or basic_udirel.isDisable = false)
</if> </if>
</where> </where>
ORDER BY company_product_relevance.updateTime DESC ORDER BY company_product_relevance.updateTime DESC
</select> </select>
</mapper> </mapper>

@ -404,6 +404,9 @@
<if test="id != '' and id != null"> <if test="id != '' and id != null">
AND basic_udirel.id = #{id} AND basic_udirel.id = #{id}
</if> </if>
<if test="originUuid != null and originUuid != ''">
and originUuid = #{originUuid}
</if>
</where> </where>
ORDER BY modifyTime DESC ORDER BY modifyTime DESC
</select> </select>

@ -127,3 +127,13 @@ INSERT ignore INTO `sys_scheduled`(`id`, `cronName`, `cron`, `customerId`, `rema
VALUES (100, 'clean_log_task', '0 0 2 1/1 * ? ', NULL, '删除日志数据'); VALUES (100, 'clean_log_task', '0 0 2 1/1 * ? ', NULL, '删除日志数据');
CALL Pro_Temp_ColumnWork('inv_product', 'nowStock', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_product', 'frozenCount', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_product', 'planInCount', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_product', 'planOutCount', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_product', 'onWayCount', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_product', 'availableStock', 'int ', 1);

Loading…
Cancel
Save