bug修改

busUser
anthonywj 2 years ago
parent 97a48dfa1b
commit 9c49f5ed8e

@ -37,6 +37,8 @@ public class StockOrderUploadController {
*/ */
@GetMapping("/udiwms/stock/order/upload/filter") @GetMapping("/udiwms/stock/order/upload/filter")
public BaseResponse filter(StockOrderUploadRequest request) { public BaseResponse filter(StockOrderUploadRequest request) {
// 已验收单据才能上传
request.setOrderStatus("5");
List<StockOrderEntity> list = stockOrderService.filter(request); List<StockOrderEntity> list = stockOrderService.filter(request);
PageInfo<StockOrderEntity> pageInfo = new PageInfo<>(list); PageInfo<StockOrderEntity> pageInfo = new PageInfo<>(list);
List<StockOrderResponse> responses = new ArrayList<>(); List<StockOrderResponse> responses = new ArrayList<>();

@ -46,5 +46,5 @@ public class StockOrderDetailEntity {
private String measname; private String measname;
private String supId; private String supId;
private Integer realCount;
} }

@ -75,4 +75,6 @@ public class ErpOrderEntity {
private String code; private String code;
private Integer codeId; private Integer codeId;
private Integer realCount;
} }

@ -2,6 +2,8 @@ package com.glxp.api.admin.res.inventory;
import lombok.Data; import lombok.Data;
import java.util.Date;
@Data @Data
public class InvProductResponse { public class InvProductResponse {
private Integer id; private Integer id;
@ -28,6 +30,10 @@ public class InvProductResponse {
private String price; private String price;
private String orderIdFk; private String orderIdFk;
private Date auditTime;
private Date createTime;
public Integer getInCount() { public Integer getInCount() {
if (inCount == null) if (inCount == null)
return 0; return 0;

@ -921,7 +921,8 @@ public class IoTransInoutService {
OrderEntity preInEntity = orderService.findById(key); OrderEntity preInEntity = orderService.findById(key);
preInEntity.setPreOutBillNo(orderEntity.getId()); preInEntity.setPreOutBillNo(orderEntity.getId());
orderService.updateOrder(preInEntity); orderService.updateOrder(preInEntity);
if (bussinessTypeEntity.isPreInBack()) { //预验收带回 BussinessTypeEntity preBusType = bussinessTypeService.findBTByAction(preInEntity.getAction());
if (preBusType.isPreInBack()) { //预验收带回
invPreInProductService.deleteByOrderIdFk(preInEntity.getId()); invPreInProductService.deleteByOrderIdFk(preInEntity.getId());
invPreInProductDetailService.deleteByOrderIdFk(preInEntity.getId()); invPreInProductDetailService.deleteByOrderIdFk(preInEntity.getId());
} else { } else {

@ -104,7 +104,7 @@ public class OrderSubmitTask implements SchedulingConfigurer {
} }
if (curTime1 - lastTime1 > timeInterval1) { if (curTime1 - lastTime1 > timeInterval1) {
submitOrder(syncUploadDataSetEntity); submitOrder(syncUploadDataSetEntity);
submitProducts(); // submitProducts();
redisUtil.set(Constant.LAST_THIRD_UPLOAD_TIME, curTime1); redisUtil.set(Constant.LAST_THIRD_UPLOAD_TIME, curTime1);
} }

@ -516,7 +516,8 @@
(select billNo (select billNo
from stock_order from stock_order
where stock_order.billType in (select code from basic_third_sys_bus_api)) where stock_order.billType in (select code from basic_third_sys_bus_api))
and exportStatus = 0 and wzUploadStatus is null and exportStatus = 0
and stock_order.status = 5
) )
and stock_order.orderIdFk is not null and stock_order.orderIdFk is not null
</select> </select>

@ -2,10 +2,10 @@
<!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.admin.dao.inventory.InvPreInProductDao"> <mapper namespace="com.glxp.api.admin.dao.inventory.InvPreInProductDao">
<select id="filterInvProduct" parameterType="com.glxp.api.admin.req.inventory.FilterInvProductRequest" <select id="filterInvProduct" parameterType="com.glxp.api.admin.req.inventory.FilterInvProductRequest"
resultType="com.glxp.api.admin.entity.inventory.InvProductEntity"> resultType="com.glxp.api.admin.entity.inventory.InvProductEntity">
SELECT * FROM inv_prein_product SELECT *
FROM inv_prein_product
<where> <where>
<if test="productsName != '' and productsName != null"> <if test="productsName != '' and productsName != null">
AND productsName = #{productsName} AND productsName = #{productsName}
@ -69,7 +69,6 @@
SELECT * SELECT *
FROM inv_prein_product FROM inv_prein_product
WHERE id = #{id} WHERE id = #{id}
</select> </select>
@ -86,7 +85,7 @@
AND supId is NULL AND supId is NULL
</if> </if>
<if test="batchNo != '' and batchNo != null and batchNo!='empty'"> <if test="batchNo != '' and batchNo != null and batchNo != 'empty'">
AND batchNo = #{batchNo} AND batchNo = #{batchNo}
</if> </if>
<if test="batchNo == 'empty'"> <if test="batchNo == 'empty'">
@ -102,7 +101,6 @@
AND invWarehouseCode = #{invWarehouseCode} AND invWarehouseCode = #{invWarehouseCode}
</if> </if>
</where> </where>
</select> </select>
<select id="selectExit" parameterType="Map" <select id="selectExit" parameterType="Map"
resultType="com.glxp.api.admin.entity.inventory.InvProductEntity"> resultType="com.glxp.api.admin.entity.inventory.InvProductEntity">
@ -113,37 +111,56 @@
</where> </where>
limit 1 limit 1
</select> </select>
<!-- and supId = #{supId}--> <!-- and supId = #{supId}
<select id="filterJoinInvProduct" parameterType="com.glxp.api.admin.req.inventory.FilterInvProductRequest"
resultType="com.glxp.api.admin.res.inventory.InvProductResponse">
SELECT
inv_prein_product.id,
basic_products.cpmctymc,basic_products.nameCode,inv_prein_product.relIdFk,basic_products.ggxh,
inv_prein_product.batchNo
,inv_prein_product.productionDate,inv_prein_product.expireDate,
basic_products.ylqxzcrbarmc,basic_products.zczbhhzbapzbh,
sum(inv_prein_product.inCount) as inCount, sum(inv_prein_product.inCount) as inCount,
sum(inv_prein_product.outCount) as outCount, sum(inv_prein_product.outCount) as outCount,
sum(inv_prein_product.reCount) as reCount, inv_prein_product.customerId, sum(inv_prein_product.reCount) as reCount,
basic_corp.name companyName,inv_prein_product.supId,inv_prein_product.unitFk ,inv_warehouse.name -->
invStorageName,inv_prein_product.invStorageCode,inv_prein_product.price,inv_warehouse_sub.name invSubStorageName <select id="filterJoinInvProduct" parameterType="com.glxp.api.admin.req.inventory.FilterInvProductRequest"
,inv_prein_product.invWarehouseCode,inv_prein_product.orderIdFk resultType="com.glxp.api.admin.res.inventory.InvProductResponse">
SELECT inv_prein_product.id,
basic_products.cpmctymc,
basic_products.nameCode,
inv_prein_product.relIdFk,
basic_products.ggxh,
inv_prein_product.batchNo,
inv_prein_product.productionDate,
inv_prein_product.expireDate,
basic_products.ylqxzcrbarmc,
basic_products.zczbhhzbapzbh,
inv_prein_product.customerId,
basic_corp.name companyName,
inv_prein_product.supId,
inv_prein_product.unitFk,
inv_warehouse.name
invStorageName,
inv_prein_product.invStorageCode,
inv_prein_product.price,
inv_warehouse_sub.name
invSubStorageName,
inv_prein_product.invWarehouseCode,
inv_prein_product.orderIdFk,
io_order.createTime,
io_order.auditTime
FROM inv_prein_product FROM inv_prein_product
inner join basic_udirel on inv_prein_product.relIdFk = basic_udirel.id inner join basic_udirel on inv_prein_product.relIdFk = basic_udirel.id
inner join basic_products on basic_udirel.uuid = basic_products.uuid inner join basic_products on basic_udirel.uuid = basic_products.uuid
left join basic_corp on inv_prein_product.supId=basic_corp.erpId left join basic_corp on inv_prein_product.supId = basic_corp.erpId
left join inv_warehouse on inv_warehouse.code=inv_prein_product.invStorageCode left join inv_warehouse on inv_warehouse.code = inv_prein_product.invStorageCode
left join inv_warehouse_sub on inv_warehouse_sub.code = inv_prein_product.invWarehouseCode left join inv_warehouse_sub on inv_warehouse_sub.code = inv_prein_product.invWarehouseCode
left join io_order on inv_prein_product.orderIdFk = io_order.id
<where> <where>
basic_products.diType=1 basic_products.diType = 1
<if test="cpmctymc != '' and cpmctymc != null"> <if test="cpmctymc != '' and cpmctymc != null">
AND basic_products.cpmctymc like concat('%',#{cpmctymc},'%') AND basic_products.cpmctymc like concat('%', #{cpmctymc}, '%')
</if> </if>
<if test="productsName != null and productsName != ''"> <if test="productsName != null and productsName != ''">
AND basic_products.cpmctymc like concat('%',#{productsName},'%') AND basic_products.cpmctymc like concat('%', #{productsName}, '%')
</if> </if>
<if test="nameCode != '' and nameCode != null"> <if test="nameCode != '' and nameCode != null">
AND basic_products.nameCode like concat('%',#{nameCode},'%') AND basic_products.nameCode like concat('%', #{nameCode}, '%')
</if> </if>
<if test="relIdFk != '' and relIdFk != null"> <if test="relIdFk != '' and relIdFk != null">
AND inv_prein_product.relIdFk = #{relIdFk} AND inv_prein_product.relIdFk = #{relIdFk}
@ -156,10 +173,10 @@
</if> </if>
<if test="ggxh != '' and ggxh != null"> <if test="ggxh != '' and ggxh != null">
AND basic_products.ggxh like concat('%',#{ggxh},'%') AND basic_products.ggxh like concat('%', #{ggxh}, '%')
</if> </if>
<if test="batchNo != '' and batchNo != null"> <if test="batchNo != '' and batchNo != null">
AND inv_prein_product.batchNo like concat('%',#{batchNo},'%') AND inv_prein_product.batchNo like concat('%', #{batchNo}, '%')
</if> </if>
<if test="productionDate != '' and productionDate != null"> <if test="productionDate != '' and productionDate != null">
AND inv_prein_product.productionDate = #{productionDate} AND inv_prein_product.productionDate = #{productionDate}
@ -209,7 +226,8 @@
insert INTO inv_prein_product insert INTO inv_prein_product
(productsName, nameCode, relIdFk, ggxh, batchNo, (productsName, nameCode, relIdFk, ggxh, batchNo,
productionDate, expireDate, ylqxzcrbarmc, zczbhhzbapzbh, productionDate, expireDate, ylqxzcrbarmc, zczbhhzbapzbh,
inCount, outCount, reCount, customerId, supId, unitFk, invStorageCode, invWarehouseCode, price, updateTime, inCount, outCount, reCount, customerId, supId, unitFk, invStorageCode, invWarehouseCode, price,
updateTime,
orderIdFk) orderIdFk)
values (#{productsName}, #{nameCode}, values (#{productsName}, #{nameCode},
#{relIdFk}, #{ggxh}, #{batchNo}, #{relIdFk}, #{ggxh}, #{batchNo},
@ -241,29 +259,67 @@
<update id="updateInvProduct" parameterType="com.glxp.api.admin.entity.inventory.InvProductEntity"> <update id="updateInvProduct" parameterType="com.glxp.api.admin.entity.inventory.InvProductEntity">
UPDATE inv_prein_product UPDATE inv_prein_product
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<if test="productsName != null">productsName=#{productsName},</if> <if test="productsName != null">
<if test="nameCode != null">nameCode=#{nameCode},</if> productsName=#{productsName},
<if test="relIdFk != null">relIdFk=#{relIdFk},</if> </if>
<if test="ggxh != null">ggxh=#{ggxh},</if> <if test="nameCode != null">
<if test="batchNo != null">batchNo=#{batchNo},</if> nameCode=#{nameCode},
<if test="productionDate != null">productionDate=#{productionDate},</if> </if>
<if test="expireDate != null">expireDate=#{expireDate},</if> <if test="relIdFk != null">
<if test="ylqxzcrbarmc != null">ylqxzcrbarmc=#{ylqxzcrbarmc},</if> relIdFk=#{relIdFk},
<if test="zczbhhzbapzbh != null">zczbhhzbapzbh=#{zczbhhzbapzbh},</if> </if>
<if test="inCount != null">inCount=#{inCount},</if> <if test="ggxh != null">
<if test="outCount != null">outCount=#{outCount},</if> ggxh=#{ggxh},
<if test="reCount != null">reCount=#{reCount},</if> </if>
<if test="customerId != null">customerId=#{customerId},</if> <if test="batchNo != null">
<if test="supId != null">supId=#{supId},</if> batchNo=#{batchNo},
<if test="unitFk != null">unitFk=#{unitFk},</if> </if>
<if test="invStorageCode != null">invStorageCode=#{invStorageCode},</if> <if test="productionDate != null">
<if test="invWarehouseCode != null">invWarehouseCode=#{invWarehouseCode},</if> productionDate=#{productionDate},
<if test="price != null">price=#{price},</if> </if>
<if test="updateTime != null">updateTime=#{updateTime},</if> <if test="expireDate != null">
<if test="orderIdFk != null">orderIdFk=#{orderIdFk},</if> expireDate=#{expireDate},
</if>
<if test="ylqxzcrbarmc != null">
ylqxzcrbarmc=#{ylqxzcrbarmc},
</if>
<if test="zczbhhzbapzbh != null">
zczbhhzbapzbh=#{zczbhhzbapzbh},
</if>
<if test="inCount != null">
inCount=#{inCount},
</if>
<if test="outCount != null">
outCount=#{outCount},
</if>
<if test="reCount != null">
reCount=#{reCount},
</if>
<if test="customerId != null">
customerId=#{customerId},
</if>
<if test="supId != null">
supId=#{supId},
</if>
<if test="unitFk != null">
unitFk=#{unitFk},
</if>
<if test="invStorageCode != null">
invStorageCode=#{invStorageCode},
</if>
<if test="invWarehouseCode != null">
invWarehouseCode=#{invWarehouseCode},
</if>
<if test="price != null">
price=#{price},
</if>
<if test="updateTime != null">
updateTime=#{updateTime},
</if>
<if test="orderIdFk != null">
orderIdFk=#{orderIdFk},
</if>
</trim> </trim>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
</mapper> </mapper>

@ -40,3 +40,7 @@ create table if not exists `io_code_lost` (
CALL Pro_Temp_ColumnWork('basic_bustype_local', 'preInBack', 'tinyint', 1); CALL Pro_Temp_ColumnWork('basic_bustype_local', 'preInBack', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('stock_order_detail', 'realCount', 'int', 1);
CALL Pro_Temp_ColumnWork('io_order_detail', 'realCount', 'int', 1);

Loading…
Cancel
Save