库存添加过滤条件,资质审核展示规格型号

test
anthonywj 1 year ago
parent 8792e1e7ab
commit f8d447af39

@ -94,7 +94,7 @@ public class InvPreProductController extends BaseController {
*/ */
@GetMapping("/spms/inv/pre/product/filterDetail") @GetMapping("/spms/inv/pre/product/filterDetail")
public BaseResponse filterInvPreProductDetail(FilterInvPreProductDetailRequest detailRequest) { public BaseResponse filterInvPreProductDetail(FilterInvPreProductDetailRequest detailRequest) {
if(!"".equals(detailRequest.getOrderBy())){ if (!"".equals(detailRequest.getOrderBy())) {
detailRequest.setOrderBy("updateTime"); detailRequest.setOrderBy("updateTime");
} }
List<InvPreProductDetailEntity> invPreProductDetailEntities = invPreProductDetailService.filterPreProductDetailList(detailRequest); List<InvPreProductDetailEntity> invPreProductDetailEntities = invPreProductDetailService.filterPreProductDetailList(detailRequest);

@ -128,7 +128,7 @@ public class InvProductController extends BaseController {
*/ */
@GetMapping("/spms/inv/product/filterDetail") @GetMapping("/spms/inv/product/filterDetail")
public BaseResponse filterInvProductDetail(FilterInvProductDetailRequest filterInvProductDetailRequest) { public BaseResponse filterInvProductDetail(FilterInvProductDetailRequest filterInvProductDetailRequest) {
if(!"".equals(filterInvProductDetailRequest.getOrderBy())){ if (!"".equals(filterInvProductDetailRequest.getOrderBy())) {
filterInvProductDetailRequest.setOrderBy("updateTime"); filterInvProductDetailRequest.setOrderBy("updateTime");
} }
List<InvProductDetailEntity> invProductDetailEntities = invProductDetailService.filterInvProductDetailList(filterInvProductDetailRequest); List<InvProductDetailEntity> invProductDetailEntities = invProductDetailService.filterInvProductDetailList(filterInvProductDetailRequest);

@ -43,4 +43,7 @@ public interface IoOrderDetailBizDao extends BaseMapperPlus<IoOrderDetailBizDao,
* @return * @return
*/ */
IoOrderDetailBizEntity selectOrderDetailBiz(@Param("orderId") String orderId, @Param("relId") Long relId, @Param("batchNo") String batchNo, @Param("productDate") String productDate, @Param("expireDate") String expireDate); IoOrderDetailBizEntity selectOrderDetailBiz(@Param("orderId") String orderId, @Param("relId") Long relId, @Param("batchNo") String batchNo, @Param("productDate") String productDate, @Param("expireDate") String expireDate);
IoOrderDetailBizEntity findByRelBatch(@Param("orderId") String orderId, @Param("relId") Long relId, @Param("batchNo") String batchNo);
} }

@ -98,4 +98,7 @@ public class FilterInvPreProductRequest extends ListPageRequest {
*/ */
private String cplb; private String cplb;
private Integer filterNoInv;
} }

@ -99,5 +99,5 @@ public class FilterInvPreinProductRequest extends ListPageRequest {
* *
*/ */
private String cplb; private String cplb;
private Integer filterNoInv;
} }

@ -103,4 +103,8 @@ public class FilterInvProductRequest extends ListPageRequest {
*/ */
private String invSpaceCode; private String invSpaceCode;
private Integer filterNoInv;
} }

@ -2,6 +2,8 @@ package com.glxp.api.res.inv;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal;
/** /**
* VO * VO
*/ */
@ -106,7 +108,9 @@ public class InvPreProductResponse {
private String invCode; private String invCode;
/** /**
*
*/ */
private String measname; private String measname;
private BigDecimal price;
} }

@ -2,6 +2,8 @@ package com.glxp.api.res.inv;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal;
/** /**
* VO * VO
*/ */
@ -108,4 +110,6 @@ public class InvPreinProductResponse {
//计量单位 //计量单位
private String measname; private String measname;
private BigDecimal price;
} }

@ -10,6 +10,7 @@ public class SupProductResponse extends SupProductEntity {
private String supName; private String supName;
private String ggxh;
private String manufacturerName; private String manufacturerName;
private String createUser; private String createUser;
private Date createTime; private Date createTime;

@ -17,6 +17,7 @@ import com.glxp.api.entity.basic.UdiEntity;
import com.glxp.api.entity.inout.*; import com.glxp.api.entity.inout.*;
import com.glxp.api.entity.inv.InvInnerOrderPdfTempEntity; import com.glxp.api.entity.inv.InvInnerOrderPdfTempEntity;
import com.glxp.api.entity.inv.InvPreinDetailEntity; import com.glxp.api.entity.inv.InvPreinDetailEntity;
import com.glxp.api.entity.system.SystemParamConfigEntity;
import com.glxp.api.res.inout.IoOrderCheckResultResponse; import com.glxp.api.res.inout.IoOrderCheckResultResponse;
import com.glxp.api.res.inout.IoOrderDetailBizResponse; import com.glxp.api.res.inout.IoOrderDetailBizResponse;
import com.glxp.api.res.inout.IoOrderDetailCodeResponse; import com.glxp.api.res.inout.IoOrderDetailCodeResponse;
@ -27,6 +28,7 @@ import com.glxp.api.service.inout.impl.IoOrderInvoiceService;
import com.glxp.api.service.inv.InvPreinDetailService; import com.glxp.api.service.inv.InvPreinDetailService;
import com.glxp.api.service.inv.InvPreinOrderService; import com.glxp.api.service.inv.InvPreinOrderService;
import com.glxp.api.service.inv.InvPreinProductDetailService; import com.glxp.api.service.inv.InvPreinProductDetailService;
import com.glxp.api.service.system.SystemParamConfigService;
import com.glxp.api.util.*; import com.glxp.api.util.*;
import com.glxp.api.util.udi.FilterUdiUtils; import com.glxp.api.util.udi.FilterUdiUtils;
import com.glxp.api.util.udi.UdiCalCountUtil; import com.glxp.api.util.udi.UdiCalCountUtil;
@ -78,6 +80,8 @@ public class IoCheckInoutService {
IoGenInvService genInvService; IoGenInvService genInvService;
@Resource @Resource
IoAddInoutService addInoutService; IoAddInoutService addInoutService;
@Resource
SystemParamConfigService systemParamConfigService;
/** /**
* *
@ -265,12 +269,25 @@ public class IoCheckInoutService {
public String checkCode(IoCodeTempEntity codeEntity) { public String checkCode(IoCodeTempEntity codeEntity) {
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("only_vail_batch");
boolean vailBatchNo = false;
if (systemParamConfigEntity != null) {
if (systemParamConfigEntity.getParamValue().equals("1")) {
vailBatchNo = true;
}
}
boolean isBillExit = orderDetailBizService.isExit(codeEntity.getOrderId()); boolean isBillExit = orderDetailBizService.isExit(codeEntity.getOrderId());
if (!isBillExit) { if (!isBillExit) {
return "请先录入业务详情"; return "请先录入业务详情";
} }
IoOrderDetailBizEntity bizEntity;
IoOrderDetailBizEntity bizEntity = orderDetailBizService.findByUnique(codeEntity.getOrderId(), codeEntity.getRelId(), codeEntity.getBatchNo(), codeEntity.getProduceDate(), codeEntity.getExpireDate()); if (vailBatchNo) {
bizEntity = orderDetailBizService.findByUnique(codeEntity.getOrderId(), codeEntity.getRelId(), codeEntity.getBatchNo());
} else {
bizEntity = orderDetailBizService.findByUnique(codeEntity.getOrderId(), codeEntity.getRelId(), codeEntity.getBatchNo(), codeEntity.getProduceDate(), codeEntity.getExpireDate());
}
if (bizEntity == null) { if (bizEntity == null) {
return "非此单产品!"; return "非此单产品!";
} }
@ -1061,6 +1078,12 @@ public class IoCheckInoutService {
} }
public String checkProductDate(IoOrderDetailBizEntity bizEntity, IoOrderDetailCodeEntity codeEntity) { public String checkProductDate(IoOrderDetailBizEntity bizEntity, IoOrderDetailCodeEntity codeEntity) {
String value = systemParamConfigService.selectValueByParamKey("only_vail_batch");
if (StrUtil.isNotEmpty(value) && value.equals("1")) {
return null;
}
if (StrUtil.nullToEmpty(bizEntity.getProductDate()).equals(StrUtil.nullToEmpty(codeEntity.getProductDate()))) { if (StrUtil.nullToEmpty(bizEntity.getProductDate()).equals(StrUtil.nullToEmpty(codeEntity.getProductDate()))) {
return null; return null;
} else { } else {
@ -1069,6 +1092,12 @@ public class IoCheckInoutService {
} }
public String checkExpireDate(IoOrderDetailBizEntity bizEntity, IoOrderDetailCodeEntity codeEntity) { public String checkExpireDate(IoOrderDetailBizEntity bizEntity, IoOrderDetailCodeEntity codeEntity) {
String value = systemParamConfigService.selectValueByParamKey("only_vail_batch");
if (StrUtil.isNotEmpty(value) && value.equals("1")) {
return null;
}
if (StrUtil.nullToEmpty(bizEntity.getExpireDate()).equals(StrUtil.nullToEmpty(codeEntity.getExpireDate()))) { if (StrUtil.nullToEmpty(bizEntity.getExpireDate()).equals(StrUtil.nullToEmpty(codeEntity.getExpireDate()))) {
return null; return null;
} else { } else {

@ -31,6 +31,8 @@ public interface IoOrderDetailBizService {
boolean isExit(Long relId, String bacthNo, Long ignoreId, String orderId); boolean isExit(Long relId, String bacthNo, Long ignoreId, String orderId);
IoOrderDetailBizEntity findByUnique(String orderId, Long relId, String bacthNo);
IoOrderDetailBizEntity findByUnique(String orderId, Long relId, String bacthNo, String productDate, String expireDate); IoOrderDetailBizEntity findByUnique(String orderId, Long relId, String bacthNo, String productDate, String expireDate);
IoOrderDetailBizEntity findByRelId(String orderId, Long relId); IoOrderDetailBizEntity findByRelId(String orderId, Long relId);
@ -47,7 +49,7 @@ public interface IoOrderDetailBizService {
List<IoOrderInvoiceResponse> filterListInv(FilterOrderDetailBizRequest orderDetailBizRequest); List<IoOrderInvoiceResponse> filterListInv(FilterOrderDetailBizRequest orderDetailBizRequest);
List<IoOrderInvoiceResponse> selectByorderIdFk(String orderIdFk); List<IoOrderInvoiceResponse> selectByorderIdFk(String orderIdFk);
IoOrderInvoiceResponse selectByinvoiceId(Long id); IoOrderInvoiceResponse selectByinvoiceId(Long id);

@ -95,6 +95,11 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
.isNull(StrUtil.isEmpty(bacthNo), "batchNo").eq("orderIdFk", orderId).ne("id", ignoreId)); .isNull(StrUtil.isEmpty(bacthNo), "batchNo").eq("orderIdFk", orderId).ne("id", ignoreId));
} }
@Override
public IoOrderDetailBizEntity findByUnique(String orderId, Long relId, String batchNo) {
return ioOrderDetailBizDao.findByRelBatch(orderId, relId, batchNo);
}
@Override @Override
public IoOrderDetailBizEntity findByUnique(String orderId, Long relId, String bacthNo, String productDate, String expireDate) { public IoOrderDetailBizEntity findByUnique(String orderId, Long relId, String bacthNo, String productDate, String expireDate) {
return ioOrderDetailBizDao.selectOrderDetailBiz(orderId, relId, bacthNo, productDate, expireDate); return ioOrderDetailBizDao.selectOrderDetailBiz(orderId, relId, bacthNo, productDate, expireDate);

@ -88,6 +88,27 @@
where orderIdFk = #{orderIdFk} where orderIdFk = #{orderIdFk}
</select> </select>
<select id="findByRelBatch" resultType="com.glxp.api.entity.inout.IoOrderDetailBizEntity">
select *
from io_order_detail_biz
<where>
<if test="orderId != null and orderId != ''">
AND orderIdFk = #{orderId}
</if>
<if test="relId != null">
AND bindRlFk = #{relId}
</if>
<if test="batchNo != null and batchNo != ''">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == null || batchNo == ''">
AND (batchNo is null or batchNo = '')
</if>
</where>
limit 1
</select>
<select id="selectOrderDetailBiz" resultType="com.glxp.api.entity.inout.IoOrderDetailBizEntity"> <select id="selectOrderDetailBiz" resultType="com.glxp.api.entity.inout.IoOrderDetailBizEntity">
select * select *
from io_order_detail_biz from io_order_detail_biz

@ -22,13 +22,14 @@
auth_warehouse.name invName, auth_warehouse.name invName,
ipp.deptCode, ipp.deptCode,
ipp.invCode, ipp.invCode,
bp.measname bp.measname,
ipp.price
from inv_pre_product ipp from inv_pre_product ipp
inner join basic_udirel on ipp.relIdFk = basic_udirel.id inner join basic_udirel on ipp.relIdFk = basic_udirel.id
inner join basic_products bp on basic_udirel.uuid = bp.uuid inner join basic_products bp on basic_udirel.uuid = bp.uuid
left join basic_corp on ipp.supId = basic_corp.erpId left join basic_corp on ipp.supId = basic_corp.erpId
left join auth_dept on auth_dept.code = ipp.deptCode left join auth_dept on auth_dept.code = ipp.deptCode
left join auth_warehouse on auth_warehouse.code = ipp.invCode left join auth_warehouse on auth_warehouse.code = ipp.invCode
<where> <where>
bp.diType = 1 bp.diType = 1
<if test="cpmctymc != null and cpmctymc != ''"> <if test="cpmctymc != null and cpmctymc != ''">
@ -70,6 +71,15 @@
<if test="invCode != null and invCode != ''"> <if test="invCode != null and invCode != ''">
AND ipp.invCode = #{invCode} AND ipp.invCode = #{invCode}
</if> </if>
<if test="filterNoInv != null and filterNoInv == 1">
AND ipp.reCount <![CDATA[ > ]]> 0
</if>
<if test="filterNoInv != null and filterNoInv == 2">
AND ipp.reCount <![CDATA[ = ]]> 0
</if>
<if test="filterNoInv != null and filterNoInv == 3">
AND ipp.reCount <![CDATA[ < ]]> 0
</if>
<if test="invCodes != null and invCodes.size() != 0"> <if test="invCodes != null and invCodes.size() != 0">
AND ipp.invCode in AND ipp.invCode in
<foreach collection="invCodes" item="item" index="index" open="(" close=")" separator=","> <foreach collection="invCodes" item="item" index="index" open="(" close=")" separator=",">
@ -83,11 +93,11 @@
<select id="filterPreProductList" resultType="com.glxp.api.entity.inv.InvPreProductEntity"> <select id="filterPreProductList" resultType="com.glxp.api.entity.inv.InvPreProductEntity">
select ipp.* select ipp.*
from inv_pre_product ipp from inv_pre_product ipp
inner join basic_udirel on ipp.relIdFk = basic_udirel.id inner join basic_udirel on ipp.relIdFk = basic_udirel.id
inner join basic_products bp on basic_udirel.uuid = bp.uuid inner join basic_products bp on basic_udirel.uuid = bp.uuid
left join basic_corp on ipp.supId = basic_corp.erpId left join basic_corp on ipp.supId = basic_corp.erpId
left join auth_dept on auth_dept.code = ipp.deptCode left join auth_dept on auth_dept.code = ipp.deptCode
left join auth_warehouse on auth_warehouse.code = ipp.invCode left join auth_warehouse on auth_warehouse.code = ipp.invCode
<where> <where>
bp.diType = 1 bp.diType = 1
<if test="cpmctymc != null and cpmctymc != ''"> <if test="cpmctymc != null and cpmctymc != ''">

@ -22,7 +22,8 @@
auth_warehouse.name invName, auth_warehouse.name invName,
ipp.deptCode, ipp.deptCode,
ipp.invCode, ipp.invCode,
bp.measname bp.measname,
ipp.price
from inv_prein_product ipp from inv_prein_product ipp
inner join basic_udirel on ipp.relIdFk = basic_udirel.id inner join basic_udirel on ipp.relIdFk = basic_udirel.id
inner join basic_products bp on basic_udirel.uuid = bp.uuid inner join basic_products bp on basic_udirel.uuid = bp.uuid
@ -69,6 +70,15 @@
<if test="invCode != null and invCode != ''"> <if test="invCode != null and invCode != ''">
AND ipp.invCode = #{invCode} AND ipp.invCode = #{invCode}
</if> </if>
<if test="filterNoInv != null and filterNoInv == 1">
AND ipp.reCount <![CDATA[ > ]]> 0
</if>
<if test="filterNoInv != null and filterNoInv == 2">
AND ipp.reCount <![CDATA[ = ]]> 0
</if>
<if test="filterNoInv != null and filterNoInv == 3">
AND ipp.reCount <![CDATA[ < ]]> 0
</if>
<if test="invCodes != null and invCodes.size() != 0"> <if test="invCodes != null and invCodes.size() != 0">
AND ipp.invCode in AND ipp.invCode in
<foreach collection="invCodes" item="item" index="index" open="(" close=")" separator=","> <foreach collection="invCodes" item="item" index="index" open="(" close=")" separator=",">

@ -76,6 +76,15 @@
<if test="invCode != null and invCode != ''"> <if test="invCode != null and invCode != ''">
AND ip.invCode = #{invCode} AND ip.invCode = #{invCode}
</if> </if>
<if test="filterNoInv != null and filterNoInv == 1">
AND ip.reCount <![CDATA[ > ]]> 0
</if>
<if test="filterNoInv != null and filterNoInv == 2">
AND ip.reCount <![CDATA[ = ]]> 0
</if>
<if test="filterNoInv != null and filterNoInv == 3">
AND ip.reCount <![CDATA[ < ]]> 0
</if>
<if test="invSpaceCode != null and invSpaceCode != ''"> <if test="invSpaceCode != null and invSpaceCode != ''">
AND invSpaceCode = #{invSpaceCode} AND invSpaceCode = #{invSpaceCode}
</if> </if>

@ -127,14 +127,16 @@
sup_company.companyName supName, sup_company.companyName supName,
sup_manufacturer.companyName manufacturerName, sup_manufacturer.companyName manufacturerName,
sup_manufacturer.companyName, sup_manufacturer.companyName,
sup_manufacturer.agentName sup_manufacturer.agentName,
basic_products.ggxh
FROM sup_product FROM sup_product
inner join sup_company inner join sup_company
on sup_product.customerId = sup_company.customerId on sup_product.customerId = sup_company.customerId
INNER JOIN sup_manufacturer INNER JOIN sup_manufacturer
on sup_manufacturer.manufacturerId = on sup_manufacturer.manufacturerId =
sup_product.manufacturerIdFk sup_product.manufacturerIdFk
left join basic_udirel on sup_product.relIdFk = basic_udirel.id
INNER JOIN basic_products on basic_udirel.uuid = basic_products.uuid
<where> <where>
<if test="id != null and id != ''"> <if test="id != null and id != ''">
and sup_product.id = #{id} and sup_product.id = #{id}
@ -181,6 +183,7 @@
and (sup_product.auditStatus = 1 or sup_product.auditStatus = 4) and (sup_product.auditStatus = 1 or sup_product.auditStatus = 4)
</if> </if>
</where> </where>
GROUP BY cpmctymc, manufactory
</select> </select>
<update id="modifyRegistration" parameterType="com.glxp.api.entity.purchase.SupProductEntity"> <update id="modifyRegistration" parameterType="com.glxp.api.entity.purchase.SupProductEntity">
@ -378,16 +381,18 @@
#{allowNoSerial}) #{allowNoSerial})
</insert> </insert>
<select id="findProduct" parameterType="com.glxp.api.entity.purchase.SupProductEntity" <select id="findProduct" parameterType="com.glxp.api.entity.purchase.SupProductEntity"
resultType="java.lang.Integer" > resultType="java.lang.Integer">
SELECT count(*) SELECT count(*)
FROM sup_product FROM sup_product
inner join sup_company inner join sup_company
on sup_product.customerId = sup_company.customerId on sup_product.customerId = sup_company.customerId
INNER JOIN sup_manufacturer INNER JOIN sup_manufacturer
on sup_manufacturer.manufacturerId = on sup_manufacturer.manufacturerId =
sup_product.manufacturerIdFk sup_product.manufacturerIdFk
WHERE sup_manufacturer.companyName=(SELECT companyName FROM sup_manufacturer WHERE manufacturerId = #{manufacturerIdFk}) WHERE sup_manufacturer.companyName =
and recordCode=#{recordCode} and recordProductName=#{recordProductName} (SELECT companyName FROM sup_manufacturer WHERE manufacturerId = #{manufacturerIdFk})
and recordCode = #{recordCode}
and recordProductName = #{recordProductName}
</select> </select>
<delete id="deleteById" parameterType="Map"> <delete id="deleteById" parameterType="Map">
DELETE DELETE

@ -433,6 +433,11 @@ INSERT ignore INTO `sys_param_config`(id, `parentId`, `paramName`, `paramKey`, `
VALUES (20059, 0, '是否允许编辑第三方产品信息', 'enable_edit_third', '1', 0, 0, '01', NULL); VALUES (20059, 0, '是否允许编辑第三方产品信息', 'enable_edit_third', '1', 0, 0, '01', NULL);
INSERT ignore INTO `sys_param_config`(`id`, `parentId`, `paramName`, `paramKey`, `paramValue`, `paramStatus`,
`paramType`, `paramExplain`, `updateTime`)
VALUES (2088, 0, '是否只校验批次号', 'only_vail_batch', '0', 0, 0, '是否只校验批次号(01是)', NULL);
CALL Pro_Temp_ColumnWork('io_order', 'rmFromCorp', 'varchar(255)', 1); CALL Pro_Temp_ColumnWork('io_order', 'rmFromCorp', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('io_order', 'rmDeptCode', 'varchar(255)', 1); CALL Pro_Temp_ColumnWork('io_order', 'rmDeptCode', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('io_order', 'rmInvCode', 'varchar(255)', 1); CALL Pro_Temp_ColumnWork('io_order', 'rmInvCode', 'varchar(255)', 1);

Loading…
Cancel
Save