bug修改

busUser
anthonywj 2 years ago
parent 97a48dfa1b
commit 9c49f5ed8e

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

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

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

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

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

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

@ -516,7 +516,8 @@
(select billNo
from stock_order
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
</select>

@ -2,10 +2,10 @@
<!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">
<select id="filterInvProduct" parameterType="com.glxp.api.admin.req.inventory.FilterInvProductRequest"
resultType="com.glxp.api.admin.entity.inventory.InvProductEntity">
SELECT * FROM inv_prein_product
SELECT *
FROM inv_prein_product
<where>
<if test="productsName != '' and productsName != null">
AND productsName = #{productsName}
@ -69,7 +69,6 @@
SELECT *
FROM inv_prein_product
WHERE id = #{id}
</select>
@ -102,7 +101,6 @@
AND invWarehouseCode = #{invWarehouseCode}
</if>
</where>
</select>
<select id="selectExit" parameterType="Map"
resultType="com.glxp.api.admin.entity.inventory.InvProductEntity">
@ -113,27 +111,46 @@
</where>
limit 1
</select>
<!-- 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,
<!-- and supId = #{supId}
sum(inv_prein_product.inCount) as inCount,
sum(inv_prein_product.outCount) as outCount,
sum(inv_prein_product.reCount) as reCount, 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
sum(inv_prein_product.reCount) as reCount,
-->
<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,
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
inner join basic_udirel on inv_prein_product.relIdFk = basic_udirel.id
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 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 io_order on inv_prein_product.orderIdFk = io_order.id
<where>
basic_products.diType = 1
<if test="cpmctymc != '' and cpmctymc != null">
@ -209,7 +226,8 @@
insert INTO inv_prein_product
(productsName, nameCode, relIdFk, ggxh, batchNo,
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)
values (#{productsName}, #{nameCode},
#{relIdFk}, #{ggxh}, #{batchNo},
@ -241,29 +259,67 @@
<update id="updateInvProduct" parameterType="com.glxp.api.admin.entity.inventory.InvProductEntity">
UPDATE inv_prein_product
<trim prefix="set" suffixOverrides=",">
<if test="productsName != null">productsName=#{productsName},</if>
<if test="nameCode != null">nameCode=#{nameCode},</if>
<if test="relIdFk != null">relIdFk=#{relIdFk},</if>
<if test="ggxh != null">ggxh=#{ggxh},</if>
<if test="batchNo != null">batchNo=#{batchNo},</if>
<if test="productionDate != null">productionDate=#{productionDate},</if>
<if test="expireDate != null">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>
<if test="productsName != null">
productsName=#{productsName},
</if>
<if test="nameCode != null">
nameCode=#{nameCode},
</if>
<if test="relIdFk != null">
relIdFk=#{relIdFk},
</if>
<if test="ggxh != null">
ggxh=#{ggxh},
</if>
<if test="batchNo != null">
batchNo=#{batchNo},
</if>
<if test="productionDate != null">
productionDate=#{productionDate},
</if>
<if test="expireDate != null">
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>
WHERE id = #{id}
</update>
</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('stock_order_detail', 'realCount', 'int', 1);
CALL Pro_Temp_ColumnWork('io_order_detail', 'realCount', 'int', 1);

Loading…
Cancel
Save