预验收库存,领用等修改

test
anthonywj 2 years ago
parent a038cac875
commit 00c2995717

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

@ -256,18 +256,19 @@ public class IoPurChangeService {
BasicBusTypeChangeEntity basicBusTypeChangeEntity = basicBusTypeChangeService.selectByOriginAction(ConstantStatus.BUS_ORDER_HCLY); BasicBusTypeChangeEntity basicBusTypeChangeEntity = basicBusTypeChangeService.selectByOriginAction(ConstantStatus.BUS_ORDER_HCLY);
purReceiveEntity = receiveService.selectById(purReceiveEntity.getId()); purReceiveEntity = receiveService.selectById(purReceiveEntity.getId());
List<PurReceiveDetailEntity> purReceiveDetailEntityList = receivedetailService.selectByOrderId(purReceiveEntity.getBillNo()); 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 = ""; String billNo = "";
if (basicBusTypeChangeEntity != null && StrUtil.isNotEmpty(basicBusTypeChangeEntity.getTargetAction()) && basicBusTypeChangeEntity.isEnable() == true) { if (basicBusTypeChangeEntity != null && StrUtil.isNotEmpty(basicBusTypeChangeEntity.getTargetAction()) && basicBusTypeChangeEntity.isEnable() == true) {
for (Map.Entry<String, List<PurReceiveDetailEntity>> m : map.entrySet()) {
//生产单据表信息 //生产单据表信息
IoOrderEntity ioOrderEntity = new IoOrderEntity(); IoOrderEntity ioOrderEntity = new IoOrderEntity();
ioOrderEntity.setBillNo(gennerOrderUtils.createScOrderNo(new OrderNoTypeBean(Constant.SCAN_ORDER, "yyyyMMdd"))); ioOrderEntity.setBillNo(gennerOrderUtils.createScOrderNo(new OrderNoTypeBean(Constant.SCAN_ORDER, "yyyyMMdd")));
ioOrderEntity.setCorpOrderId(CustomUtil.getDate()); ioOrderEntity.setCorpOrderId(purReceiveEntity.getBillNo());
ioOrderEntity.setFromReceiveBillNo(purReceiveEntity.getBillNo());
ioOrderEntity.setMainAction(ConstantType.TYPE_PUT); ioOrderEntity.setMainAction(ConstantType.TYPE_PUT);
ioOrderEntity.setAction(basicBusTypeChangeEntity.getTargetAction()); ioOrderEntity.setAction(basicBusTypeChangeEntity.getTargetAction());
ioOrderEntity.setFromCorp(m.getKey()); ioOrderEntity.setFromDeptCode(purReceiveEntity.getTargetDeptCode());
ioOrderEntity.setFromType(ConstantStatus.FROM_PLAN); ioOrderEntity.setFromInvCode(purReceiveEntity.getTargetInvCode());
ioOrderEntity.setFromType(ConstantStatus.FROM_RECEIVE);
if (basicBusTypeChangeEntity.getAuditStatus() == 1) { if (basicBusTypeChangeEntity.getAuditStatus() == 1) {
ioOrderEntity.setStatus(ConstantStatus.ORDER_STATUS_TEMP_SAVE); ioOrderEntity.setStatus(ConstantStatus.ORDER_STATUS_TEMP_SAVE);
ioOrderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_DRAFT); ioOrderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_DRAFT);
@ -281,12 +282,12 @@ public class IoPurChangeService {
ioOrderEntity.setUpdateTime(new Date()); ioOrderEntity.setUpdateTime(new Date());
ioOrderEntity.setUpdateUser(purReceiveEntity.getCreateUser()); ioOrderEntity.setUpdateUser(purReceiveEntity.getCreateUser());
ioOrderEntity.setCustomerId("110"); ioOrderEntity.setCustomerId("110");
ioOrderEntity.setDeptCode(purReceiveEntity.getInvCode()); ioOrderEntity.setDeptCode(purReceiveEntity.getDeptCode());
ioOrderEntity.setInvCode(purReceiveEntity.getDeptCode()); ioOrderEntity.setInvCode(purReceiveEntity.getInvCode());
ioOrderService.insertOrder(ioOrderEntity); ioOrderService.insertOrder(ioOrderEntity);
billNo += ioOrderEntity.getBillNo() + ","; billNo += ioOrderEntity.getBillNo() + ",";
//插入业务单表 //插入业务单表
for (PurReceiveDetailEntity obj : m.getValue()) { for (PurReceiveDetailEntity obj : purReceiveDetailEntityList) {
BasicProductsEntity basicProductsEntity = receivedetailService.selectIoOrderDetailBiz(obj.getId()); BasicProductsEntity basicProductsEntity = receivedetailService.selectIoOrderDetailBiz(obj.getId());
IoOrderDetailBizEntity ioOrderDetailBizEntity = new IoOrderDetailBizEntity(); IoOrderDetailBizEntity ioOrderDetailBizEntity = new IoOrderDetailBizEntity();
ioOrderDetailBizEntity.setOrderIdFk(ioOrderEntity.getBillNo()); ioOrderDetailBizEntity.setOrderIdFk(ioOrderEntity.getBillNo());
@ -297,7 +298,11 @@ public class IoPurChangeService {
ioOrderDetailBizEntity.setCoName(basicProductsEntity.getCpmctymc()); ioOrderDetailBizEntity.setCoName(basicProductsEntity.getCpmctymc());
ioOrderDetailBizEntity.setCertCode(basicProductsEntity.getZczbhhzbapzbh()); ioOrderDetailBizEntity.setCertCode(basicProductsEntity.getZczbhhzbapzbh());
ioOrderDetailBizEntity.setYlqxzcrbarmc(basicProductsEntity.getYlqxzcrbarmc()); ioOrderDetailBizEntity.setYlqxzcrbarmc(basicProductsEntity.getYlqxzcrbarmc());
ioOrderDetailBizEntity.setManufacturer(basicProductsEntity.getManufactory()); ioOrderDetailBizEntity.setMeasname(basicProductsEntity.getMeasname()); 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.setSpec(basicProductsEntity.getGgxh());
ioOrderDetailBizEntity.setPrice(obj.getPrice()); ioOrderDetailBizEntity.setPrice(obj.getPrice());
ioOrderDetailBizEntity.setSupId(obj.getSupId()); ioOrderDetailBizEntity.setSupId(obj.getSupId());
@ -305,7 +310,6 @@ public class IoPurChangeService {
} }
} }
} }
}
//申购单生成扫码单据 //申购单生成扫码单据

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

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

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

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

@ -6,7 +6,7 @@
from inv_prein_product_detail from inv_prein_product_detail
<where> <where>
<if test="code != null and code != ''"> <if test="code != null and code != ''">
AND code = #{code} AND code like concat('%', #{code}, '%')
</if> </if>
<if test="mainAction != null and mainAction != ''"> <if test="mainAction != null and mainAction != ''">
AND mainAction = #{mainAction} AND mainAction = #{mainAction}
@ -53,6 +53,10 @@
<if test="updateTime != null and updateTime != ''"> <if test="updateTime != null and updateTime != ''">
AND updateTime <![CDATA[ <= ]]> #{updateTime} AND updateTime <![CDATA[ <= ]]> #{updateTime}
</if> </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> </where>
<choose> <choose>

@ -86,7 +86,7 @@
from inv_pre_product_detail from inv_pre_product_detail
<where> <where>
<if test="code != null and code != ''"> <if test="code != null and code != ''">
AND code = #{code} AND code like concat('%', #{code}, '%')
</if> </if>
<if test="price != null"> <if test="price != null">
AND price = #{price} AND price = #{price}
@ -133,6 +133,10 @@
<if test="updateTime != null and updateTime != ''"> <if test="updateTime != null and updateTime != ''">
AND updateTime <![CDATA[ <= ]]> #{updateTime} AND updateTime <![CDATA[ <= ]]> #{updateTime}
</if> </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> </where>

@ -92,7 +92,7 @@
from inv_product_detail from inv_product_detail
<where> <where>
<if test="code != null and code != ''"> <if test="code != null and code != ''">
AND code = #{code} AND code like concat('%', #{code}, '%')
</if> </if>
<if test="mainAction != null and mainAction != ''"> <if test="mainAction != null and mainAction != ''">
AND mainAction = #{mainAction} AND mainAction = #{mainAction}
@ -150,6 +150,11 @@
<if test="updateTime != null and updateTime != ''"> <if test="updateTime != null and updateTime != ''">
AND updateTime <![CDATA[ <= ]]> #{updateTime} AND updateTime <![CDATA[ <= ]]> #{updateTime}
</if> </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> </where>

@ -523,7 +523,7 @@ INSERT ignore INTO `sys_param_config`(id, `parentId`, `paramName`, `paramKey`, `
`paramExplain`, `updateTime`) `paramExplain`, `updateTime`)
VALUES (20059, 0, '是否允许编辑第三方产品信息', 'enable_edit_third', '1', 0, 0, '01', NULL); 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, `id` bigint(0) NOT NULL,
`relId` bigint(0) NULL DEFAULT NULL COMMENT '耗材产品id', `relId` bigint(0) NULL DEFAULT NULL COMMENT '耗材产品id',

@ -811,7 +811,7 @@ INSERT ignore INTO `sys_param_config`(id, `parentId`, `paramName`, `paramKey`, `
`paramExplain`, `updateTime`) `paramExplain`, `updateTime`)
VALUES (20059, 0, '是否允许编辑第三方产品信息', 'enable_edit_third', '1', 0, 0, '01', NULL); 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, `id` bigint(0) NOT NULL,
`relId` bigint(0) NULL DEFAULT NULL COMMENT '耗材产品id', `relId` bigint(0) NULL DEFAULT NULL COMMENT '耗材产品id',

Loading…
Cancel
Save