预验收库存,领用等修改

test
anthonywj 1 year ago
parent a038cac875
commit 00c2995717

@ -446,6 +446,7 @@ public class IoOrderDetailBizController extends BaseController {
ioOrderDetailBizEntity.setExpireDate(purReceiveDetailEntity.getExpireDate());
ioOrderDetailBizEntity.setBatchNo(purReceiveDetailEntity.getBatchNo());
ioOrderDetailBizEntity.setSupId(purReceiveDetailEntity.getSupId());
ioOrderDetailBizEntity.setPrice(purReceiveDetailEntity.getPrice());
ioOrderDetailBizEntity.setCount(IntUtil.value(purReceiveDetailEntity.getCount()));
orderDetailBizService.insert(ioOrderDetailBizEntity);
}

@ -256,53 +256,57 @@ public class IoPurChangeService {
BasicBusTypeChangeEntity basicBusTypeChangeEntity = basicBusTypeChangeService.selectByOriginAction(ConstantStatus.BUS_ORDER_HCLY);
purReceiveEntity = receiveService.selectById(purReceiveEntity.getId());
List<PurReceiveDetailEntity> purReceiveDetailEntityList = receivedetailService.selectByOrderId(purReceiveEntity.getBillNo());
Map<String, List<PurReceiveDetailEntity>> map = purReceiveDetailEntityList.stream().collect(Collectors.groupingBy(PurReceiveDetailEntity::getSupId));
// Map<String, List<PurReceiveDetailEntity>> map = purReceiveDetailEntityList.stream().collect(Collectors.groupingBy(PurReceiveDetailEntity::getSupId));
String billNo = "";
if (basicBusTypeChangeEntity != null && StrUtil.isNotEmpty(basicBusTypeChangeEntity.getTargetAction()) && basicBusTypeChangeEntity.isEnable() == true) {
for (Map.Entry<String, List<PurReceiveDetailEntity>> m : map.entrySet()) {
//生产单据表信息
IoOrderEntity ioOrderEntity = new IoOrderEntity();
ioOrderEntity.setBillNo(gennerOrderUtils.createScOrderNo(new OrderNoTypeBean(Constant.SCAN_ORDER, "yyyyMMdd")));
ioOrderEntity.setCorpOrderId(CustomUtil.getDate());
ioOrderEntity.setMainAction(ConstantType.TYPE_PUT);
ioOrderEntity.setAction(basicBusTypeChangeEntity.getTargetAction());
ioOrderEntity.setFromCorp(m.getKey());
ioOrderEntity.setFromType(ConstantStatus.FROM_PLAN);
if (basicBusTypeChangeEntity.getAuditStatus() == 1) {
ioOrderEntity.setStatus(ConstantStatus.ORDER_STATUS_TEMP_SAVE);
ioOrderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_DRAFT);
} else {
ioOrderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK);
ioOrderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST);
}
ioOrderEntity.setOrderType(1);
ioOrderEntity.setCreateTime(new Date());
ioOrderEntity.setCreateUser(purReceiveEntity.getCreateUser());
ioOrderEntity.setUpdateTime(new Date());
ioOrderEntity.setUpdateUser(purReceiveEntity.getCreateUser());
ioOrderEntity.setCustomerId("110");
ioOrderEntity.setDeptCode(purReceiveEntity.getInvCode());
ioOrderEntity.setInvCode(purReceiveEntity.getDeptCode());
ioOrderService.insertOrder(ioOrderEntity);
billNo += ioOrderEntity.getBillNo() + ",";
//插入业务单表
for (PurReceiveDetailEntity obj : m.getValue()) {
BasicProductsEntity basicProductsEntity = receivedetailService.selectIoOrderDetailBiz(obj.getId());
IoOrderDetailBizEntity ioOrderDetailBizEntity = new IoOrderDetailBizEntity();
ioOrderDetailBizEntity.setOrderIdFk(ioOrderEntity.getBillNo());
ioOrderDetailBizEntity.setBindRlFk(obj.getRelIdFk());
ioOrderDetailBizEntity.setCount(IntUtil.value(obj.getCount()));
ioOrderDetailBizEntity.setUuidFk(basicProductsEntity.getUuid());
ioOrderDetailBizEntity.setNameCode(basicProductsEntity.getNameCode());
ioOrderDetailBizEntity.setCoName(basicProductsEntity.getCpmctymc());
ioOrderDetailBizEntity.setCertCode(basicProductsEntity.getZczbhhzbapzbh());
ioOrderDetailBizEntity.setYlqxzcrbarmc(basicProductsEntity.getYlqxzcrbarmc());
ioOrderDetailBizEntity.setManufacturer(basicProductsEntity.getManufactory()); ioOrderDetailBizEntity.setMeasname(basicProductsEntity.getMeasname());
ioOrderDetailBizEntity.setSpec(basicProductsEntity.getGgxh());
ioOrderDetailBizEntity.setPrice(obj.getPrice());
ioOrderDetailBizEntity.setSupId(obj.getSupId());
ioOrderDetailBizService.insert(ioOrderDetailBizEntity);
}
//生产单据表信息
IoOrderEntity ioOrderEntity = new IoOrderEntity();
ioOrderEntity.setBillNo(gennerOrderUtils.createScOrderNo(new OrderNoTypeBean(Constant.SCAN_ORDER, "yyyyMMdd")));
ioOrderEntity.setCorpOrderId(purReceiveEntity.getBillNo());
ioOrderEntity.setFromReceiveBillNo(purReceiveEntity.getBillNo());
ioOrderEntity.setMainAction(ConstantType.TYPE_PUT);
ioOrderEntity.setAction(basicBusTypeChangeEntity.getTargetAction());
ioOrderEntity.setFromDeptCode(purReceiveEntity.getTargetDeptCode());
ioOrderEntity.setFromInvCode(purReceiveEntity.getTargetInvCode());
ioOrderEntity.setFromType(ConstantStatus.FROM_RECEIVE);
if (basicBusTypeChangeEntity.getAuditStatus() == 1) {
ioOrderEntity.setStatus(ConstantStatus.ORDER_STATUS_TEMP_SAVE);
ioOrderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_DRAFT);
} else {
ioOrderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK);
ioOrderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST);
}
ioOrderEntity.setOrderType(1);
ioOrderEntity.setCreateTime(new Date());
ioOrderEntity.setCreateUser(purReceiveEntity.getCreateUser());
ioOrderEntity.setUpdateTime(new Date());
ioOrderEntity.setUpdateUser(purReceiveEntity.getCreateUser());
ioOrderEntity.setCustomerId("110");
ioOrderEntity.setDeptCode(purReceiveEntity.getDeptCode());
ioOrderEntity.setInvCode(purReceiveEntity.getInvCode());
ioOrderService.insertOrder(ioOrderEntity);
billNo += ioOrderEntity.getBillNo() + ",";
//插入业务单表
for (PurReceiveDetailEntity obj : purReceiveDetailEntityList) {
BasicProductsEntity basicProductsEntity = receivedetailService.selectIoOrderDetailBiz(obj.getId());
IoOrderDetailBizEntity ioOrderDetailBizEntity = new IoOrderDetailBizEntity();
ioOrderDetailBizEntity.setOrderIdFk(ioOrderEntity.getBillNo());
ioOrderDetailBizEntity.setBindRlFk(obj.getRelIdFk());
ioOrderDetailBizEntity.setCount(IntUtil.value(obj.getCount()));
ioOrderDetailBizEntity.setUuidFk(basicProductsEntity.getUuid());
ioOrderDetailBizEntity.setNameCode(basicProductsEntity.getNameCode());
ioOrderDetailBizEntity.setCoName(basicProductsEntity.getCpmctymc());
ioOrderDetailBizEntity.setCertCode(basicProductsEntity.getZczbhhzbapzbh());
ioOrderDetailBizEntity.setYlqxzcrbarmc(basicProductsEntity.getYlqxzcrbarmc());
ioOrderDetailBizEntity.setManufacturer(basicProductsEntity.getManufactory());
ioOrderDetailBizEntity.setProductDate(obj.getProductDate());
ioOrderDetailBizEntity.setExpireDate(obj.getExpireDate());
ioOrderDetailBizEntity.setBatchNo(obj.getBatchNo());
ioOrderDetailBizEntity.setMeasname(basicProductsEntity.getMeasname());
ioOrderDetailBizEntity.setSpec(basicProductsEntity.getGgxh());
ioOrderDetailBizEntity.setPrice(obj.getPrice());
ioOrderDetailBizEntity.setSupId(obj.getSupId());
ioOrderDetailBizService.insert(ioOrderDetailBizEntity);
}
}
}

@ -77,6 +77,7 @@ public class FilterInvPreProductDetailRequest extends ListPageRequest {
*/
private String updateTime;
private BigDecimal price;
private String startTime;
private String endTime;
}

@ -111,4 +111,7 @@ public class FilterInvPreinProductRequest extends ListPageRequest {
private Integer filterCount;
private String diCode;
private String startTime;
private String endTime;
}

@ -91,4 +91,7 @@ public class FilterInvProductDetailRequest extends ListPageRequest {
private String expireDate;
private BigDecimal price;
private String startTime;
private String endTime;
}

@ -58,7 +58,7 @@ public class RsaUtils {
}
public static String readFileContent(String fileName) {
ClassPathResource resource = new ClassPathResource("config.txt");
ClassPathResource resource = new ClassPathResource("/config.txt");
File file = new File(resource.getAbsolutePath());
BufferedReader reader = null;

@ -6,7 +6,7 @@
from inv_prein_product_detail
<where>
<if test="code != null and code != ''">
AND code = #{code}
AND code like concat('%', #{code}, '%')
</if>
<if test="mainAction != null and mainAction != ''">
AND mainAction = #{mainAction}
@ -53,6 +53,10 @@
<if test="updateTime != null and updateTime != ''">
AND updateTime <![CDATA[ <= ]]> #{updateTime}
</if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
AND date_format(updateTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and
date_format(#{endTime}, '%Y-%m-%d')
</if>
</where>
<choose>

@ -86,7 +86,7 @@
from inv_pre_product_detail
<where>
<if test="code != null and code != ''">
AND code = #{code}
AND code like concat('%', #{code}, '%')
</if>
<if test="price != null">
AND price = #{price}
@ -133,6 +133,10 @@
<if test="updateTime != null and updateTime != ''">
AND updateTime <![CDATA[ <= ]]> #{updateTime}
</if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
AND date_format(updateTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and
date_format(#{endTime}, '%Y-%m-%d')
</if>
</where>

@ -92,7 +92,7 @@
from inv_product_detail
<where>
<if test="code != null and code != ''">
AND code = #{code}
AND code like concat('%', #{code}, '%')
</if>
<if test="mainAction != null and mainAction != ''">
AND mainAction = #{mainAction}
@ -150,6 +150,11 @@
<if test="updateTime != null and updateTime != ''">
AND updateTime <![CDATA[ <= ]]> #{updateTime}
</if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
AND date_format(updateTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and
date_format(#{endTime}, '%Y-%m-%d')
</if>
</where>

@ -523,7 +523,7 @@ INSERT ignore INTO `sys_param_config`(id, `parentId`, `paramName`, `paramKey`, `
`paramExplain`, `updateTime`)
VALUES (20059, 0, '是否允许编辑第三方产品信息', 'enable_edit_third', '1', 0, 0, '01', NULL);
CREATE TABLE if not exists `basic_destiny_rel`
CREATE TABLE if not exists `basic_sk_project_detail`
(
`id` bigint(0) NOT NULL,
`relId` bigint(0) NULL DEFAULT NULL COMMENT '耗材产品id',

@ -811,7 +811,7 @@ INSERT ignore INTO `sys_param_config`(id, `parentId`, `paramName`, `paramKey`, `
`paramExplain`, `updateTime`)
VALUES (20059, 0, '是否允许编辑第三方产品信息', 'enable_edit_third', '1', 0, 0, '01', NULL);
CREATE TABLE if not exists `basic_destiny_rel`
CREATE TABLE if not exists `basic_sk_project_detail`
(
`id` bigint(0) NOT NULL,
`relId` bigint(0) NULL DEFAULT NULL COMMENT '耗材产品id',

Loading…
Cancel
Save