Merge remote-tracking branch 'origin/dev' into dev

test^2
郑明梁 2 years ago
commit 82a9da64aa

@ -76,6 +76,5 @@ public class HdSchemaExecutor implements ApplicationRunner {
public void buildSchemas() {
// schema.add(new SchemaData("v2.1", "schema_v2.1.sql"));
schema.add(new SchemaData("v2.2", "schema_v2.2.sql"));
// schema.add(new SchemaData("v2.3", "schema_v2.3.sql"));
}
}

@ -121,11 +121,11 @@ public class BasicCorpController {
BasicCorpEntity basicUnitMaintainEntity = new BasicCorpEntity();
BeanUtils.copyProperties(basicUnitMaintainSaveRequest, basicUnitMaintainEntity);
basicUnitMaintainEntity.setErpId(CustomUtil.getId());
if(basicUnitMaintainSaveRequest.getCorpType()==1){
if (basicUnitMaintainSaveRequest.getCorpType() == 1) {
basicUnitMaintainEntity.setOutType(ConstantStatus.CORP_SICK_CUS);
}else if(basicUnitMaintainSaveRequest.getCorpType()==2){
} else if (basicUnitMaintainSaveRequest.getCorpType() == 2) {
basicUnitMaintainEntity.setOutType(ConstantStatus.CORP_SICK_SICK);
}else{
} else {
basicUnitMaintainEntity.setOutType(ConstantStatus.CORP_SICK_INN);
}
basicUnitMaintainEntity.setUpdateTime(new Date());
@ -164,7 +164,11 @@ public class BasicCorpController {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
basicUnitMaintainFilterRequest.setOutType(ConstantStatus.CORP_SICK_SICK);
List<Integer> corpTypeLists = new ArrayList<>();
corpTypeLists.add(1);
corpTypeLists.add(2);
basicUnitMaintainFilterRequest.setCorpTypeLists(corpTypeLists);
basicUnitMaintainFilterRequest.setOutType(0);
List<BasicCorpEntity> basicUnitMaintainEntities;
basicUnitMaintainEntities = basicUnitMaintainService.filterList(basicUnitMaintainFilterRequest);
PageInfo<BasicCorpEntity> pageInfo;

@ -87,6 +87,35 @@ public class InvPreProductController extends BaseController {
return ResultVOUtils.success(pageResponse);
}
/**
*
*
* @param filterInvPreProductRequest
* @return
*/
@GetMapping("/spms/inv/pre/product/filterStock")
public BaseResponse filterListStock(FilterInvPreProductRequest filterInvPreProductRequest) {
boolean showSup = false; //前端控制表格显示字段
if (StrUtil.isNotBlank(filterInvPreProductRequest.getUdiCode())) {
filterInvPreProductRequest.setNameCode(FilterUdiUtils.getDiStr(filterInvPreProductRequest.getUdiCode()));
}
if (StrUtil.isBlank(filterInvPreProductRequest.getInvCode())) {
List<String> invCodes = warehouseUserService.selectCodeByUser(customerService.getUserIdStr());
if (CollUtil.isNotEmpty(invCodes)) {
filterInvPreProductRequest.setInvCodes(invCodes);
}
}
List<InvPreProductResponse> list = invPreProductService.filterListStock(filterInvPreProductRequest);
PageInfo<InvPreProductResponse> pageInfo = new PageInfo<>(list);
InvPreProductPageResponse<InvPreProductResponse> pageResponse = new InvPreProductPageResponse<>();
pageResponse.setList(pageInfo.getList());
pageResponse.setTotal(pageInfo.getTotal());
pageResponse.setShowSup(showSup);
return ResultVOUtils.success(pageResponse);
}
/**
*
*

@ -8,15 +8,14 @@ import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.controller.BaseController;
import com.glxp.api.entity.inv.InvPreInProductDetailEntity;
import com.glxp.api.entity.inv.InvPreProductDetailEntity;
import com.glxp.api.req.inv.FilterInvPreProductDetailRequest;
import com.glxp.api.req.inv.FilterInvPreinDetailRequest;
import com.glxp.api.req.inv.FilterInvPreinProductRequest;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.res.inv.*;
import com.glxp.api.res.inv.InvPreProductDetailResponse;
import com.glxp.api.res.inv.InvPreProductPageResponse;
import com.glxp.api.res.inv.InvPreinProductResponse;
import com.glxp.api.service.auth.CustomerService;
import com.glxp.api.service.auth.WarehouseUserService;
import com.glxp.api.service.inv.InvPreinDetailService;
import com.glxp.api.service.inv.InvPreinProductDetailService;
import com.glxp.api.service.inv.InvPreinProductService;
import com.glxp.api.util.udi.FilterUdiUtils;
@ -78,6 +77,36 @@ public class InvPreinProductController extends BaseController {
return ResultVOUtils.success(pageResponse);
}
/**
*
*
* @param filterInvPreinProductRequest
* @return
*/
@GetMapping("/spms/inv/pre/in/product/filterStock")
public BaseResponse filterListStock(FilterInvPreinProductRequest filterInvPreinProductRequest) {
boolean showSup = false; //前端控制表格显示字段
if (StrUtil.isNotBlank(filterInvPreinProductRequest.getUdiCode())) {
filterInvPreinProductRequest.setNameCode(FilterUdiUtils.getDiStr(filterInvPreinProductRequest.getUdiCode()));
}
if (StrUtil.isBlank(filterInvPreinProductRequest.getInvCode())) {
List<String> invCodes = warehouseUserService.selectCodeByUser(customerService.getUserIdStr());
if (CollUtil.isNotEmpty(invCodes)) {
filterInvPreinProductRequest.setInvCodes(invCodes);
}
}
List<InvPreinProductResponse> list = invPreinProductService.filterListStock(filterInvPreinProductRequest);
PageInfo<InvPreinProductResponse> pageInfo = new PageInfo<>(list);
InvPreProductPageResponse<InvPreinProductResponse> pageResponse = new InvPreProductPageResponse<>();
pageResponse.setList(pageInfo.getList());
pageResponse.setTotal(pageInfo.getTotal());
pageResponse.setShowSup(showSup);
return ResultVOUtils.success(pageResponse);
}
/**
*
*

@ -119,6 +119,40 @@ public class InvProductController extends BaseController {
return ResultVOUtils.success(pageResponse);
}
/**
*
*
* @param filterInvProductRequest
* @return
*/
@GetMapping("/spms/inv/product/filterStock")
public BaseResponse filterListStock(FilterInvProductRequest filterInvProductRequest) {
boolean showSup = false; //前端控制表格显示列字段
if (StrUtil.isNotBlank(filterInvProductRequest.getUdiCode())) {
filterInvProductRequest.setNameCode(FilterUdiUtils.getDiStr(filterInvProductRequest.getUdiCode()));
}
if (StrUtil.isBlank(filterInvProductRequest.getInvCode())) {
List<String> invCodes = warehouseUserService.selectCodeByUser(customerService.getUserIdStr());
if (CollUtil.isNotEmpty(invCodes)) {
filterInvProductRequest.setInvCodes(invCodes);
}
}
List<InvProductResponse> list = invProductService.filterListStock(filterInvProductRequest);
PageInfo<InvProductResponse> pageInfo = new PageInfo<>(list);
InvProductPageResponse<InvProductResponse> pageResponse = new InvProductPageResponse();
pageResponse.setList(pageInfo.getList());
pageResponse.setTotal(pageInfo.getTotal());
pageResponse.setShowSup(showSup);
return ResultVOUtils.success(pageResponse);
}
/**
*
*

@ -12,6 +12,9 @@ import com.glxp.api.constant.Constant;
import com.glxp.api.constant.ConstantStatus;
import com.glxp.api.constant.ConstantType;
import com.glxp.api.controller.BaseController;
import com.glxp.api.controller.inv.InvPreProductController;
import com.glxp.api.controller.inv.InvPreinProductController;
import com.glxp.api.controller.inv.InvProductController;
import com.glxp.api.entity.auth.AuthAdmin;
import com.glxp.api.entity.auth.InvWarehouseEntity;
import com.glxp.api.entity.basic.BasicBusTypeChangeEntity;
@ -26,23 +29,33 @@ import com.glxp.api.req.inout.AddReceiveDetailRequest;
import com.glxp.api.req.inout.FilterReceiveDetailRequest;
import com.glxp.api.req.inout.FilterReceiveRequest;
import com.glxp.api.req.inout.UpdateReceiveDetailRequest;
import com.glxp.api.req.purchase.*;
import com.glxp.api.req.inv.FilterInvPreProductRequest;
import com.glxp.api.req.inv.FilterInvPreinProductRequest;
import com.glxp.api.req.inv.FilterInvProductRequest;
import com.glxp.api.req.purchase.purReceiveRequest;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.res.inout.ReceiveDetailResponse;
import com.glxp.api.res.inout.ReceiveResponse;
import com.glxp.api.res.inv.InvPreProductResponse;
import com.glxp.api.res.inv.InvPreinProductResponse;
import com.glxp.api.res.inv.InvProductResponse;
import com.glxp.api.service.auth.CustomerService;
import com.glxp.api.service.auth.InvWarehouseService;
import com.glxp.api.service.auth.WarehouseUserService;
import com.glxp.api.service.basic.IBasicBusTypeChangeService;
import com.glxp.api.service.basic.UdiProductService;
import com.glxp.api.service.inout.IoOrderDetailBizService;
import com.glxp.api.service.inout.IoOrderService;
import com.glxp.api.service.inout.ReceiveService;
import com.glxp.api.service.inout.ReceivedetailService;
import com.glxp.api.service.inv.InvPreProductService;
import com.glxp.api.service.inv.InvPreinProductService;
import com.glxp.api.service.inv.InvProductService;
import com.glxp.api.service.purchase.*;
import com.glxp.api.util.CustomUtil;
import com.glxp.api.util.GennerOrderUtils;
import com.glxp.api.util.OrderNoTypeBean;
import org.springframework.beans.BeanUtils;
import com.glxp.api.util.udi.FilterUdiUtils;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -88,6 +101,13 @@ public class PurOrderReceiveController extends BaseController {
IoOrderDetailBizService ioOrderDetailBizService;
@Resource
IoPurChangeService purChangeService;
@Resource
InvPreProductController invPreProductController;
@Resource
InvPreinProductController invPreinProductController;
@Resource
InvProductController invProductController;
@AuthRuleAnnotation("")
@ -199,12 +219,66 @@ public class PurOrderReceiveController extends BaseController {
return ResultVOUtils.success(orderNo);
}
@Resource
WarehouseUserService warehouseUserService;
@Resource
InvPreProductService invPreProductService;
@Resource
InvPreinProductService invPreinProductService;
@Resource
InvProductService invProductService;
@AuthRuleAnnotation("")
@PostMapping("/udiwms/receive/detail/Update")
public BaseResponse updateReceiveDetail(@RequestBody UpdateReceiveDetailRequest updateReceiveDetailRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
//判断库存
List<InvPreProductResponse> list = new ArrayList<>();
List<InvPreinProductResponse> listinvprein = new ArrayList<>();
List<InvProductResponse> listInv = new ArrayList<>();
if(updateReceiveDetailRequest.getAdvanceType() == 3){
//寄售
FilterInvPreProductRequest request = new FilterInvPreProductRequest();
// BeanUtils.copyProperties(updateReceiveDetailRequest,request);
request.setNameCode(updateReceiveDetailRequest.getNameCode());
request.setInvCode(updateReceiveDetailRequest.getTargetInvCode());
list = selectFilterInvPreProductRequest(request);
}else if(updateReceiveDetailRequest.getAdvanceType() == 2){
//预验收
FilterInvPreinProductRequest request = new FilterInvPreinProductRequest();
// BeanUtils.copyProperties(updateReceiveDetailRequest,request);
request.setNameCode(updateReceiveDetailRequest.getNameCode());
request.setInvCode(updateReceiveDetailRequest.getTargetInvCode());
listinvprein = selectfilterListStock(request);
}else{
FilterInvProductRequest request = new FilterInvProductRequest();
// BeanUtils.copyProperties(updateReceiveDetailRequest,request);
request.setNameCode(updateReceiveDetailRequest.getNameCode());
request.setInvCode(updateReceiveDetailRequest.getTargetInvCode());
listInv = selectFilterInvProductRequest(request);
}
if(list != null && list.size()>0 ){
if( list.get(0).getReCount() < updateReceiveDetailRequest.getCount() ){
return ResultVOUtils.error(999, "库存不足!");
}
}
if(listinvprein != null && listinvprein.size()>0 ){
if(listinvprein.get(0).getReCount() < updateReceiveDetailRequest.getCount() ){
return ResultVOUtils.error(999, "库存不足!");
}
}
if(listInv != null && listInv.size()>0 ){
if(listInv.get(0).getReCount() < updateReceiveDetailRequest.getCount() ){
return ResultVOUtils.error(999, "库存不足!");
}
}
boolean falg = receivedetailService.updateReceiveDetail(updateReceiveDetailRequest);
if (falg) {
return ResultVOUtils.success();
@ -213,6 +287,59 @@ public class PurOrderReceiveController extends BaseController {
}
}
public List<InvPreProductResponse> selectFilterInvPreProductRequest(FilterInvPreProductRequest filterInvPreProductRequest){
if (StrUtil.isNotBlank(filterInvPreProductRequest.getUdiCode())) {
filterInvPreProductRequest.setNameCode(FilterUdiUtils.getDiStr(filterInvPreProductRequest.getUdiCode()));
}
if (StrUtil.isBlank(filterInvPreProductRequest.getInvCode())) {
List<String> invCodes = warehouseUserService.selectCodeByUser(customerService.getUserIdStr());
if (CollUtil.isNotEmpty(invCodes)) {
filterInvPreProductRequest.setInvCodes(invCodes);
}
}
List<InvPreProductResponse> list = invPreProductService.filterListStock(filterInvPreProductRequest);
return list;
}
public List<InvPreinProductResponse> selectfilterListStock(FilterInvPreinProductRequest filterInvPreinProductRequest){
boolean showSup = false; //前端控制表格显示字段
if (StrUtil.isNotBlank(filterInvPreinProductRequest.getUdiCode())) {
filterInvPreinProductRequest.setNameCode(FilterUdiUtils.getDiStr(filterInvPreinProductRequest.getUdiCode()));
}
if (StrUtil.isBlank(filterInvPreinProductRequest.getInvCode())) {
List<String> invCodes = warehouseUserService.selectCodeByUser(customerService.getUserIdStr());
if (CollUtil.isNotEmpty(invCodes)) {
filterInvPreinProductRequest.setInvCodes(invCodes);
}
}
List<InvPreinProductResponse> list = invPreinProductService.filterListStock(filterInvPreinProductRequest);
return list;
}
public List<InvProductResponse> selectFilterInvProductRequest(FilterInvProductRequest filterInvProductRequest){
boolean showSup = false; //前端控制表格显示列字段
if (StrUtil.isNotBlank(filterInvProductRequest.getUdiCode())) {
filterInvProductRequest.setNameCode(FilterUdiUtils.getDiStr(filterInvProductRequest.getUdiCode()));
}
if (StrUtil.isBlank(filterInvProductRequest.getInvCode())) {
List<String> invCodes = warehouseUserService.selectCodeByUser(customerService.getUserIdStr());
if (CollUtil.isNotEmpty(invCodes)) {
filterInvProductRequest.setInvCodes(invCodes);
}
}
List<InvProductResponse> list = invProductService.filterListStock(filterInvProductRequest);
return list;
}
@AuthRuleAnnotation("")
@GetMapping("/udiwms/receive/order/del")

@ -2,11 +2,8 @@ package com.glxp.api.dao.inv;
import com.glxp.api.dao.BaseMapperPlus;
import com.glxp.api.entity.inv.InvPreProductEntity;
import com.glxp.api.req.inv.FilterInvPlaceRequest;
import com.glxp.api.req.inv.FilterInvPreProductRequest;
import com.glxp.api.res.inv.InvPlaceDetailResponse;
import com.glxp.api.res.inv.InvPreProductResponse;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -23,6 +20,8 @@ public interface InvPreProductDao extends BaseMapperPlus<InvPreProductDao, InvPr
*/
List<InvPreProductResponse> filterList(FilterInvPreProductRequest invPreProductRequest);
List<InvPreProductResponse> filterListStock(FilterInvPreProductRequest invPreProductRequest);
/**

@ -2,9 +2,7 @@ package com.glxp.api.dao.inv;
import com.glxp.api.dao.BaseMapperPlus;
import com.glxp.api.entity.inv.InvPreinProductEntity;
import com.glxp.api.req.inv.FilterInvPreProductRequest;
import com.glxp.api.req.inv.FilterInvPreinProductRequest;
import com.glxp.api.res.inv.InvPreProductResponse;
import com.glxp.api.res.inv.InvPreinProductResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -25,6 +23,8 @@ public interface InvPreinProductDao extends BaseMapperPlus<InvPreinProductDao, I
*/
List<InvPreinProductResponse> filterList(FilterInvPreinProductRequest invPreProductRequest);
List<InvPreinProductResponse> filterListStock(FilterInvPreinProductRequest invPreProductRequest);
void batchBindSpace(@Param("ids") List<Integer> ids, @Param("invSpaceCode") String invSpaceCode);
/**

@ -28,6 +28,14 @@ public interface InvProductDao extends BaseMapperPlus<InvProductDao, InvProductE
*/
List<InvProductResponse> filterProductList(FilterInvProductRequest filterInvProductRequest);
/**
*
*
* @param filterInvProductRequest
* @return
*/
List<InvProductResponse> filterProductListStock(FilterInvProductRequest filterInvProductRequest);
/**
*
*

@ -1,10 +1,7 @@
package com.glxp.api.req.inout;
import com.glxp.api.entity.inout.PurReceiveEntity;
import lombok.Data;
import java.util.List;
@Data
public class UpdateReceiveDetailRequest {
@ -38,4 +35,8 @@ public class UpdateReceiveDetailRequest {
private String expireDate;
private Integer advanceType;
private String targetInvCode;
}

@ -1,12 +1,8 @@
package com.glxp.api.service.inv;
import com.glxp.api.entity.inv.InvPreProductEntity;
import com.glxp.api.entity.inv.InvProductDetailEntity;
import com.glxp.api.entity.inv.InvProductEntity;
import com.glxp.api.req.inv.FilterInvPreProductRequest;
import com.glxp.api.req.inv.FilterInvProductRequest;
import com.glxp.api.res.inv.InvPreProductResponse;
import com.glxp.api.res.inv.InvProductResponse;
import java.util.List;
@ -32,6 +28,8 @@ public interface InvPreProductService {
*/
List<InvPreProductResponse> filterList(FilterInvPreProductRequest invPreProductRequest);
List<InvPreProductResponse> filterListStock(FilterInvPreProductRequest invPreProductRequest);
List<InvPreProductResponse> findGroupBySpace(FilterInvPreProductRequest invPreProductRequest);

@ -1,9 +1,7 @@
package com.glxp.api.service.inv;
import com.glxp.api.entity.inv.InvPreinProductEntity;
import com.glxp.api.req.inv.FilterInvPreProductRequest;
import com.glxp.api.req.inv.FilterInvPreinProductRequest;
import com.glxp.api.res.inv.InvPreProductResponse;
import com.glxp.api.res.inv.InvPreinProductResponse;
import java.util.List;
@ -30,6 +28,9 @@ public interface InvPreinProductService {
*/
List<InvPreinProductResponse> filterList(FilterInvPreinProductRequest filterInvPreinDetailRequest);
List<InvPreinProductResponse> filterListStock(FilterInvPreinProductRequest filterInvPreinDetailRequest);
/**
*
*

@ -25,6 +25,14 @@ public interface InvProductService {
*/
List<InvProductResponse> filterList(FilterInvProductRequest filterInvProductRequest);
/**
*
*
* @param filterInvProductRequest
* @return
*/
List<InvProductResponse> filterListStock(FilterInvProductRequest filterInvProductRequest);
/**
*
*

@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.inv.InvPreProductDao;
import com.glxp.api.entity.inv.InvPreProductEntity;
import com.glxp.api.entity.inv.InvProductEntity;
import com.glxp.api.req.inv.FilterInvPreProductRequest;
import com.glxp.api.res.inv.InvPreProductResponse;
import com.glxp.api.service.inv.InvPreProductService;
@ -58,6 +57,17 @@ public class InvPreProductServiceImpl implements InvPreProductService {
return invPreProductDao.filterList(invPreProductRequest);
}
@Override
public List<InvPreProductResponse> filterListStock(FilterInvPreProductRequest invPreProductRequest) {
if (null == invPreProductRequest) {
return Collections.emptyList();
}
if (null != invPreProductRequest.getPage()) {
PageHelper.offsetPage((invPreProductRequest.getPage() - 1) * invPreProductRequest.getLimit(), invPreProductRequest.getLimit());
}
return invPreProductDao.filterListStock(invPreProductRequest);
}
@Override
public List<InvPreProductResponse> findGroupBySpace(FilterInvPreProductRequest invPreProductRequest) {
if (null == invPreProductRequest) {

@ -57,6 +57,17 @@ public class InvPreinProductServiceImpl implements InvPreinProductService {
return invPreinProductDao.filterList(invPreProductRequest);
}
@Override
public List<InvPreinProductResponse> filterListStock(FilterInvPreinProductRequest invPreProductRequest) {
if (null == invPreProductRequest) {
return Collections.emptyList();
}
if (null != invPreProductRequest.getPage()) {
PageHelper.offsetPage((invPreProductRequest.getPage() - 1) * invPreProductRequest.getLimit(), invPreProductRequest.getLimit());
}
return invPreinProductDao.filterListStock(invPreProductRequest);
}
@Override
public List<InvPreinProductEntity> filterPreinProductList(FilterInvPreinProductRequest invPreProductRequest) {
if (null == invPreProductRequest) {
@ -79,6 +90,7 @@ public class InvPreinProductServiceImpl implements InvPreinProductService {
return invPreinProductDao.findGroupBySpace(invPreProductRequest);
}
@Override
public InvPreinProductEntity findById(String id) {
return invPreinProductDao.selectById(id);

@ -58,6 +58,17 @@ public class InvProductServiceImpl implements InvProductService {
return invProductDao.filterProductList(filterInvProductRequest);
}
@Override
public List<InvProductResponse> filterListStock(FilterInvProductRequest filterInvProductRequest) {
if (null == filterInvProductRequest) {
return Collections.emptyList();
}
if (null != filterInvProductRequest.getPage() && null != filterInvProductRequest.getLimit()) {
PageHelper.offsetPage((filterInvProductRequest.getPage() - 1) * filterInvProductRequest.getLimit(), filterInvProductRequest.getLimit());
}
return invProductDao.filterProductListStock(filterInvProductRequest);
}
@Override
public List<InvProductResponse> filterListProduct(FilterInvProductRequest filterInvProductRequest) {

@ -1294,7 +1294,6 @@ public class HeartService {
if (CollUtil.isNotEmpty(syncDataResponse.getDeptUserEntities()))
logs = logs + "部门用户信息:" + syncDataResponse.getDeptUserEntities().size() + "条\n";
if (CollUtil.isNotEmpty(syncDataResponse.getInvSpaces()))
logs = logs + "货位信息:" + syncDataResponse.getInvSpaces().size() + "条\n";
@ -1341,10 +1340,6 @@ public class HeartService {
for (IoOrderEntity orderEntity : orderEntities) {
SyncDataBustypeEntity syncDataBustypeEntity = syncDataBustypeService.findByAction(orderEntity.getAction(), 2);
orderEntity.setUpdateTime(null);
orderEntity.setFromType(ConstantStatus.FROM_UDISP);
orderEntity.setProcessStatus(ConstantStatus.ORDER_DEAL_POST);
orderEntity.setOrderType(ConstantStatus.ORDER_TYPE_SCAN);
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_PROCESS);
if (syncDataBustypeEntity != null) {
if (syncDataBustypeEntity.getSyncStatus() != null && syncDataBustypeEntity.getSyncStatus().compareTo(1) == 0) {
orderEntity.setProcessStatus(ConstantStatus.ORDER_DEAL_DRAFT);
@ -1356,6 +1351,10 @@ public class HeartService {
}
IoOrderEntity temp = orderService.findByBillNo(orderEntity.getBillNo());
if (temp == null) {
orderEntity.setFromType(ConstantStatus.FROM_UDISP);
orderEntity.setProcessStatus(ConstantStatus.ORDER_DEAL_POST);
orderEntity.setOrderType(ConstantStatus.ORDER_TYPE_SCAN);
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_PROCESS);
orderEntity.setId(null);
orderService.insertOrder(orderEntity);
insetOrderDb(syncDataResponse, orderEntity);

@ -80,6 +80,86 @@
group by ipp.id
</select>
<select id="filterListStock" resultType="com.glxp.api.res.inv.InvPreProductResponse">
select ipp.id,
ipp.nameCode,
bp.cpmctymc,
ipp.relIdFk,
bp.ggxh,
ipp.batchNo,
ipp.productionDate,
ipp.expireDate,
bp.ylqxzcrbarmc,
bp.zczbhhzbapzbh,
ipp.inCount,
ipp.outCount,
ipp.reCount,
ipp.customerId,
basic_corp.name supName,
ipp.supId,
auth_dept.name deptName,
auth_warehouse.name invName,
ipp.deptCode,
ipp.invCode,
bp.measname
from inv_pre_product ipp
inner join basic_udirel on ipp.relIdFk = 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
<where>
bp.diType = 1
and ipp.reCount > 0
<if test="cpmctymc != null and cpmctymc != ''">
AND bp.cpmctymc like concat('%', #{cpmctymc}, '%')
</if>
<if test="nameCode != null and nameCode != ''">
AND ipp.nameCode like concat('%', #{nameCode}, '%')
</if>
<if test="relIdFk != null and relIdFk != ''">
AND ipp.relIdFk = #{relIdFk}
</if>
<if test="ggxh != null and ggxh != ''">
AND bp.ggxh like concat('%', #{ggxh}, '%')
</if>
<if test="batchNo != null and batchNo != ''">
AND ipp.batchNo like concat('%', #{batchNo}, '%')
</if>
<if test="productionDate != null and productionDate != ''">
AND ipp.productionDate = #{productionDate}
</if>
<if test="expireDate != null and expireDate != ''">
AND ipp.expireDate = #{expireDate}
</if>
<if test="ylqxzcrbarmc != null and ylqxzcrbarmc != ''">
AND bp.ylqxzcrbarmc like concat('%', #{ylqxzcrbarmc}, '%')
</if>
<if test="zczbhhzbapzbh != null and zczbhhzbapzbh != ''">
AND bp.zczbhhzbapzbh like concat('%', #{zczbhhzbapzbh}, '%')
</if>
<if test="customerId != null and customerId != ''">
AND ipp.customerId = #{customerId}
</if>
<if test="supId != null and supId != ''">
AND ipp.supId = #{supId}
</if>
<if test="deptCode != null and deptCode != ''">
AND ipp.deptCode = #{deptCode}
</if>
<if test="invCode != null and invCode != ''">
AND ipp.invCode = #{invCode}
</if>
<if test="invCodes != null and invCodes.size() != 0">
AND ipp.invCode in
<foreach collection="invCodes" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
</where>
group by ipp.id
</select>
<select id="filterPreProductList" resultType="com.glxp.api.entity.inv.InvPreProductEntity">
select ipp.*
from inv_pre_product ipp
@ -138,7 +218,7 @@
</where>
</select>
<select id="findGroupBySpace" resultType="com.glxp.api.res.inv.InvProductResponse">
<select id="findGroupBySpace" resultType="com.glxp.api.res.inv.InvPreProductResponse">
select
ipp.id,
ipp.nameCode,

@ -79,6 +79,85 @@
group by ipp.id
</select>
<select id="filterListStock" resultType="com.glxp.api.res.inv.InvPreinProductResponse">
select ipp.id,
ipp.nameCode,
bp.cpmctymc,
ipp.relIdFk,
bp.ggxh,
bp.measname,
ipp.batchNo,
ipp.productionDate,
ipp.expireDate,
bp.ylqxzcrbarmc,
bp.zczbhhzbapzbh,
ipp.inCount,
ipp.outCount,
ipp.reCount,
ipp.customerId,
basic_corp.name supName,
ipp.supId,
auth_dept.name deptName,
auth_warehouse.name invName,
ipp.deptCode,
ipp.invCode
from inv_prein_product ipp
inner join basic_udirel on ipp.relIdFk = 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
<where>
ipp.reCount > 0
<if test="cpmctymc != null and cpmctymc != ''">
AND bp.cpmctymc like concat('%', #{cpmctymc}, '%')
</if>
<if test="nameCode != null and nameCode != ''">
AND ipp.nameCode like concat('%', #{nameCode}, '%')
</if>
<if test="relIdFk != null and relIdFk != ''">
AND ipp.relIdFk = #{relIdFk}
</if>
<if test="ggxh != null and ggxh != ''">
AND bp.ggxh like concat('%', #{ggxh}, '%')
</if>
<if test="batchNo != null and batchNo != ''">
AND ipp.batchNo like concat('%', #{batchNo}, '%')
</if>
<if test="productionDate != null and productionDate != ''">
AND ipp.productionDate = #{productionDate}
</if>
<if test="expireDate != null and expireDate != ''">
AND ipp.expireDate = #{expireDate}
</if>
<if test="ylqxzcrbarmc != null and ylqxzcrbarmc != ''">
AND bp.ylqxzcrbarmc like concat('%', #{ylqxzcrbarmc}, '%')
</if>
<if test="zczbhhzbapzbh != null and zczbhhzbapzbh != ''">
AND bp.zczbhhzbapzbh like concat('%', #{zczbhhzbapzbh}, '%')
</if>
<if test="customerId != null and customerId != ''">
AND ipp.customerId = #{customerId}
</if>
<if test="supId != null and supId != ''">
AND ipp.supId = #{supId}
</if>
<if test="deptCode != null and deptCode != ''">
AND ipp.deptCode = #{deptCode}
</if>
<if test="invCode != null and invCode != ''">
AND ipp.invCode = #{invCode}
</if>
<if test="invCodes != null and invCodes.size() != 0">
AND ipp.invCode in
<foreach collection="invCodes" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
</where>
group by ipp.id
</select>
<select id="filterPreProductList" resultType="com.glxp.api.entity.inv.InvPreinProductEntity">
select ipp.*
from inv_prein_product ipp

@ -382,4 +382,94 @@
group by ip.relIdFk
order by ip.updateTime desc
</select>
<select id="filterProductListStock" resultType="com.glxp.api.res.inv.InvProductResponse"
parameterType="com.glxp.api.req.inv.FilterInvProductRequest">
select ip.id,
ip.nameCode,
bp.cpmctymc,
ip.relIdFk,
bp.ggxh,
ip.batchNo,
ip.productionDate,
ip.expireDate,
bp.ylqxzcrbarmc,
bp.zczbhhzbapzbh,
sum(ip.inCount) as inCount,
sum(ip.outCount) as outCount,
sum(ip.reCount) as reCount,
ip.customerId,
basic_corp.name supName,
ip.supId,
auth_dept.name deptName,
auth_warehouse.name invName,
ip.deptCode,
ip.invCode
from inv_product ip
inner join basic_udirel on ip.relIdFk = basic_udirel.id
inner join basic_products bp on basic_udirel.uuid = bp.uuid
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 inv_product_detail ipd on ip.invCode = ipd.invCode and ip.relIdFk = ipd.relId and
ifnull(ip.batchNo, 'empty') = ifnull(ipd.batchNo, 'empty')
<where>
bp.diType = 1
<if test="cpmctymc != null and cpmctymc != ''">
AND bp.cpmctymc like concat('%', #{cpmctymc}, '%')
</if>
<if test="nameCode != null and nameCode != ''">
AND ip.nameCode like concat('%', #{nameCode}, '%')
</if>
<if test="relIdFk != null and relIdFk != ''">
AND ip.relIdFk = #{relIdFk}
</if>
<if test="ggxh != null and ggxh != ''">
AND bp.ggxh like concat('%', #{ggxh}, '%')
</if>
<if test="batchNo != null and batchNo != ''">
AND ip.batchNo like concat('%', #{batchNo}, '%')
</if>
<if test="productionDate != null and productionDate != ''">
AND ip.productionDate = #{productionDate}
</if>
<if test="expireDate != null and expireDate != ''">
AND ip.expireDate = #{expireDate}
</if>
<if test="ylqxzcrbarmc != null and ylqxzcrbarmc != ''">
AND bp.ylqxzcrbarmc like concat('%', #{ylqxzcrbarmc}, '%')
</if>
<if test="zczbhhzbapzbh != null and zczbhhzbapzbh != ''">
AND bp.zczbhhzbapzbh like concat('%', #{zczbhhzbapzbh}, '%')
</if>
<if test="customerId != null and customerId != ''">
AND ip.customerId = #{customerId}
</if>
<if test="supId != null and supId != ''">
AND ip.supId = #{supId}
</if>
<if test="deptCode != null and deptCode != ''">
AND ip.deptCode = #{deptCode}
</if>
<if test="invCode != null and invCode != ''">
AND ip.invCode = #{invCode}
</if>
<if test="invCodes != null and invCodes.size() != 0">
AND ip.invCode in
<foreach collection="invCodes" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="supName != null and supName != ''">
AND basic_corp.name like concat('%', #{supName}, '%')
</if>
<if test="invSpaceCode != null and invSpaceCode != ''">
AND ipd.invSpaceCode = #{invSpaceCode}
</if>
</where>
group by ip.relIdFk
having reCount >0
order by ip.updateTime desc
</select>
</mapper>

Loading…
Cancel
Save