相关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_BUS = 8;
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 SCHEDULE_NORMAL = 1; //常规任务

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

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

@ -305,7 +305,6 @@ public class SupManufacturerController {
}
if (supManufacturerEntity.getAuditStatus() == 1 || supManufacturerEntity.getAuditStatus() == 4) {
//查询上传的资质证书
FilterSupCertRequest filterSupCertRequest = new FilterSupCertRequest();
@ -369,7 +368,8 @@ public class SupManufacturerController {
for (SupCertEntity supCertEntity : supCertEntityList) {
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());

@ -8,16 +8,22 @@ import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.BasicProcessStatus;
import com.glxp.api.constant.Constant;
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.IoOrderDao;
import com.glxp.api.dao.inout.IoOrderDetailBizDao;
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.purchase.PurOrderDetailEntity;
import com.glxp.api.entity.purchase.PurOrderEntity;
import com.glxp.api.entity.sync.BasicDownloadStatusEntity;
import com.glxp.api.entity.sync.BasicExportStatusEntity;
import com.glxp.api.entity.sync.SyncDataBustypeEntity;
import com.glxp.api.entity.sync.SyncDataSetEntity;
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.system.SyncDataSetResponse;
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")
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 nameCode;
private String uuid;
private String originUuid;
private String ggxh;
private String thirdId;
private String id;

@ -12,6 +12,7 @@ public class FilterUdiRelRequest extends ListPageRequest {
private String cpmctymc;
private String nameCode;
private String uuid;
private String originUuid;
private String ggxh;
private String thirdId;
private Long id;
@ -56,7 +57,6 @@ public class FilterUdiRelRequest extends ListPageRequest {
private String uniqueNameCode;
private String supName;
private String unitFk;
private String originUuid;
private String relId;
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;
}

@ -4,9 +4,9 @@ server:
spring:
datasource:
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
password: 123456
password: Glxp@6066
hikari:
connection-timeout: 60000
maximum-pool-size: 20

@ -2,14 +2,13 @@
<!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">
<insert id="insertCompanyProductRelevance"
parameterType="com.glxp.api.entity.basic.CompanyProductRelevanceEntity">
replace
INTO company_product_relevance(customerId, productId, enterpriseId, registrationId,
createTime,updateTime,auditStatus,productUuid,udiRlIdFk,unitFk,price) values
(
#{customerId},
createTime, updateTime, auditStatus, productUuid, udiRlIdFk, unitFk,
price)
values (#{customerId},
#{productId},
#{enterpriseId},
#{registrationId},
@ -18,8 +17,7 @@
#{auditStatus},
#{productUuid},
#{udiRlIdFk},
#{unitFk},#{price}
)
#{unitFk}, #{price})
</insert>
@ -27,9 +25,9 @@
parameterType="com.glxp.api.entity.basic.CompanyProductRelevanceEntity">
replace
INTO company_product_relevance(id, customerId, productId, enterpriseId, registrationId,
create_time,update_time,auditStatus,productUuid,udiRlIdFk,unitFk,price) values
(
#{id},
create_time, update_time, auditStatus, productUuid, udiRlIdFk, unitFk,
price)
values (#{id},
#{customerId},
#{productId},
#{enterpriseId},
@ -39,8 +37,7 @@
#{auditStatus},
#{productUuid},
#{udiRlIdFk},
#{unitFk},#{price}
)
#{unitFk}, #{price})
</insert>
<delete id="deleteById" parameterType="Map">
@ -58,8 +55,7 @@
<select id="filterUdiGp" parameterType="com.glxp.api.req.basic.CompanyProductRelevanceRequest"
resultType="com.glxp.api.res.basic.CompanyProductRelevanceResponse">
SELECT
company_product_relevance.id,
SELECT company_product_relevance.id,
company_product_relevance.customerId,
company_product_relevance.auditStatus,
basic_udirel.thirdId,
@ -120,8 +116,7 @@
basic_products.basicPrductRemak6,
basic_products.basicPrductRemak7,
basic_products.basicPrductRemak8
FROM
company_product_relevance
FROM company_product_relevance
INNER JOIN basic_udirel ON company_product_relevance.udiRlIdFk = basic_udirel.id
INNER JOIN basic_products ON basic_udirel.uuid = basic_products.uuid
INNER JOIN customer_info ON customer_info.customerId = company_product_relevance.customerId
@ -175,19 +170,24 @@
AND basic_products.originUuid is NULL
</if>
<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 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 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 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 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 test="filterType != null and filterType == 10">
AND basic_udirel.updateTime is NULL
@ -214,11 +214,13 @@
<if test="unitFk != null and unitFk != ''">
and unitFk = #{unitFk}
</if>
<if test="originUuid != null and originUuid != ''">
and originUuid = #{originUuid}
</if>
<if test="isDisable == false">
AND (basic_udirel.isDisable is null or basic_udirel.isDisable = false)
</if>
</where>
ORDER BY company_product_relevance.updateTime DESC
</select>
</mapper>

@ -404,6 +404,9 @@
<if test="id != '' and id != null">
AND basic_udirel.id = #{id}
</if>
<if test="originUuid != null and originUuid != ''">
and originUuid = #{originUuid}
</if>
</where>
ORDER BY modifyTime DESC
</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, '删除日志数据');
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