zhairh
anthonyywj2 3 years ago
parent 12fe7bc876
commit 0d747d74f8

@ -333,7 +333,10 @@ public class StockOrderDetailController {
stockOrderDetailEntity.setRelId(udiInfoEntity.getRlId() + ""); stockOrderDetailEntity.setRelId(udiInfoEntity.getRlId() + "");
stockOrderDetailEntity.setProductName(udiInfoEntity.getCpmctymc()); stockOrderDetailEntity.setProductName(udiInfoEntity.getCpmctymc());
stockOrderDetailEntity.setSpec(udiInfoEntity.getGgxh()); stockOrderDetailEntity.setSpec(udiInfoEntity.getGgxh());
stockOrderDetailEntity.setCount(0 + ""); if (stockSelectDataEntity.getCount() != null) {
stockOrderDetailEntity.setCount(stockSelectDataEntity.getCount() + "");
} else
stockOrderDetailEntity.setCount(0 + "");
stockOrderDetailEntity.setReCount(0 + ""); stockOrderDetailEntity.setReCount(0 + "");
stockOrderDetailEntity.setBatchNo(stockSelectDataEntity.getBatchNo()); stockOrderDetailEntity.setBatchNo(stockSelectDataEntity.getBatchNo());
stockOrderDetailEntity.setProductDate(stockSelectDataEntity.getProductDate()); stockOrderDetailEntity.setProductDate(stockSelectDataEntity.getProductDate());
@ -341,8 +344,8 @@ public class StockOrderDetailController {
stockOrderDetailEntity.setManufactory(udiInfoEntity.getManufactory()); stockOrderDetailEntity.setManufactory(udiInfoEntity.getManufactory());
stockOrderDetailEntity.setYlqxzcrbarmc(udiInfoEntity.getYlqxzcrbarmc()); stockOrderDetailEntity.setYlqxzcrbarmc(udiInfoEntity.getYlqxzcrbarmc());
stockOrderDetailEntity.setSupName(udiInfoEntity.getCompanyName()); stockOrderDetailEntity.setSupName(udiInfoEntity.getCompanyName());
if (StrUtil.isNotEmpty(stockOrderIdsRequest.getZczbhhzbapzbh())) if (StrUtil.isNotEmpty(stockSelectDataEntity.getZczbhhzbapzbh()))
stockOrderDetailEntity.setZczbhhzbapzbh(stockOrderIdsRequest.getZczbhhzbapzbh()); stockOrderDetailEntity.setZczbhhzbapzbh(stockSelectDataEntity.getZczbhhzbapzbh());
else else
stockOrderDetailEntity.setZczbhhzbapzbh(udiInfoEntity.getZczbhhzbapzbh()); stockOrderDetailEntity.setZczbhhzbapzbh(udiInfoEntity.getZczbhhzbapzbh());
stockOrderDetailEntity.setAllowNoBatch(udiInfoEntity.isAllowNoBatch()); stockOrderDetailEntity.setAllowNoBatch(udiInfoEntity.isAllowNoBatch());
@ -376,11 +379,13 @@ public class StockOrderDetailController {
} }
//供应商选入时需要校验证书是否齐全 //供应商选入时需要校验证书是否齐全
if (stockOrderIdsRequest.getType() == 0) { if (stockOrderIdsRequest.getType() == 0) {
StockSelectDataEntity stockSelectDataEntity = stockOrderIdsRequest.getDatas().get(0);
String value = systemParamConfigService.selectValueByParamKey("checkCert"); String value = systemParamConfigService.selectValueByParamKey("checkCert");
if (StrUtil.isNotEmpty(value) && value.equals("1")) { if (StrUtil.isNotEmpty(value) && value.equals("1")) {
//判断证书是否齐全 //判断证书是否齐全
if (StrUtil.isNotEmpty(stockOrderIdsRequest.getZczbhhzbapzbh())) { if (StrUtil.isNotEmpty(stockSelectDataEntity.getZczbhhzbapzbh())) {
SupProductResponse supProductResponse = supProductService.findByPassByReCert(stockOrderIdsRequest.getZczbhhzbapzbh()); SupProductResponse supProductResponse = supProductService.findByPassByReCert(stockSelectDataEntity.getZczbhhzbapzbh());
if (supProductResponse == null) { if (supProductResponse == null) {
return ResultVOUtils.error(601, "该产品所对应的资质证书未通过审核,无法配送,请先维护产品资质信息"); return ResultVOUtils.error(601, "该产品所对应的资质证书未通过审核,无法配送,请先维护产品资质信息");
} }

@ -181,7 +181,9 @@ public class PurApplyController {
purPlanEntity.setApplyAuditBy(purApplyEntity.getAuditBy()); purPlanEntity.setApplyAuditBy(purApplyEntity.getAuditBy());
purPlanEntity.setRemark("申购科室:" + purApplyRequest.getSubInvName() + purPlanEntity.setRemark("申购科室:" + purApplyRequest.getSubInvName() +
";申购人:" + purApplyRequest.getCreateByName() + ";申购原因:" + purApplyRequest.getRemark()); ";申购人:" + purApplyRequest.getCreateByName() + ";申购原因:" + purApplyRequest.getRemark());
purApplyEntity.setPlanBillNo(purPlanEntity.getBillNo());
purApplyEntity.setGeneratePlan(true);
purApplyService.update(purApplyEntity);
purPlanService.insert(purPlanEntity); purPlanService.insert(purPlanEntity);
List<PurApplyDetailEntity> purApplyDetailEntities = purApplyDetailService.findByOrderId(purApplyEntity.getId() + ""); List<PurApplyDetailEntity> purApplyDetailEntities = purApplyDetailService.findByOrderId(purApplyEntity.getId() + "");
if (CollUtil.isNotEmpty(purApplyDetailEntities)) { if (CollUtil.isNotEmpty(purApplyDetailEntities)) {

@ -10,6 +10,7 @@ import com.glxp.sale.admin.entity.basic.BasicBusTypeChangeEntity;
import com.glxp.sale.admin.entity.basic.BasicUnitMaintainEntity; import com.glxp.sale.admin.entity.basic.BasicUnitMaintainEntity;
import com.glxp.sale.admin.entity.inout.StockOrderDetailEntity; import com.glxp.sale.admin.entity.inout.StockOrderDetailEntity;
import com.glxp.sale.admin.entity.inout.StockOrderEntity; import com.glxp.sale.admin.entity.inout.StockOrderEntity;
import com.glxp.sale.admin.entity.purchase.PurApplyEntity;
import com.glxp.sale.admin.entity.purchase.PurPlanDetailEntity; import com.glxp.sale.admin.entity.purchase.PurPlanDetailEntity;
import com.glxp.sale.admin.entity.purchase.PurPlanEntity; import com.glxp.sale.admin.entity.purchase.PurPlanEntity;
import com.glxp.sale.admin.req.purchase.PostPurPlanRequest; import com.glxp.sale.admin.req.purchase.PostPurPlanRequest;
@ -172,7 +173,6 @@ public class PurPlanController {
List<PurPlanDetailEntity> purPlanDetailEntities = purPlanDetailService.findByOrderId(purApplyEntity.getId() + ""); List<PurPlanDetailEntity> purPlanDetailEntities = purPlanDetailService.findByOrderId(purApplyEntity.getId() + "");
// BasicBusTypeChangeEntity basicBusTypeChangeEntity = basicBusTypeChangeService.findByAction(purApplyEntity.getBillType());
//转换成业务单据 //转换成业务单据
if (postPurPlanRequest.getEditStatus() == ConstantStatus.APPLY_AUDIT_ED if (postPurPlanRequest.getEditStatus() == ConstantStatus.APPLY_AUDIT_ED
&& StrUtil.isNotEmpty(purApplyEntity.getTargetSubInv()) && StrUtil.isNotEmpty(purApplyEntity.getTargetBillAction())) { && StrUtil.isNotEmpty(purApplyEntity.getTargetSubInv()) && StrUtil.isNotEmpty(purApplyEntity.getTargetBillAction())) {
@ -344,4 +344,12 @@ public class PurPlanController {
} }
//选入申购单
@PostMapping("/purchase/plan/selectApply")
public BaseResponse selectApply(@RequestBody PurApplyEntity purApplyEntity) {
return ResultVOUtils.success("新增成功!");
}
} }

@ -77,4 +77,5 @@ public class PurApplyEntity {
private String targetBillType; private String targetBillType;
private String planBillNo; //生成采购计划单据号 private String planBillNo; //生成采购计划单据号
private boolean generatePlan; //是否已生成采购计划单
} }

@ -15,7 +15,7 @@ public class StockOrderIdsRequest {
boolean filterUDIType; boolean filterUDIType;
UdiEntity udiEntity; UdiEntity udiEntity;
List<StockOrderDetailEntity> stockOrderLists; List<StockOrderDetailEntity> stockOrderLists;
private String zczbhhzbapzbh;
private int type; //1耗材领用 private int type; //1耗材领用
private int purType; private int purType;
} }

@ -9,4 +9,6 @@ public class StockSelectDataEntity {
private String expireDate; private String expireDate;
private String productDate; private String productDate;
private String supId; private String supId;
private String zczbhhzbapzbh;
private Integer count;
} }

@ -74,6 +74,6 @@ public class PurApplyResponse {
private String targetBillType; private String targetBillType;
private String planBillNo; //生成采购计划单据号 private String planBillNo; //生成采购计划单据号
private boolean generatePlan;
private boolean audtoPlan; private boolean audtoPlan;
} }

@ -1,7 +1,7 @@
# \u751F\u4EA7\u73AF\u5883 # \u751F\u4EA7\u73AF\u5883
server.port=9996 server.port=9996
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.jdbc-url=jdbc:mysql://192.168.0.55:3306/spms?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true spring.datasource.jdbc-url=jdbc:mysql://127.0.0.1:3306/spms_za?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
spring.datasource.username=root spring.datasource.username=root
spring.datasource.password=123456 spring.datasource.password=123456
spring.datasource.hikari.connection-timeout=60000 spring.datasource.hikari.connection-timeout=60000

@ -564,7 +564,6 @@
<if test="price != null">price=#{price},</if> <if test="price != null">price=#{price},</if>
<if test="useNum != null">useNum=#{useNum},</if> <if test="useNum != null">useNum=#{useNum},</if>
<if test="useMuti != null">useMuti=#{useMuti}</if> <if test="useMuti != null">useMuti=#{useMuti}</if>
</trim> </trim>
WHERE id = #{id} WHERE id = #{id}
</update> </update>

@ -57,7 +57,7 @@
INTO pur_apply INTO pur_apply
( (
billNo,billDate,status,billType,remark,locStorageCode,invWarehouseCode, billNo,billDate,status,billType,remark,locStorageCode,invWarehouseCode,
deptCode,createBy,createTime,auditBy,auditTime,updateTime,auditRemark,targetInv,targetSubInv,targetBillType,planBillNo deptCode,createBy,createTime,auditBy,auditTime,updateTime,auditRemark,targetInv,targetSubInv,targetBillType,planBillNo,generatePlan
) )
values ( values (
#{billNo}, #{billNo},
@ -77,7 +77,8 @@
#{targetInv}, #{targetInv},
#{targetSubInv}, #{targetSubInv},
#{targetBillType}, #{targetBillType},
#{planBillNo} #{planBillNo},
#{generatePlan}
) )
</insert> </insert>
@ -117,6 +118,7 @@
<if test="targetSubInv != null">targetSubInv=#{targetSubInv},</if> <if test="targetSubInv != null">targetSubInv=#{targetSubInv},</if>
<if test="targetBillType != null">targetBillType=#{targetBillType},</if> <if test="targetBillType != null">targetBillType=#{targetBillType},</if>
<if test="planBillNo != null">planBillNo=#{planBillNo},</if> <if test="planBillNo != null">planBillNo=#{planBillNo},</if>
<if test="generatePlan != null">generatePlan=#{generatePlan},</if>
</trim> </trim>
WHERE id = #{id} WHERE id = #{id}
</update> </update>

@ -33,7 +33,6 @@
<where> <where>
<if test="orderIdFk != '' and orderIdFk != null"> <if test="orderIdFk != '' and orderIdFk != null">
AND orderIdFk = #{orderIdFk} AND orderIdFk = #{orderIdFk}
AND basic_products.diType=1
</if> </if>
<if test="productId != null"> <if test="productId != null">
AND productId = #{productId} AND productId = #{productId}

Loading…
Cancel
Save