bug修复

master
anthonywj 4 years ago
parent bcdf535bed
commit 535e7be486

@ -22,6 +22,11 @@ public class ThrInvProductsEntity {
private String spaceName;
private String thirdSysFk;
private Date updateTime;
private String manufactory;
private String code;
private String name;
}

@ -22,4 +22,10 @@ public class ErpOnhandRequest extends ListPageRequest {
private Boolean isDownThrSys;
List<ErpInvProductResponse> thrInvProductsEntities;
private String spec;
private String registerCertNo;
private String manufactory;
}

@ -20,4 +20,10 @@ public class FilterThrInvProductsRequest extends ListPageRequest {
private String nameCode;
private String thirdSys;
List<ErpInvProductResponse> erpInvProductResponses;
private String spec;
private String registerCertNo;
private String manufactory;
}

@ -18,4 +18,5 @@ public class ErpInvProductResponse {
private String thirdSysFk;
private String spec;
private Integer count;
private String manufactory;
}

@ -46,7 +46,7 @@ public class ThrInvProductsDlService {
@Async
public void importSelcyInvProducrs(String genKey,String thirdSys, List<ErpInvProductResponse> erpInvProductResponses) {
public void importSelcyInvProducrs(String genKey, String thirdSys, List<ErpInvProductResponse> erpInvProductResponses) {
ThrInvProductsImportLogEntity thrInvProductsImportLogEntity = thrInvProductsImportLogService.selectByGenKey(genKey);
BasicThirdSysDetailEntity piDetailEntity = basicThirdSysDetailService.selectByKey("invPiUrl", thirdSys);
if (piDetailEntity == null || piDetailEntity.getValue() == null) {
@ -92,7 +92,7 @@ public class ThrInvProductsDlService {
@Async
public void importProducrs(String genKey,String thirdSys, ErpOnhandRequest erpOnhandRequest) {
public void importProducrs(String genKey, String thirdSys, ErpOnhandRequest erpOnhandRequest) {
BasicThirdSysDetailEntity piDetailEntity = basicThirdSysDetailService.selectByKey("invPiUrl", thirdSys);
if (piDetailEntity == null || piDetailEntity.getValue() == null) {
WebSocketServer.sendInfo("库存产品信息接口未设置!", "sid");
@ -141,6 +141,11 @@ public class ThrInvProductsDlService {
//选中导出
if (thrInvProductsExportRequest.getThrInvProductsEntities() != null && thrInvProductsExportRequest.getThrInvProductsEntities().size() > 0) {
List<ThrInvProductsEntity> thrInvProductsEntities = thrInvProductsExportRequest.getThrInvProductsEntities();
for (ThrInvProductsEntity thrInvProductsEntity : thrInvProductsEntities) {
thrInvProductsEntity.setInventoryCode(thrInvProductsEntity.getCode());
thrInvProductsEntity.setInventoryName(thrInvProductsEntity.getName());
}
excelData.addAll(getRows(thrInvProductsEntities));
} else {//一键导出
//判断是否启用实时获取
@ -258,7 +263,7 @@ public class ThrInvProductsDlService {
}
public List<ThrInvProductsEntity> exportInvProducts(FilterThrInvProductsRequest filterThrInvProductsRequest) {
BasicThirdSysDetailEntity basicThirdSysDetailEntity = basicThirdSysDetailService.selectByKey("invPiUrl", filterThrInvProductsRequest.getThirdSysFk());
BasicThirdSysDetailEntity basicThirdSysDetailEntity = basicThirdSysDetailService.selectByKey("invPiUrl", filterThrInvProductsRequest.getThirdSys());
int page = 1;
int limit = 100;
List<ThrInvProductsEntity> thrInvProductsEntities = new ArrayList<>();
@ -292,6 +297,8 @@ public class ThrInvProductsDlService {
item -> {
ThrInvProductsEntity thrProductsEntity = new ThrInvProductsEntity();
BeanUtils.copyProperties(item, thrProductsEntity);
thrProductsEntity.setInventoryCode(item.getCode());
thrProductsEntity.setInventoryName(item.getName());
return thrProductsEntity;
}
).collect(Collectors.toList());

@ -13,7 +13,7 @@ public class FilterUdiUtils {
public static UdiEntity getUdi(String data) {
if (data != null && data.length() > 2) {
if (data.substring(0, 2).equals("MA")) {
if (data.substring(0, 2).toUpperCase().equals("MA")) {
return getZGCUdi(data);
} else if (data.substring(0, 2).equals("01")) {
return getGS1Udi(data);

@ -1,11 +1,11 @@
# 本地环境
server.port=9991
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.jdbc-url=jdbc:mysql://127.0.0.1:3306/udiwms?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
#spring.datasource.jdbc-url=jdbc:mysql://127.0.0.1:3306/udiwms_new?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
#spring.datasource.jdbc-url=jdbc:mysql://127.0.0.1:3306/udiwms?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
spring.datasource.jdbc-url=jdbc:mysql://127.0.0.1:3306/udiwms_new?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
spring.datasource.username=root
spring.datasource.password=123456
#spring.datasource.password=root
#spring.datasource.password=123456
spring.datasource.password=root
server.servlet.context-path=
logging.level.com.glxp.api.admin.dao=debug

@ -13,8 +13,17 @@
<if test="inventoryName != '' and inventoryName != null">
AND inventoryName LIKE concat(#{inventoryName},'%')
</if>
<if test="thirdSysFk != '' and thirdSysFk != null">
AND thirdSysFk = #{thirdSysFk}
<if test="inventoryName != '' and inventoryName != null">
AND inventoryName LIKE concat(#{inventoryName},'%')
</if>
<if test="spec != '' and spec != null">
AND spec LIKE concat(#{spec},'%')
</if>
<if test="registerCertNo != '' and registerCertNo != null">
AND registerCertNo LIKE concat(#{registerCertNo},'%')
</if>
<if test="manufactory != '' and manufactory != null">
AND manufactory = #{manufactory}
</if>
</where>
ORDER BY updateTime DESC
@ -29,14 +38,14 @@
(
inventoryCode,inventoryName,count,spec,
warehouseName,warehouseCode,registerCertNo,manufacturingDate,
expirationDate,thirdSysFk,batchNo,spaceCode,spaceName,updateTime
expirationDate,thirdSysFk,batchNo,spaceCode,spaceName,updateTime,manufactory
)
values
(
#{inventoryCode}, #{inventoryName}, #{count}, #{spec},
#{warehouseName}, #{warehouseCode}, #{registerCertNo}, #{manufacturingDate},
#{expirationDate},
#{thirdSysFk},#{batchNo},#{spaceCode},#{spaceName},#{updateTime}
#{thirdSysFk},#{batchNo},#{spaceCode},#{spaceName},#{updateTime},#{manufactory}
)
</insert>
@ -45,7 +54,7 @@
(
inventoryCode,inventoryName,count,spec,
warehouseName,warehouseCode,registerCertNo,manufacturingDate,
expirationDate,thirdSysFk,batchNo,spaceCode,spaceName,updateTime
expirationDate,thirdSysFk,batchNo,spaceCode,spaceName,updateTime,manufactory
)
values
@ -55,7 +64,7 @@
#{item.inventoryCode}, #{item.inventoryName}, #{item.count}, #{item.spec},
#{item.warehouseName}, #{item.warehouseCode}, #{item.registerCertNo},
#{item.manufacturingDate}, #{item.expirationDate},
#{item.thirdSysFk},#{item.batchNo},#{item.spaceCode},#{item.spaceName},#{item.updateTime}
#{item.thirdSysFk},#{item.batchNo},#{item.spaceCode},#{item.spaceName},#{item.updateTime},#{item.manufactory}
)
</foreach>
</insert>
@ -86,7 +95,7 @@
<if test="spaceName != null">spaceName=#{spaceName},</if>
<if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if>
<if test="updateTime != null">updateTime=#{updateTime},</if>
<if test="manufactory != null">manufactory=#{manufactory},</if>
</trim>
WHERE id = #{id}
</update>

Loading…
Cancel
Save