库存查询新增货位查询,耗材字典问题

master
anthonywj 2 years ago
parent fff8e388fc
commit 0bd6f7294b

@ -88,7 +88,7 @@ public class UdiContrastController {
List<UdiRelevanceResponse> temps = udiContrastService.findByUnion(key, udiCombineRequest.getThirdId()); List<UdiRelevanceResponse> temps = udiContrastService.findByUnion(key, udiCombineRequest.getThirdId());
if (CollUtil.isNotEmpty(temps)) { if (CollUtil.isNotEmpty(temps)) {
UdiRelevanceResponse temp = temps.get(0); UdiRelevanceResponse temp = temps.get(0);
CompanyEntity companyEntity = companyService.findCompany(udiCombineRequest.getCustomerId()+""); CompanyEntity companyEntity = companyService.findCompany(udiCombineRequest.getCustomerId() + "");
CompanyProductRelevanceEntity companyProductRelevanceEntity = new CompanyProductRelevanceEntity(); CompanyProductRelevanceEntity companyProductRelevanceEntity = new CompanyProductRelevanceEntity();
companyProductRelevanceEntity.setCreateTime(new Date()); companyProductRelevanceEntity.setCreateTime(new Date());
companyProductRelevanceEntity.setUpdateTime(new Date()); companyProductRelevanceEntity.setUpdateTime(new Date());
@ -183,7 +183,15 @@ public class UdiContrastController {
} }
} }
//关联第三方产品信息若无值则由第三方产品信息带过来
UdiProductEntity udiProductEntity = udiProductService.findByUuid(udiRelevanceEntity.getUuid());
if (StrUtil.isEmpty(udiProductEntity.getManufactory())) {
udiProductEntity.setManufactory(udiCombineRequest.getManufactory());
}
if (StrUtil.isEmpty(udiProductEntity.getMeasname())) {
udiProductEntity.setMeasname(udiCombineRequest.getMeasname());
}
udiProductService.updateUdiInfo(udiProductEntity);
return ResultVOUtils.success("更新成功"); return ResultVOUtils.success("更新成功");
} }

@ -96,7 +96,7 @@ public class SupCertController {
if (postSelCertRequest.getCertType() == null) { if (postSelCertRequest.getCertType() == null) {
return ResultVOUtils.error(500, "参数错误!"); return ResultVOUtils.error(500, "参数错误!");
} }
if(postSelCertRequest.getManufacturerIdFk()==null) { if (postSelCertRequest.getManufacturerIdFk() == null) {
String errMsg = ""; String errMsg = "";
ArrayList<String> list = new ArrayList<>(); ArrayList<String> list = new ArrayList<>();
int i = postSelCertRequest.getSupCertSetEntities().size(); int i = postSelCertRequest.getSupCertSetEntities().size();
@ -119,7 +119,6 @@ public class SupCertController {
} }
for (SupCertSetEntity supCertSetEntity : postSelCertRequest.getSupCertSetEntities()) { for (SupCertSetEntity supCertSetEntity : postSelCertRequest.getSupCertSetEntities()) {
SupCertEntity supCertEntity = new SupCertEntity(); SupCertEntity supCertEntity = new SupCertEntity();
supCertEntity.setName(supCertSetEntity.getName()); supCertEntity.setName(supCertSetEntity.getName());

@ -105,4 +105,9 @@ public class InvProductResponse {
*/ */
private String invCode; private String invCode;
/**
* todo
*/
private String spaceName;
} }

@ -24,13 +24,15 @@
auth_dept.name deptName, auth_dept.name deptName,
auth_warehouse.name invName, auth_warehouse.name invName,
ip.deptCode, ip.deptCode,
ip.invCode ip.invCode,
auth_space.name spaceName
from inv_product ip from inv_product ip
inner join basic_udirel on ip.relIdFk = basic_udirel.id inner join basic_udirel on ip.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 ip.supId = basic_corp.erpId left join basic_corp on ip.supId = basic_corp.erpId
left join auth_dept on auth_dept.code = ip.deptCode left join auth_dept on auth_dept.code = ip.deptCode
left join auth_warehouse on auth_warehouse.code = ip.invCode left join auth_warehouse on auth_warehouse.code = ip.invCode
left join auth_space `as` on ip.invSpaceCode = `as`.code
<where> <where>
bp.diType = 1 bp.diType = 1
<if test="cpmctymc != null and cpmctymc != ''"> <if test="cpmctymc != null and cpmctymc != ''">
@ -72,6 +74,9 @@
<if test="invCode != null and invCode != ''"> <if test="invCode != null and invCode != ''">
AND ip.invCode = #{invCode} AND ip.invCode = #{invCode}
</if> </if>
<if test="invSpaceCode != null and invSpaceCode != ''">
AND invSpaceCode = #{invSpaceCode}
</if>
<if test="invCodes != null and invCodes.size() != 0"> <if test="invCodes != null and invCodes.size() != 0">
AND ip.invCode in AND ip.invCode in
<foreach collection="invCodes" item="item" index="index" open="(" close=")" separator=","> <foreach collection="invCodes" item="item" index="index" open="(" close=")" separator=",">
@ -101,10 +106,10 @@
sum(ip.outCount) outCount, sum(ip.outCount) outCount,
sum(ip.reCount) reCount sum(ip.reCount) reCount
from inv_product ip from inv_product ip
inner join basic_udirel bu on ip.relIdFk = bu.id inner join basic_udirel bu on ip.relIdFk = bu.id
inner join basic_products bp on bu.uuid = bp.uuid inner join basic_products bp on bu.uuid = bp.uuid
left join basic_corp bc on ip.supId = bc.erpId left join basic_corp bc on ip.supId = bc.erpId
left join auth_warehouse aw on aw.code = ip.invCode left join auth_warehouse aw on aw.code = ip.invCode
<where> <where>
bp.diType = 1 bp.diType = 1
<if test="cpmctymc != null and cpmctymc != ''"> <if test="cpmctymc != null and cpmctymc != ''">
@ -144,11 +149,11 @@
<select id="getMAInvProducts" resultType="com.glxp.api.res.inv.InvProductResponse"> <select id="getMAInvProducts" resultType="com.glxp.api.res.inv.InvProductResponse">
select ip.id, bp.nameCode, bp.cpmctymc, bp.ggxh, ip.batchNo, ip.productionDate, ip.expireDate select ip.id, bp.nameCode, bp.cpmctymc, bp.ggxh, ip.batchNo, ip.productionDate, ip.expireDate
from inv_product ip from inv_product ip
left join inv_product_detail ipd left join inv_product_detail ipd
on ip.relIdFk = ipd.relId and on ip.relIdFk = ipd.relId and
ifnull(ip.batchNo, 'empty') = ifnull(ipd.batchNo, 'empty') ifnull(ip.batchNo, 'empty') = ifnull(ipd.batchNo, 'empty')
left join basic_udirel bu on bu.id = ip.relIdFk left join basic_udirel bu on bu.id = ip.relIdFk
left join basic_products bp on bu.uuid = bp.uuid left join basic_products bp on bu.uuid = bp.uuid
<where> <where>
(inCount - outCount) > 0 (inCount - outCount) > 0
<if test="nameCode != null and nameCode != ''"> <if test="nameCode != null and nameCode != ''">
@ -176,10 +181,10 @@
<select id="selectProductInfo" resultType="com.glxp.api.entity.inv.InvProductEntity"> <select id="selectProductInfo" resultType="com.glxp.api.entity.inv.InvProductEntity">
select ip.* select ip.*
from inv_product ip from inv_product ip
left join inv_product_detail ipd on ip.relIdFk = ipd.relId left join inv_product_detail ipd on ip.relIdFk = ipd.relId
and ifnull(ip.batchNo, 'empty') = ifnull(ipd.batchNo, 'empty') and ifnull(ip.batchNo, 'empty') = ifnull(ipd.batchNo, 'empty')
and ip.deptCode = ipd.deptCode and ip.deptCode = ipd.deptCode
and ip.invCode = ipd.invCode and ip.invCode = ipd.invCode
<where> <where>
<if test="relId != null and relId != ''"> <if test="relId != null and relId != ''">
AND ip.relIdFk = #{relId} AND ip.relIdFk = #{relId}
@ -212,11 +217,11 @@
sum(inv_product.inCount - inv_product.outCount) reCount, sum(inv_product.inCount - inv_product.outCount) reCount,
basic_products.cpmctymc basic_products.cpmctymc
from inv_product_detail from inv_product_detail
left join inv_product on inv_product_detail.relId = inv_product.relIdFk left join inv_product on inv_product_detail.relId = inv_product.relIdFk
and inv_product.invCode = inv_product_detail.invCode and inv_product.invCode = inv_product_detail.invCode
AND IFNULL(inv_product.batchNo, 'empty') = IFNULL(inv_product_detail.batchNo, 'empty') AND IFNULL(inv_product.batchNo, 'empty') = IFNULL(inv_product_detail.batchNo, 'empty')
left join basic_udirel on inv_product_detail.relId = basic_udirel.id left join basic_udirel on inv_product_detail.relId = basic_udirel.id
left join basic_products on basic_products.uuid = basic_udirel.uuid left join basic_products on basic_products.uuid = basic_udirel.uuid
<where> <where>
<if test="invCode != null and invCode != ''"> <if test="invCode != null and invCode != ''">
AND inv_product_detail.invCode = #{invCode} AND inv_product_detail.invCode = #{invCode}
@ -246,12 +251,12 @@
ip.productionDate, ip.productionDate,
ip.expireDate, ip.expireDate,
ip.supId, ip.supId,
sum(ip.inCount) incount, sum(ip.inCount) incount,
sum(ip.outCount) outCount, sum(ip.outCount) outCount,
sum(ip.reCount) reCount sum(ip.reCount) reCount
from inv_product ip from inv_product ip
left join inv_product_detail ipd left join inv_product_detail ipd
on ip.relIdFk = ipd.relId and ifnull(ip.batchNo, 'empty') = ifnull(ipd.batchNo, 'empty') on ip.relIdFk = ipd.relId and ifnull(ip.batchNo, 'empty') = ifnull(ipd.batchNo, 'empty')
<where> <where>
<if test="invCode != null and invCode != ''"> <if test="invCode != null and invCode != ''">
AND ip.invCode = #{invCode} AND ip.invCode = #{invCode}
@ -269,10 +274,10 @@
<select id="filterProductNames" resultType="com.glxp.api.res.inv.InvProductResponse"> <select id="filterProductNames" resultType="com.glxp.api.res.inv.InvProductResponse">
select ip.relIdFk, bp.cpmctymc, bp.ggxh select ip.relIdFk, bp.cpmctymc, bp.ggxh
from inv_product ip from inv_product ip
left join inv_product_detail ipd on ip.relIdFk = ipd.relId and ip.invCode = ipd.invCode and left join inv_product_detail ipd on ip.relIdFk = ipd.relId and ip.invCode = ipd.invCode and
ifnull(ip.batchNo, 'empty') = ifnull(ipd.batchNo, 'empty') ifnull(ip.batchNo, 'empty') = ifnull(ipd.batchNo, 'empty')
left join basic_udirel bu on bu.id = ip.relIdFk left join basic_udirel bu on bu.id = ip.relIdFk
left join basic_products bp on bp.uuid = bu.uuid left join basic_products bp on bp.uuid = bu.uuid
<where> <where>
<if test="cpmctymc != null and cpmctymc != ''"> <if test="cpmctymc != null and cpmctymc != ''">
AND bp.cpmctymc like concat('%', #{cpmctymc}, '%') AND bp.cpmctymc like concat('%', #{cpmctymc}, '%')
@ -290,31 +295,31 @@
<select id="filterProductList" resultType="com.glxp.api.res.inv.InvProductResponse" <select id="filterProductList" resultType="com.glxp.api.res.inv.InvProductResponse"
parameterType="com.glxp.api.req.inv.FilterInvProductRequest"> parameterType="com.glxp.api.req.inv.FilterInvProductRequest">
select ip.id, select ip.id,
ip.nameCode, ip.nameCode,
bp.cpmctymc, bp.cpmctymc,
ip.relIdFk, ip.relIdFk,
bp.ggxh, bp.ggxh,
ip.batchNo, ip.batchNo,
ip.productionDate, ip.productionDate,
ip.expireDate, ip.expireDate,
bp.ylqxzcrbarmc, bp.ylqxzcrbarmc,
bp.zczbhhzbapzbh, bp.zczbhhzbapzbh,
sum(ip.inCount) as inCount, sum(ip.inCount) as inCount,
sum(ip.outCount) as outCount, sum(ip.outCount) as outCount,
sum(ip.reCount)as reCount, sum(ip.reCount) as reCount,
ip.customerId, ip.customerId,
basic_corp.name supName, basic_corp.name supName,
ip.supId, ip.supId,
auth_dept.name deptName, auth_dept.name deptName,
auth_warehouse.name invName, auth_warehouse.name invName,
ip.deptCode, ip.deptCode,
ip.invCode ip.invCode
from inv_product ip from inv_product ip
inner join basic_udirel on ip.relIdFk = basic_udirel.id inner join basic_udirel on ip.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 ip.supId = basic_corp.erpId left join basic_corp on ip.supId = basic_corp.erpId
left join auth_dept on auth_dept.code = ip.deptCode left join auth_dept on auth_dept.code = ip.deptCode
left join auth_warehouse on auth_warehouse.code = ip.invCode left join auth_warehouse on auth_warehouse.code = ip.invCode
<where> <where>
bp.diType = 1 bp.diType = 1
<if test="cpmctymc != null and cpmctymc != ''"> <if test="cpmctymc != null and cpmctymc != ''">
@ -366,5 +371,4 @@
group by ip.relIdFk group by ip.relIdFk
order by ip.updateTime desc order by ip.updateTime desc
</select> </select>
</mapper> </mapper>

Loading…
Cancel
Save