库存仓库领用等修改

test
anthonywj 1 year ago
parent 2eb50644dc
commit 4f35b8365f

@ -180,6 +180,7 @@ public class InvWarehouseController extends BaseController {
return ResultVOUtils.error(500, "当前仓库不能为空!");
}
FilterInvSubWarehouseRequest filterInvSubWarehouseRequest = new FilterInvSubWarehouseRequest();
BeanUtils.copyProperties(filterInvWarehouseRequest, filterInvSubWarehouseRequest);
if (filterInvWarehouseRequest.getType() == null) {
filterInvSubWarehouseRequest.setAdvanceType(1);
}
@ -219,6 +220,20 @@ public class InvWarehouseController extends BaseController {
// return ResultVOUtils.error(500, "未找到!");
}
/**
*
*
* @param filterInvWarehouseRequest
* @return
*/
@AuthRuleAnnotation("")
@GetMapping("spms/inv/warehouse/findLyInv")
public BaseResponse findLyInv(FilterInvSubWarehouseRequest filterInvWarehouseRequest) {
filterInvWarehouseRequest.setLyInvType(true);
List<InvWarehouseEntity> invWarehouseEntities = invWarehouseService.filterInvSubWarehouse(filterInvWarehouseRequest);
return ResultVOUtils.success(invWarehouseEntities);
}
@AuthRuleAnnotation("")
@GetMapping("spms/sub/inv/warehouse/filterSub")
@ -284,7 +299,7 @@ public class InvWarehouseController extends BaseController {
}
InvWarehouseEntity originEntity = invWarehouseService.findByInvSubByCode(invWarehouseEntity.getCode());
if (!originEntity.getParentId().equals(invWarehouseEntity.getParentId()) || (originEntity.getParentCode() != null && !originEntity.getParentCode().equals(invWarehouseEntity.getParentCode()))) {
if (!originEntity.getParentId().equals(invWarehouseEntity.getParentId()) || (StrUtil.isNotEmpty(originEntity.getParentCode()) && !originEntity.getParentCode().equals(invWarehouseEntity.getParentCode()))) {
Integer userCount = warehouseUserService.countUserBySubInvCode(invWarehouseEntity.getCode());
if (userCount > 0) {
return ResultVOUtils.error(500, "修改部门或上级仓库时,请先移除该仓库关联用户!");

@ -242,7 +242,7 @@ public class IoOrderDetailBizController extends BaseController {
if (bussinessTypeEntity.getCheckWebNew() == 4 && bussinessTypeEntity.getMainAction().equals(ConstantType.TYPE_OUT)) {
Integer count = invProductDetailService.vailStockCount(orderDetailBizEntity.getBindRlFk(), orderDetailBizEntity.getBatchNo(), orderDetailBizEntity.getSupId(), orderEntity.getDeptCode(), orderEntity.getInvCode(), null);
count = IntUtil.value(count)-orderDetailBizEntity.getCount();
count = IntUtil.value(count) - orderDetailBizEntity.getCount();
if (count <= 0) {
if (count == -1) {
@ -446,7 +446,7 @@ public class IoOrderDetailBizController extends BaseController {
ioOrderDetailBizEntity.setExpireDate(purReceiveDetailEntity.getExpireDate());
ioOrderDetailBizEntity.setBatchNo(purReceiveDetailEntity.getBatchNo());
ioOrderDetailBizEntity.setSupId(purReceiveDetailEntity.getSupId());
ioOrderDetailBizEntity.setCount(purReceiveDetailEntity.getCount());
ioOrderDetailBizEntity.setCount(IntUtil.value(purReceiveDetailEntity.getCount()));
orderDetailBizService.insert(ioOrderDetailBizEntity);
}
return ResultVOUtils.success("选入成功!");

@ -116,7 +116,7 @@ public class InvPreinProductController extends BaseController {
@GetMapping("/spms/inv/pre/in/product/filterDetail")
public BaseResponse filterInvPreProductDetail(FilterInvPreProductDetailRequest detailRequest) {
if(!"".equals(detailRequest.getOrderBy())){
if (!"".equals(detailRequest.getOrderBy())) {
detailRequest.setOrderBy("updateTime");
}

@ -24,10 +24,7 @@ import com.glxp.api.service.purchase.impl.PurApplyDetailService;
import com.glxp.api.service.purchase.impl.PurApplyService;
import com.glxp.api.service.purchase.impl.PurOrderDetailService;
import com.glxp.api.service.purchase.impl.PurPlanDetailService;
import com.glxp.api.util.CustomUtil;
import com.glxp.api.util.MsDateUtil;
import com.glxp.api.util.GennerOrderUtils;
import com.glxp.api.util.OrderNoTypeBean;
import com.glxp.api.util.*;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@ -334,7 +331,7 @@ public class IoPurChangeService {
IoOrderDetailBizEntity ioOrderDetailBizEntity = new IoOrderDetailBizEntity();
ioOrderDetailBizEntity.setOrderIdFk(ioOrderEntity.getBillNo());
ioOrderDetailBizEntity.setBindRlFk(obj.getRelIdFk());
ioOrderDetailBizEntity.setCount(obj.getCount());
ioOrderDetailBizEntity.setCount(IntUtil.value(obj.getCount()));
ioOrderDetailBizEntity.setUuidFk(basicProductsEntity.getUuid());
ioOrderDetailBizEntity.setNameCode(basicProductsEntity.getNameCode());
ioOrderDetailBizEntity.setCoName(basicProductsEntity.getCpmctymc());
@ -524,9 +521,9 @@ public class IoPurChangeService {
//根据单据设置时间间隔推移
Date currentTime = new Date();//当前日期
Calendar cal =Calendar.getInstance();
Calendar cal = Calendar.getInstance();
cal.setTime(currentTime);
cal.add(Calendar.HOUR_OF_DAY,beforeTime);
cal.add(Calendar.HOUR_OF_DAY, beforeTime);
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//定义新的日期格式
String dateString = formatter.format(cal.getTime());
Date date = null;

@ -157,13 +157,14 @@ public class PurOrderReceiveController extends BaseController {
@GetMapping("/udiwms/receive/order/filter")
public BaseResponse filterReceive(FilterReceiveRequest filterReceiveRequest) {
if (filterReceiveRequest.getIsUser() != null && filterReceiveRequest.getIsUser()) {
AuthAdmin authAdmin = customerService.getUserBean();
filterReceiveRequest.setCreateUser(authAdmin.getId() + ""); //查询自己
}
if (filterReceiveRequest.getIsInvCode() != null && filterReceiveRequest.getIsInvCode()) {
// if (filterReceiveRequest.getIsUser() != null && filterReceiveRequest.getIsUser()) {
// AuthAdmin authAdmin = customerService.getUserBean();
filterReceiveRequest.setTargetInvCode("1000000");
// filterReceiveRequest.setCreateUser(authAdmin.getId() + ""); //查询自己
// }
if (filterReceiveRequest.getIsInvCode() != null && filterReceiveRequest.getIsInvCode()) {
AuthAdmin authAdmin = customerService.getUserBean();
filterReceiveRequest.setTargetInvCode(authAdmin.getLocInvCode());
// filterReceiveRequest.setTargetInvCode("1000000");
}
List<ReceiveResponse> data = receiveService.filterList(filterReceiveRequest);

@ -94,6 +94,12 @@ public class InvWarehouseEntity {
@TableField(value = "updateTime")
private Date updateTime;
/**
*
*/
@TableField(value = "lyInvType")
private Boolean lyInvType;
@TableField(exist = false)
public String thirdName;

@ -21,4 +21,5 @@ public class FilterInvSubWarehouseRequest extends ListPageRequest {
private String key;
private Integer filterAdvanceType;
private Boolean lyInvType;
}

@ -3,6 +3,7 @@ package com.glxp.api.req.inv;
import com.glxp.api.util.page.ListPageRequest;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
@ -75,8 +76,7 @@ public class FilterInvPreProductDetailRequest extends ListPageRequest {
*
*/
private String updateTime;
private BigDecimal price;
}

@ -116,4 +116,7 @@ public class FilterInvProductRequest extends ListPageRequest {
private String diCode;
private String basicPrductRemak1;
private String category;
}

@ -23,4 +23,6 @@ public class InvSubWarehouseResponse {
private String parentInvName;
private Integer advanceType;
private Boolean spUse;
private Boolean lyInvType;
}

@ -15,4 +15,5 @@ public class InvWarehouseThirdSysResponse {
//仓位名称
private String name;
}

@ -2,6 +2,7 @@ package com.glxp.api.res.inv;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
@ -131,5 +132,5 @@ public class InvPreProductDetailResponse {
// 货位名称
private String spaceName;
private BigDecimal price;
}

@ -148,7 +148,7 @@ public class InvWarehouseServiceImpl extends ServiceImpl<InvWarehouseDao, InvWar
@Override
public boolean updateInvSubWarehouse(InvWarehouseEntity invWarehouseEntity) {
return invWarehouseDao.updateInvSubWarehouse(invWarehouseEntity);
return invWarehouseDao.updateById(invWarehouseEntity)>0;
}
@Override

@ -4,7 +4,7 @@ server:
spring:
datasource:
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms_ph?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms_pt?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: 123456
hikari:

@ -13,6 +13,10 @@
<if test="code != '' and code != null">
AND a.code = #{code}
</if>
<if test="lyInvType != null">
AND a.lyInvType = #{lyInvType}
</if>
<if test="name != '' and name != null">
AND a.name like concat('%', #{name}, '%')
</if>
@ -83,7 +87,6 @@
INNER JOIN auth_warehouse_user on auth_warehouse.code = auth_warehouse_user.code
</if>
<where>
<if test="name != '' and name != null">
AND auth_warehouse.name like concat('%', #{name}, '%')
</if>
@ -210,58 +213,6 @@
WHERE parentId = #{code}
</delete>
<update id="updateInvSubWarehouse" parameterType="com.glxp.api.entity.auth.InvWarehouseEntity">
UPDATE auth_warehouse
<trim prefix="set" suffixOverrides=",">
<if test="name != null">
name=#{name},
</if>
<if test="code != null">
code=#{code},
</if>
<if test="parentId != null">
parentId=#{parentId},
</if>
<if test="remark != null">
remark=#{remark},
</if>
<if test="defaultInv != null">
defaultInv=#{defaultInv},
</if>
<if test="parentCode != null">
parentCode=#{parentCode},
</if>
<if test="thirdId != null">
thirdId=#{thirdId},
</if>
<if test="thirdId1 != null">
thirdId1=#{thirdId1},
</if>
<if test="thirdId2 != null">
thirdId2=#{thirdId2},
</if>
<if test="thirdId3 != null">
thirdId3=#{thirdId3},
</if>
<if test="thirdId4 != null">
thirdId4=#{thirdId4},
</if>
<if test="advanceType != null">
advanceType=#{advanceType},
</if>
<if test="updateTime != null">
updateTime=#{updateTime},
</if>
<if test="spUse != null">
spUse=#{spUse},
</if>
<if test="updateTime != null">
updateTime=#{updateTime},
</if>
</trim>
WHERE id = #{id}
</update>
<insert id="importInvSubWarehouse" parameterType="java.util.List">
replace
into auth_warehouse
@ -324,32 +275,76 @@
b.name as parentName,
a.parentCode,
c.name parentInvName,
a.spUse
a.spUse,
a.lyInvType
FROM auth_warehouse a
left join auth_dept b on a.parentId = b.code
left join auth_warehouse c on a.parentCode = c.code
<where>
<if test="id != '' and id != null">
AND a.id = #{id}
AND a.id =
#{id}
</if>
<if test="code != '' and code != null">
AND a.code = #{code}
AND a
.
code
=
#{code}
</if>
<if test="name != '' and name != null">
AND a.name like concat('%', #{name}, '%')
AND a
.
name
like
concat
(
'%',
#{name},
'%'
)
</if>
<if test="parentId != '' and parentId != null">
AND a.parentId = #{parentId}
AND a
.
parentId
=
#{parentId}
</if>
<if test="defaultInv != '' and defaultInv != null">
AND a.defaultInv = #{defaultInv}
AND a
.
defaultInv
=
#{defaultInv}
</if>
<if test="advanceType != null">
AND a.advanceType = #{advanceType}
AND a
.
advanceType
=
#{advanceType}
</if>
<if test="key != null and key != ''">
AND (a.name like concat('%', #{key}, '%') or
a.code = #{key})
AND (
a
.
name
like
concat
(
'%',
#{key},
'%'
)
or
a
.
code
=
#{key}
)
</if>
</where>
</select>

@ -41,6 +41,9 @@
<if test="batchNo == null and batchNo == ''">
AND batchNo is null
</if>
<if test="price != null">
AND price = #{price}
</if>
<if test="productIdList != null and productIdList.size() != 0">
AND relId in
<foreach collection="productIdList" item="item" index="index" open="(" close=")" separator=",">
@ -64,32 +67,32 @@
<select id="findGroupBySpace" resultType="com.glxp.api.res.inv.InvPreinProductResponse">
select ipp.id,
ipp.nameCode,
bp.cpmctymc,
ipp.relId,
bp.ggxh,
ipp.batchNo,
ipp.produceDate,
ipp.expireDate,
bp.ylqxzcrbarmc,
bp.zczbhhzbapzbh,
ipp.inCount,
ipp.outCount,
ipp.reCount,
basic_corp.name supName,
ipp.supId,
auth_dept.name deptName,
auth_warehouse.name invName,
as.name spaceName,
ipp.deptCode,
ipp.invCode
ipp.nameCode,
bp.cpmctymc,
ipp.relId,
bp.ggxh,
ipp.batchNo,
ipp.produceDate,
ipp.expireDate,
bp.ylqxzcrbarmc,
bp.zczbhhzbapzbh,
ipp.inCount,
ipp.outCount,
ipp.reCount,
basic_corp.name supName,
ipp.supId,
auth_dept.name deptName,
auth_warehouse.name invName,
as.name spaceName,
ipp.deptCode,
ipp.invCode
from inv_prein_product_detail ipp
inner join basic_udirel on ipp.relId = basic_udirel.id
inner join basic_products bp on basic_udirel.uuid = bp.uuid
left join basic_corp on ipp.supId = basic_corp.erpId
left join auth_dept on auth_dept.code = ipp.deptCode
left join auth_warehouse on auth_warehouse.code = ipp.invCode
left join auth_space `as` on ipp.code = `as`.code
inner join basic_udirel on ipp.relId = basic_udirel.id
inner join basic_products bp on basic_udirel.uuid = bp.uuid
left join basic_corp on ipp.supId = basic_corp.erpId
left join auth_dept on auth_dept.code = ipp.deptCode
left join auth_warehouse on auth_warehouse.code = ipp.invCode
left join auth_space `as` on ipp.code = `as`.code
<where>
<if test="cpmctymc != null and cpmctymc != ''">
AND bp.cpmctymc like concat('%', #{cpmctymc}, '%')
@ -166,21 +169,21 @@
</delete>
<select id="getInvProductInfo" resultType="com.glxp.api.res.inv.InvPlaceDetailResponse">
select ipd.code,
ipd.relId,
ipd.batchNo,
ipd.serialNo,
ipd.invSpaceCode,
ipd.invCode,
bp.cpmctymc productName,
bp.ggxh,
bp.measname,
bp.zczbhhzbapzbh,
bp.manufactory,
(select name from auth_space s where s.code = ipd.invSpaceCode) invSpaceName,
(select name from basic_corp bc where bc.erpId = ipd.supId) supName
ipd.relId,
ipd.batchNo,
ipd.serialNo,
ipd.invSpaceCode,
ipd.invCode,
bp.cpmctymc productName,
bp.ggxh,
bp.measname,
bp.zczbhhzbapzbh,
bp.manufactory,
(select name from auth_space s where s.code = ipd.invSpaceCode) invSpaceName,
(select name from basic_corp bc where bc.erpId = ipd.supId) supName
from inv_prein_product_detail ipd
left join basic_udirel bu on bu.id = ipd.relId
left join basic_products bp on bp.uuid = bu.uuid
left join basic_udirel bu on bu.id = ipd.relId
left join basic_products bp on bp.uuid = bu.uuid
<where>
<if test="invCode != null and invCode != ''">
AND ipd.invCode = #{invCode}
@ -201,7 +204,7 @@
<update id="batchBindSpace">
update inv_prein_product_detail
set invSpaceCode = #{invSpaceCode}
where id in
where id in
<foreach collection="ids" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
@ -209,17 +212,17 @@
<select id="getInvPlaceOrderList" resultType="com.glxp.api.res.inout.IoOrderResponse">
select ipd.orderId billNo,
(select name from basic_bussiness_type where action = o.action) billTypeName,
o.mainAction,
o.fromCorp,
o.corpOrderId,
o.fromType,
o.createTime,
o.auditTime,
(select employeeName from auth_user where id = o.reviewUser) reviewUserName
select ipd.orderId billNo,
(select name from basic_bussiness_type where action = o.action) billTypeName,
o.mainAction,
o.fromCorp,
o.corpOrderId,
o.fromType,
o.createTime,
o.auditTime,
(select employeeName from auth_user where id = o.reviewUser) reviewUserName
from inv_prein_product_detail ipd
left join io_order o on ipd.orderId = o.billNo
left join io_order o on ipd.orderId = o.billNo
<where>
<if test="invCode != null and invCode != ''">
AND ipd.invCode = #{invCode}
@ -241,67 +244,67 @@
<select id="filterSpaceList" resultType="com.glxp.api.res.inv.InvPlaceDetailResponse">
SELECT t1.nameCode,
t1.relId,
(SELECT NAME FROM auth_dept WHERE auth_dept.`code` = t1.deptCode) AS deptName,
(SELECT NAME FROM auth_warehouse WHERE auth_warehouse.`code` = t1.invCode) AS invName,
(SELECT NAME FROM auth_space WHERE auth_space.`code` = t1.invSpaceCode) AS invSpaceName,
SUM(t1.reCount) as count,
bp.cpmctymc as productName,
bp.ggxh,
t1.batchNo,
t1.produceDate as productionDate,
t1.expireDate,
bp.measname,
bp.zczbhhzbapzbh,
bp.ylqxzcrbarmc,
bp.manufactory,
(SELECT `name` FROM basic_corp WHERE erpId = t1.supId) supName
t1.relId,
(SELECT NAME FROM auth_dept WHERE auth_dept.`code` = t1.deptCode) AS deptName,
(SELECT NAME FROM auth_warehouse WHERE auth_warehouse.`code` = t1.invCode) AS invName,
(SELECT NAME FROM auth_space WHERE auth_space.`code` = t1.invSpaceCode) AS invSpaceName,
SUM(t1.reCount) as count,
bp.cpmctymc as productName,
bp.ggxh,
t1.batchNo,
t1.produceDate as productionDate,
t1.expireDate,
bp.measname,
bp.zczbhhzbapzbh,
bp.ylqxzcrbarmc,
bp.manufactory,
(SELECT `name` FROM basic_corp WHERE erpId = t1.supId) supName
FROM inv_prein_product_detail t1
LEFT JOIN basic_udirel bu ON bu.id = t1.relId
LEFT JOIN basic_products bp ON bp.uuid = bu.uuid
LEFT JOIN basic_udirel bu ON bu.id = t1.relId
LEFT JOIN basic_products bp ON bp.uuid = bu.uuid
<where>
<if test="code != null and code != ''">
AND t1.code = #{code}
and t1.invSpaceCode IS NOT NULL
and t1.invSpaceCode != ''
and t1.invSpaceCode IS NOT NULL
and t1.invSpaceCode != ''
</if>
<if test="invSpaceCode != null and invSpaceCode != ''">
AND t1.invSpaceCode = #{invSpaceCode}
</if>
</where>
GROUP BY CODE,
invSpaceCode
invSpaceCode
</select>
<select id="findByGroupCode" resultType="com.glxp.api.res.inv.InvPlaceDetailResponse">
select pd.id,
pd.code,
pd.relId,
pd.batchNo,
pd.produceDate productionDate,
pd.expireDate,
bp.ggxh,
bp.cpmctymc productName,
bp.zczbhhzbapzbh,
bp.ylqxzcrbarmc,
bp.nameCode,
bp.manufactory,
pd.invSpaceCode,
pd.invCode,
ad.name deptName,
aw.name invName,
sp.name invSpaceName,
ifnull(sum(pd.inCount), 0) as inCount,
ifnull(sum(pd.outCount), 0) as outCount,
pd.inCount - pd.outCount as reCount
pd.code,
pd.relId,
pd.batchNo,
pd.produceDate productionDate,
pd.expireDate,
bp.ggxh,
bp.cpmctymc productName,
bp.zczbhhzbapzbh,
bp.ylqxzcrbarmc,
bp.nameCode,
bp.manufactory,
pd.invSpaceCode,
pd.invCode,
ad.name deptName,
aw.name invName,
sp.name invSpaceName,
ifnull(sum(pd.inCount), 0) as inCount,
ifnull(sum(pd.outCount), 0) as outCount,
pd.inCount - pd.outCount as reCount
from inv_prein_product_detail pd
left join basic_udirel bu on pd.relId = bu.id
left join basic_products bp on bp.uuid = bu.uuid
left join auth_dept ad on pd.deptCode = ad.code
left join auth_warehouse aw on pd.invCode = aw.code
left join auth_space sp on pd.invSpaceCode = sp.code
and sp.invStorageCode = pd.deptCode and sp.invWarehouseCode = pd.invCode
left join basic_udirel bu on pd.relId = bu.id
left join basic_products bp on bp.uuid = bu.uuid
left join auth_dept ad on pd.deptCode = ad.code
left join auth_warehouse aw on pd.invCode = aw.code
left join auth_space sp on pd.invSpaceCode = sp.code
and sp.invStorageCode = pd.deptCode and sp.invWarehouseCode = pd.invCode
<where>
<if test="invCode != null and invCode != ''">
AND pd.invCode = #{invCode}
@ -316,21 +319,21 @@
<select id="findBySpaceList" resultType="com.glxp.api.entity.inv.InvPreInProductDetailEntity">
select pd.id,
pd.code,
pd.relId,
pd.batchNo,
pd.produceDate,
pd.expireDate,
pd.invSpaceCode,
pd.deptCode,
pd.invCode,
pd.supId,
pd.nameCode,
pd.invSpaceCode,
ifnull(sum(pd.count), 0) as count,
ifnull(sum(pd.inCount), 0) as inCount,
ifnull(sum(pd.outCount), 0) as outCount,
ifnull(sum(pd.reCount), 0) as reCount
pd.code,
pd.relId,
pd.batchNo,
pd.produceDate,
pd.expireDate,
pd.invSpaceCode,
pd.deptCode,
pd.invCode,
pd.supId,
pd.nameCode,
pd.invSpaceCode,
ifnull(sum(pd.count), 0) as count,
ifnull(sum(pd.inCount), 0) as inCount,
ifnull(sum(pd.outCount), 0) as outCount,
ifnull(sum(pd.reCount), 0) as reCount
from inv_prein_product_detail pd
<where>
reCount > 0
@ -427,8 +430,7 @@
AND batchNo is null
</if>
and inBatchNo > #{inBatchNo}
LIMIT 1
LIMIT 1
</where>
</select>
</mapper>

@ -88,6 +88,9 @@
<if test="code != null and code != ''">
AND code = #{code}
</if>
<if test="price != null">
AND price = #{price}
</if>
<if test="mainAction != null and mainAction != ''">
AND mainAction = #{mainAction}
</if>

@ -433,6 +433,8 @@
left join basic_corp on ip.supId = basic_corp.erpId
left join auth_dept on auth_dept.code = ip.deptCode
left join auth_warehouse on auth_warehouse.code = ip.invCode
left join basic_product_category_rel on basic_product_category_rel.relId = basic_udirel.id
left join basic_product_category on basic_product_category_rel.code = basic_product_category.code
left join inv_product_detail ipd on ip.invCode = ipd.invCode and ip.relIdFk = ipd.relId and
ifnull(ip.batchNo, 'empty') = ifnull(ipd.batchNo, 'empty')
<where>
@ -491,6 +493,15 @@
<if test="invSpaceCode != null and invSpaceCode != ''">
AND ipd.invSpaceCode = #{invSpaceCode}
</if>
<if test="basicPrductRemak1 != '' and basicPrductRemak1 != null">
AND bp.basicPrductRemak1 like concat('%', #{basicPrductRemak1}, '%')
</if>
<if test="manufactory != null and manufactory != ''">
and bp.manufactory LIKE concat('%', #{manufactory}, '%')
</if>
<if test="category != '' and category != null">
AND basic_product_category.name = #{category}
</if>
</where>
group by ip.relIdFk
having reCount > 0

@ -283,3 +283,5 @@ CALL Pro_Temp_ColumnWork('inv_prein_product_detail', 'price', 'decimal(10, 2)',
CALL Pro_Temp_ColumnWork('inv_product_detail', 'outFlag', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('inv_pre_product_detail', 'outFlag', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('inv_prein_product_detail', 'outFlag', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'lyInvType', 'tinyint', 1);

@ -1003,3 +1003,6 @@ CALL Pro_Temp_ColumnWork('io_stat_month', 'invCode', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('io_stat_quarter', 'invCode', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('io_stat_year', 'invCode', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('auth_warehouse', 'lyInvType', 'tinyint', 1);

Loading…
Cancel
Save