Merge branch 'dev' into test

pro
wj 2 years ago
commit 169e50ac78

@ -19,6 +19,7 @@ import com.glxp.api.req.auth.FilterInvBusUserRequest;
import com.glxp.api.req.basic.BasicEntrustRecRequest;
import com.glxp.api.req.inout.*;
import com.glxp.api.req.system.DeleteRequest;
import com.glxp.api.req.udims.PostUdimsOrderRequest;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.res.inout.IoOrderDetailBizResponse;
import com.glxp.api.res.inout.IoOrderDetailCodeResponse;
@ -28,6 +29,7 @@ import com.glxp.api.service.auth.InvBusUserService;
import com.glxp.api.service.basic.EntrustReceService;
import com.glxp.api.service.basic.IBasicBussinessTypeService;
import com.glxp.api.service.inout.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
@ -46,6 +48,7 @@ import java.util.List;
@Slf4j
@RestController
@Api("单据相关")
public class IoOrderController extends BaseController {
@Resource
@ -638,5 +641,15 @@ public class IoOrderController extends BaseController {
return ResultVOUtils.success();
}
// --------------------------------------------------------UDI_MS平台--------------------------------------------------------------------------------------
@ApiOperation("udims上传单据")
@PostMapping("/warehouse/inout/postOrdersUdims")
public BaseResponse postOrdersUdims(@RequestBody PostUdimsOrderRequest orderRequest) {
ioAddInoutService.creatOrderByUdims(orderRequest);
return ResultVOUtils.success();
}
}

@ -283,7 +283,7 @@ public class InvInnerOrderPrintController {
Map<String,Object> map=new HashMap<>();
map.put("data",printEntities);
String param = JSON.toJSONString(map);
JasperUtils.jasperReport(request, response, param, filePath + "/pdf/template/" + systemPDFTemplateEntity.getPath(), "pdf");
JasperUtils.jasperReport(request, response, param, filePath + "/pdf/template/" + FileUtils.getLastFileName(systemPDFTemplateEntity.getPath()), "pdf");
String orderId = "";
for (InnerOrderPrintResponse InnerOrderPrintResponse : mStockPrintEntities) {

@ -34,7 +34,6 @@ import com.glxp.api.req.sync.SpsSyncDataRequest;
import com.glxp.api.req.sync.SyncUpLoadRequest;
import com.glxp.api.res.sync.*;
import com.glxp.api.service.auth.InvWarehouseService;
import com.glxp.api.service.basic.IBasicBusTypeChangeService;
import com.glxp.api.service.basic.IBasicBussinessTypeService;
import com.glxp.api.service.inout.IoAddInoutService;
import com.glxp.api.service.inout.IoCheckInoutService;
@ -432,34 +431,34 @@ public class SpsSyncDownloadController {
private void saveUploadSysSettingData(SpsSyncSysSettingResponse bean) {
if (CollectionUtil.isNotEmpty(bean.getSystemParamConfigEntities())) {
systemParamConfigDao.replaceBatch(bean.getSystemParamConfigEntities());
systemParamConfigDao.replaceBatchs(bean.getSystemParamConfigEntities());
}
if (CollectionUtil.isNotEmpty(bean.getEntrustReceEntities())) {
entrustReceDao.replaceBatch(bean.getEntrustReceEntities());
entrustReceDao.replaceBatchs(bean.getEntrustReceEntities());
}
if (CollectionUtil.isNotEmpty(bean.getSystemPDFModuleEntities())) {
systemPDFModuleDao.replaceBatch(bean.getSystemPDFModuleEntities());
systemPDFModuleDao.replaceBatchs(bean.getSystemPDFModuleEntities());
}
if (CollectionUtil.isNotEmpty(bean.getSystemPDFTemplateEntities())) {
systemPDFTemplateDao.replaceBatch(bean.getSystemPDFTemplateEntities());
systemPDFTemplateDao.replaceBatchs(bean.getSystemPDFTemplateEntities());
}
if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceCodeEntities())) {
sysPdfTemplateRelevanceCodeDao.replaceBatch(bean.getSysPdfTemplateRelevanceCodeEntities());
sysPdfTemplateRelevanceCodeDao.replaceBatchs(bean.getSysPdfTemplateRelevanceCodeEntities());
}
if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceBizEntities())) {
sysPdfTemplateRelevanceBizDao.replaceBatch(bean.getSysPdfTemplateRelevanceBizEntities());
sysPdfTemplateRelevanceBizDao.replaceBatchs(bean.getSysPdfTemplateRelevanceBizEntities());
}
if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceLabelEntities())) {
sysPdfTemplateRelevanceLabelDao.replaceBatch(bean.getSysPdfTemplateRelevanceLabelEntities());
sysPdfTemplateRelevanceLabelDao.replaceBatchs(bean.getSysPdfTemplateRelevanceLabelEntities());
}
if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceStatemenEntities())) {
sysPdfTemplateRelevanceStatemenDao.replaceBatch(bean.getSysPdfTemplateRelevanceStatemenEntities());
sysPdfTemplateRelevanceStatemenDao.replaceBatchs(bean.getSysPdfTemplateRelevanceStatemenEntities());
}
if (CollectionUtil.isNotEmpty(bean.getBasicBusTypePreEntities())) {
basicBusTypePreDao.replaceBatch(bean.getBasicBusTypePreEntities());
basicBusTypePreDao.replaceBatchs(bean.getBasicBusTypePreEntities());
}
if (CollectionUtil.isNotEmpty(bean.getBasicBusTypeChangeEntities())) {
basicBusTypeChangeDao.replaceBatch(bean.getBasicBusTypeChangeEntities());
basicBusTypeChangeDao.replaceBatchs(bean.getBasicBusTypeChangeEntities());
}
@ -473,44 +472,44 @@ public class SpsSyncDownloadController {
private void saveUploadThrData(SpsSyncThrDataResponse bean) {
if (CollectionUtil.isNotEmpty(bean.getDeptEntities())) {
thrDeptDao.replaceBatch(bean.getDeptEntities());
thrDeptDao.replaceBatchs(bean.getDeptEntities());
}
if (CollectionUtil.isNotEmpty(bean.getInvWarehouseEntities())) {
thrInvWarehouseDao.replaceBatch(bean.getInvWarehouseEntities());
thrInvWarehouseDao.replaceBatchs(bean.getInvWarehouseEntities());
}
if (CollectionUtil.isNotEmpty(bean.getProductsEntityList())) {
thrProductsDao.replaceBatch(bean.getProductsEntityList());
thrProductsDao.replaceBatchs(bean.getProductsEntityList());
}
if (CollectionUtil.isNotEmpty(bean.getCorpEntities())) {
thrCorpDao.replaceBatch(bean.getCorpEntities());
thrCorpDao.replaceBatchs(bean.getCorpEntities());
}
}
private void saveUploadUserData(SpsSyncDataResponse bean) {
if (CollectionUtil.isNotEmpty(bean.getAuthAdminList())) {
authAdminDao.replaceBatch(bean.getAuthAdminList());
authAdminDao.replaceBatchs(bean.getAuthAdminList());
}
if (CollectionUtil.isNotEmpty(bean.getDeptEntityList())) {
deptDao.replaceBatch(bean.getDeptEntityList());
deptDao.replaceBatchs(bean.getDeptEntityList());
}
if (CollectionUtil.isNotEmpty(bean.getDeptUserEntities())) {
deptUserDao.replaceBatch(bean.getDeptUserEntities());
deptUserDao.replaceBatchs(bean.getDeptUserEntities());
}
if (CollectionUtil.isNotEmpty(bean.getInvWarehouseEntities())) {
invWarehouseDao.replaceBatch(bean.getInvWarehouseEntities());
invWarehouseDao.replaceBatchs(bean.getInvWarehouseEntities());
}
if (CollectionUtil.isNotEmpty(bean.getWarehouseUserEntities())) {
warehouseUserDao.replaceBatch(bean.getWarehouseUserEntities());
warehouseUserDao.replaceBatchs(bean.getWarehouseUserEntities());
}
if (CollectionUtil.isNotEmpty(bean.getWarehouseBussinessTypeEntities())) {
warehouseBussinessTypeDao.replaceBatch(bean.getWarehouseBussinessTypeEntities());
warehouseBussinessTypeDao.replaceBatchs(bean.getWarehouseBussinessTypeEntities());
}
if (CollectionUtil.isNotEmpty(bean.getInvSpaces())) {
invSpaceDao.replaceBatch(bean.getInvSpaces());
invSpaceDao.replaceBatchs(bean.getInvSpaces());
}
if (CollectionUtil.isNotEmpty(bean.getInvBusUserEntities())) {
invBusUserDao.replaceBatch(bean.getInvBusUserEntities());
invBusUserDao.replaceBatchs(bean.getInvBusUserEntities());
}
}
@ -526,13 +525,13 @@ public class SpsSyncDownloadController {
*/
private void saveUploadDocumentTypeData(SpsSyncBusResponse bean) {
if (CollectionUtil.isNotEmpty(bean.getBussinessTypeEntities())) {
basicBussinessTypeDao.replaceBatch(bean.getBussinessTypeEntities());
basicBussinessTypeDao.replaceBatchs(bean.getBussinessTypeEntities());
}
if (CollectionUtil.isNotEmpty(bean.getBusTypeChangeEntities())) {
busTypeChangeDao.replaceBatch(bean.getBusTypeChangeEntities());
busTypeChangeDao.replaceBatchs(bean.getBusTypeChangeEntities());
}
if (CollectionUtil.isNotEmpty(bean.getThrBusTypeOriginEntities())) {
thrBusTypeOriginDao.replaceBatch(bean.getThrBusTypeOriginEntities());
thrBusTypeOriginDao.replaceBatchs(bean.getThrBusTypeOriginEntities());
}
}
@ -547,10 +546,10 @@ public class SpsSyncDownloadController {
*/
private void saveUploadOtherData(SpsSyncOtherDataResponse bean) {
if (CollectionUtil.isNotEmpty(bean.getIoCodeLostList())) {
ioCodeLostMapper.replaceBatch(bean.getIoCodeLostList());
ioCodeLostMapper.replaceBatchs(bean.getIoCodeLostList());
}
if (CollectionUtil.isNotEmpty(bean.getIoCodeRelList())) {
ioCodeRelMapper.replaceBatch(bean.getIoCodeRelList());
ioCodeRelMapper.replaceBatchs(bean.getIoCodeRelList());
}
}
@ -573,34 +572,34 @@ public class SpsSyncDownloadController {
*/
private void saveUploadBasicData(SpsSyncBasicDataResponse bean) {
if (CollectionUtil.isNotEmpty(bean.getHospTypeList())) {
basicHospTypeDao.replaceBatch(bean.getHospTypeList());
basicHospTypeDao.replaceBatchs(bean.getHospTypeList());
}
if (CollectionUtil.isNotEmpty(bean.getUdiRelevanceList())) {
udiRelevanceDao.replaceBatch(bean.getUdiRelevanceList());
udiRelevanceDao.replaceBatchs(bean.getUdiRelevanceList());
}
if (CollectionUtil.isNotEmpty(bean.getProductsList())) {
basicProductsDao.replaceBatch(bean.getProductsList());
basicProductsDao.replaceBatchs(bean.getProductsList());
}
if (CollectionUtil.isNotEmpty(bean.getRelevanceList())) {
relevanceDao.replaceBatch(bean.getRelevanceList());
relevanceDao.replaceBatchs(bean.getRelevanceList());
}
if (CollectionUtil.isNotEmpty(bean.getCorpList())) {
corpDao.replaceBatch(bean.getCorpList());
corpDao.replaceBatchs(bean.getCorpList());
}
if (CollectionUtil.isNotEmpty(bean.getSupCertList())) {
supCertDao.replaceBatch(bean.getSupCertList());
supCertDao.replaceBatchs(bean.getSupCertList());
}
if (CollectionUtil.isNotEmpty(bean.getSupCertSetList())) {
supCertSetDao.replaceBatch(bean.getSupCertSetList());
supCertSetDao.replaceBatchs(bean.getSupCertSetList());
}
if (CollectionUtil.isNotEmpty(bean.getSupCompanyList())) {
supCompanyDao.replaceBatch(bean.getSupCompanyList());
supCompanyDao.replaceBatchs(bean.getSupCompanyList());
}
if (CollectionUtil.isNotEmpty(bean.getSupManufacturerList())) {
supManufacturerDao.replaceBatch(bean.getSupManufacturerList());
supManufacturerDao.replaceBatchs(bean.getSupManufacturerList());
}
if (CollectionUtil.isNotEmpty(bean.getSupProductList())) {
supProductDao.replaceBatch(bean.getSupProductList());
supProductDao.replaceBatchs(bean.getSupProductList());
}
}

@ -18,10 +18,7 @@ import org.apache.ibatis.logging.Log;
import org.apache.ibatis.logging.LogFactory;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.*;
/**
* Mapper ,
@ -82,7 +79,7 @@ public interface BaseMapperPlus<M, T, V> extends BaseMapper<T> {
default boolean insertBatch(Collection<T> entityList, int batchSize) {
String sqlStatement = SqlHelper.getSqlStatement(this.currentMapperClass(), SqlMethod.INSERT_ONE);
return SqlHelper.executeBatch(this.currentModelClass(), log, entityList, batchSize,
(sqlSession, entity) -> sqlSession.insert(sqlStatement, entity));
(sqlSession, entity) -> sqlSession.insert(sqlStatement, entity));
}
/**
@ -91,11 +88,11 @@ public interface BaseMapperPlus<M, T, V> extends BaseMapper<T> {
default boolean updateBatchById(Collection<T> entityList, int batchSize) {
String sqlStatement = SqlHelper.getSqlStatement(this.currentMapperClass(), SqlMethod.UPDATE_BY_ID);
return SqlHelper.executeBatch(this.currentModelClass(), log, entityList, batchSize,
(sqlSession, entity) -> {
MapperMethod.ParamMap<T> param = new MapperMethod.ParamMap<>();
param.put(Constants.ENTITY, entity);
sqlSession.update(sqlStatement, param);
});
(sqlSession, entity) -> {
MapperMethod.ParamMap<T> param = new MapperMethod.ParamMap<>();
param.put(Constants.ENTITY, entity);
sqlSession.update(sqlStatement, param);
});
}
/**
@ -110,7 +107,7 @@ public interface BaseMapperPlus<M, T, V> extends BaseMapper<T> {
Object idVal = tableInfo.getPropertyValue(entity, keyProperty);
String sqlStatement = SqlHelper.getSqlStatement(this.currentMapperClass(), SqlMethod.SELECT_BY_ID);
return StringUtils.checkValNull(idVal)
|| CollectionUtils.isEmpty(sqlSession.selectList(sqlStatement, entity));
|| CollectionUtils.isEmpty(sqlSession.selectList(sqlStatement, entity));
}, (sqlSession, entity) -> {
MapperMethod.ParamMap<T> param = new MapperMethod.ParamMap<>();
param.put(Constants.ENTITY, entity);
@ -242,8 +239,39 @@ public interface BaseMapperPlus<M, T, V> extends BaseMapper<T> {
* @param entityList
* @return
*/
default boolean insertIgnoreBatchs(List<T> entityList) {
return insertIgnoreBatchs(entityList, DEFAULT_BATCH_SIZE);
}
default boolean insertIgnoreBatchs(List<T> entityList, int batchSize) {
try {
int size = entityList.size();
int idxLimit = Math.min(DEFAULT_BATCH_SIZE, size);
int i = 1;
//保存单批提交的数据集合
List<T> oneBatchList = new ArrayList<>();
for (Iterator<T> var7 = entityList.iterator(); var7.hasNext(); ++i) {
T element = var7.next();
oneBatchList.add(element);
if (i == idxLimit) {
this.insertIgnoreBatch(oneBatchList);
//每次提交后需要清空集合数据
oneBatchList.clear();
idxLimit = Math.min(idxLimit + batchSize, size);
}
}
} catch (Exception e) {
log.error("insertIgnoreBatch fail", e);
return false;
}
return true;
}
int insertIgnoreBatch(List<T> entityList);
/**
*
* replace intoPrimaryKeyuniqueinsert into
@ -262,6 +290,36 @@ public interface BaseMapperPlus<M, T, V> extends BaseMapper<T> {
* @param entityList
* @return
*/
default boolean replaceBatchs(List<T> entityList) {
return this.replaceBatchs(entityList, DEFAULT_BATCH_SIZE);
}
default boolean replaceBatchs(List<T> entityList, int batchSize) {
try {
int size = entityList.size();
int idxLimit = Math.min(DEFAULT_BATCH_SIZE, size);
int i = 1;
//保存单批提交的数据集合
List<T> oneBatchList = new ArrayList<>();
for (Iterator<T> var7 = entityList.iterator(); var7.hasNext(); ++i) {
T element = var7.next();
oneBatchList.add(element);
if (i == idxLimit) {
this.replaceBatch(oneBatchList);
//每次提交后需要清空集合数据
oneBatchList.clear();
idxLimit = Math.min(idxLimit + batchSize, size);
}
}
} catch (Exception e) {
log.error("insertIgnoreBatch fail", e);
return false;
}
return true;
}
int replaceBatch(List<T> entityList);
}

@ -0,0 +1,36 @@
package com.glxp.api.req.udims;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDate;
/**
* udims
*/
@Data
public class PostUdimsOrderDetailRequest {
//uuid
private String uuidFk;
//批次号
private String batchNo;
//价格
private BigDecimal price;
//销售发票号(第一票)
private String firstSalesInvNo;
//销售发票号(第二票)
private String secSalesInvNo;
//销售清单号(第二票)
private String secSalesListNo;
//开票日期
private LocalDate invoiceDate;
}

@ -0,0 +1,61 @@
package com.glxp.api.req.udims;
import lombok.Data;
import java.util.List;
@Data
public class PostUdimsOrderRequest {
List<OrderBean> orderBeans;
private String customerId;
@Data
public static class OrderBean {
private String orderId;
private String corpOrderId;
private String action;
private String actDate;
private String actor;
private String mainAction;
private String fromCorpId;
private String fromCorp;
private String remark;
private String invStorageCode;
private String deptCode;
private List<PostUdimsOrderDetailRequest> orderDetails;
private List<CodeBean> codes;
@Data
public static class CodeBean {
private String action;
private String mainAction;
private String code;
private String corpOrderId;
private String actor;
private String actDate;
private String fromCorpId;
private String fromCorp;
private String orderId;
private String batchNo;
private String produceDate;
private String expireDate;
private String serialNo;
private Integer count;
private String packageLevel;
private String warehouseCode;
private String customerId;
private String nameCode;
private String supId;//供应商ID
private String invStorageCode;
private String invWarehouseCode;
private String relId;
private Integer status;
private String locStorageCode;
}
}
}

@ -6,7 +6,7 @@ import lombok.Data;
public class CompanyProductRelevanceResponse {
private Long id;
private Integer rlId;
private Long rlId;
private String thirdId;
private String thirdName;
private String uuid;

@ -6,7 +6,7 @@ import lombok.Data;
public class UdiRlSupResponse {
private Long id;
private Integer rlId;
private Long rlId;
private String thirdId;
private String thirdName;
private String uuid;

@ -6,7 +6,7 @@ import java.util.List;
public interface CustomService<T> extends IService<T> {
int insertIgnore(T entity);
int insertIgnoreBatch(List<T> entityList);
boolean insertIgnoreBatch(List<T> entityList);
int replace(T entity);
int replaceBatch(List<T> entityList);
boolean replaceBatch(List<T> entityList);
}

@ -13,8 +13,8 @@ public class CustomServiceImpl<M extends BaseMapper<T>, T> extends ServiceImpl<B
}
@Override
public int insertIgnoreBatch(List<T> entityList) {
return baseMapper.insertIgnoreBatch(entityList);
public boolean insertIgnoreBatch(List<T> entityList) {
return baseMapper.insertIgnoreBatchs(entityList);
}
@Override
@ -23,7 +23,7 @@ public class CustomServiceImpl<M extends BaseMapper<T>, T> extends ServiceImpl<B
}
@Override
public int replaceBatch(List<T> entityList) {
return baseMapper.replaceBatch(entityList);
public boolean replaceBatch(List<T> entityList) {
return baseMapper.replaceBatchs(entityList);
}
}

@ -22,6 +22,7 @@ import com.glxp.api.entity.system.SystemParamConfigEntity;
import com.glxp.api.req.basic.FilterCompanyProductRelevanceRequest;
import com.glxp.api.entity.inout.PdaCodeEntity;
import com.glxp.api.req.inout.PostOrderRequest;
import com.glxp.api.req.udims.PostUdimsOrderRequest;
import com.glxp.api.res.basic.UdiRelevanceResponse;
import com.glxp.api.service.basic.BasicCorpService;
import com.glxp.api.service.basic.IBasicBussinessTypeService;
@ -38,6 +39,7 @@ import com.glxp.api.util.udi.UdiCalCountUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
@ -696,4 +698,101 @@ public class IoAddInoutService {
}
//duims上传单据
@Transactional
public void creatOrderByUdims(PostUdimsOrderRequest postOrderRequest) {
List<PostUdimsOrderRequest.OrderBean> postOrders = postOrderRequest.getOrderBeans();
if (postOrders != null && postOrders.size() > 0) {
for (int i = 0; i < postOrders.size(); i++) {
PostUdimsOrderRequest.OrderBean postOrder = postOrders.get(i);
//创建单据
IoOrderEntity orderEntity = orderService.findByBillNo(postOrder.getOrderId());
if (orderEntity != null) {
//已包含业务单据校验
// orderEntity.setUpdateUser(postOrderRequest.getUserId() + "");
orderEntity.setUpdateTime(new Date());
orderService.update(orderEntity);
List<PostUdimsOrderRequest.OrderBean.CodeBean> pdaCodeEntities = postOrder.getCodes();
if (pdaCodeEntities != null && pdaCodeEntities.size() > 0) {
PostUdimsOrderRequest.OrderBean.CodeBean pdaCodeEntity = pdaCodeEntities.get(0);
//写入条码
List<IoCodeTempEntity> ioCodeEnttities = new ArrayList<>();
for (int index = 0; index < pdaCodeEntities.size(); index++) {
IoCodeTempEntity codeEnttity = new IoCodeTempEntity();
BeanUtils.copyProperties(pdaCodeEntities.get(index), codeEnttity);
codeEnttity.setAction(orderEntity.getAction());
codeEnttity.setMainAction(orderEntity.getMainAction());
codeEnttity.setDeptCode(orderEntity.getDeptCode());
codeEnttity.setOrderId(orderEntity.getBillNo());
codeEnttity.setInvCode(orderEntity.getInvCode());
codeEnttity.setReCount(codeEnttity.getCount() * udiCalCountUtil.getActCount(codeEnttity.getNameCode()));
codeEnttity.setUpdateTime(new Date());
codeEnttity.setCreateTime(DateUtil.parseDate(pdaCodeEntity.getActDate()));
ioCodeEnttities.add(codeEnttity);
}
codeTempService.insertBatch(ioCodeEnttities);
dealProcess(orderEntity);
if (!ioCheckInoutService.checkManual(orderEntity.getBillNo())) {
ioCheckInoutService.check(orderEntity.getBillNo());
}
}
} else {
//创建新单据
BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(postOrder.getAction());
String orderNo = gennerOrderUtils.createScOrderNo(new OrderNoTypeBean(Constant.SCAN_ORDER + StrUtil.trimToEmpty(bussinessTypeEntity.getPrefix()), "yyyyMMdd"));
IoOrderEntity orderSaveRequest = new IoOrderEntity();
orderSaveRequest.setBillNo(orderNo);
orderSaveRequest.setMainAction(postOrder.getMainAction());
orderSaveRequest.setAction(postOrder.getAction());
orderSaveRequest.setCorpOrderId(postOrder.getCorpOrderId());
orderSaveRequest.setFromCorp(postOrder.getFromCorp());
orderSaveRequest.setCustomerId(postOrderRequest.getCustomerId());
orderSaveRequest.setDeptCode(postOrder.getDeptCode());
orderSaveRequest.setInvCode(postOrder.getInvStorageCode());
orderSaveRequest.setStatus(ConstantStatus.ORDER_STATUS_PROCESS);
orderSaveRequest.setDealStatus(ConstantStatus.ORDER_DEAL_POST);
// orderSaveRequest.setCreateUser(postOrderRequest.getUserId() + "");
// orderSaveRequest.setUpdateUser(postOrderRequest.getUserId() + "");
orderSaveRequest.setUpdateTime(new Date());
orderSaveRequest.setBusType(bussinessTypeEntity.getBusType());
orderSaveRequest.setOrderType(ConstantStatus.ORDER_TYPE_SCAN);
orderSaveRequest.setFromType(ConstantStatus.FROM_UDIMS);
List<PostUdimsOrderRequest.OrderBean.CodeBean> pdaCodeEntities = postOrder.getCodes();
if (pdaCodeEntities != null && pdaCodeEntities.size() > 0) {
PostUdimsOrderRequest.OrderBean.CodeBean pdaCodeEntity = pdaCodeEntities.get(0);
if (pdaCodeEntity.getActDate() != null) {
orderSaveRequest.setCreateTime(DateUtil.parseDate(pdaCodeEntity.getActDate()));
}
//写入条码
List<IoCodeTempEntity> ioCodeEnttities = new ArrayList<>();
for (int index = 0; index < pdaCodeEntities.size(); index++) {
IoCodeTempEntity codeEnttity = new IoCodeTempEntity();
BeanUtils.copyProperties(pdaCodeEntities.get(index), codeEnttity);
codeEnttity.setAction(orderSaveRequest.getAction());
codeEnttity.setMainAction(orderSaveRequest.getMainAction());
codeEnttity.setDeptCode(orderSaveRequest.getDeptCode());
codeEnttity.setOrderId(orderSaveRequest.getBillNo());
codeEnttity.setInvCode(orderSaveRequest.getInvCode());
codeEnttity.setReCount(codeEnttity.getCount() * udiCalCountUtil.getActCount(codeEnttity.getNameCode()));
codeEnttity.setUpdateTime(new Date());
codeEnttity.setCreateTime(DateUtil.parseDate(pdaCodeEntity.getActDate()));
ioCodeEnttities.add(codeEnttity);
}
codeTempService.insertBatch(ioCodeEnttities);
}
orderService.insertOrder(orderSaveRequest);
dealProcess(orderSaveRequest);
if (!ioCheckInoutService.checkManual(orderEntity.getBillNo())) {
ioCheckInoutService.check(orderEntity.getBillNo());
}
}
}
}
}
}

@ -9,6 +9,9 @@ import java.util.List;
@Data
public class InvWarehouseTreeVo extends InvWarehouseEntity {
private String deptCode;
private String deptName;
List<WarehouseBussinessTypeEntity> bussinessTypeList = new ArrayList<>();

@ -401,10 +401,11 @@
<select id="selectInvListTreeByUser" resultMap="selectInvListTreeByUser">
select auth_warehouse.`code`,
auth_warehouse.name,
auth_warehouse.name warehouseName,
auth_warehouse.parentId,
auth_warehouse.parentCode,
auth_dept.name warehouseName,
auth_dept.code deptCode,
auth_dept.name deptName,
auth_warehouse.advanceType
from auth_warehouse
inner join auth_dept on auth_warehouse.parentId = auth_dept.code

Loading…
Cancel
Save