申购,采购计划相关bug修改,业务单据校验问题,自助平台一些代码同步

zhairh
anthonywj 2 years ago committed by wangwei
parent 7ae0b81529
commit badf66be39

@ -47,6 +47,7 @@ public class ConstantStatus {
public static String SORDER_CHECK = "3";//待校验 public static String SORDER_CHECK = "3";//待校验
public static String SORDER_CHECKED = "4";//已校验 public static String SORDER_CHECKED = "4";//已校验
public static String SORDER_DELIVER = "5";//已送货 public static String SORDER_DELIVER = "5";//已送货
public static String SORDER_ERROR = "6"; //校验异常
public static final int RECEIVE_UN = 0; //未验收 public static final int RECEIVE_UN = 0; //未验收
public static final int RECEIVE_ED = 1; //已验收 public static final int RECEIVE_ED = 1; //已验收

@ -319,6 +319,9 @@ public class UdiRelevanceController {
udiInfoEntity.setCpms(udiRelevanceResponse.getCpms()); udiInfoEntity.setCpms(udiRelevanceResponse.getCpms());
udiInfoEntity.setPrice(udiRelevanceResponse.getPrice()); udiInfoEntity.setPrice(udiRelevanceResponse.getPrice());
udiInfoEntity.setSpmc(udiRelevanceResponse.getSpmc()); udiInfoEntity.setSpmc(udiRelevanceResponse.getSpmc());
udiInfoEntity.setAllowNoBatch(udiRelevanceResponse.isAllowNoBatch());
udiInfoEntity.setAllowNoExpire(udiRelevanceResponse.isAllowNoExpire());
udiInfoEntity.setAllowNoProduct(udiRelevanceResponse.isAllowNoProduct());
udiInfoEntity.setBasicPrductRemak1(udiRelevanceResponse.getBasicPrductRemak1()); udiInfoEntity.setBasicPrductRemak1(udiRelevanceResponse.getBasicPrductRemak1());
udiInfoEntity.setBasicPrductRemak2(udiRelevanceResponse.getBasicPrductRemak2()); udiInfoEntity.setBasicPrductRemak2(udiRelevanceResponse.getBasicPrductRemak2());
udiInfoEntity.setBasicPrductRemak3(udiRelevanceResponse.getBasicPrductRemak3()); udiInfoEntity.setBasicPrductRemak3(udiRelevanceResponse.getBasicPrductRemak3());

@ -739,9 +739,10 @@ public class OrderDetailController {
} }
ErpOrderEntity exitErp = new ContrastErpUtil().vailErpExit(orderDetailService, erpOrderEntities, importErpOrderRequest.getOrderId()); // ErpOrderEntity exitErp = new ContrastErpUtil().vailErpExit(orderDetailService, erpOrderEntities, importErpOrderRequest.getOrderId());
OrderEntity exitErp = vialErpExit(docids);
if (exitErp != null) { if (exitErp != null) {
String errMsg = "所选业务单据" + exitErp.getErpOrderId() + "已被其他出入库单" + exitErp.getOrderIdFk() + "绑定"; String errMsg = "所选业务单据" + docidStr + "已被其他出入库单" + exitErp.getId() + "绑定";
orderEntity.setRemark(errMsg); orderEntity.setRemark(errMsg);
orderEntity.setUpdateTime(new Date()); orderEntity.setUpdateTime(new Date());
orderService.updateOrder(orderEntity); orderService.updateOrder(orderEntity);
@ -761,6 +762,24 @@ public class OrderDetailController {
return ResultVOUtils.success("导入成功"); return ResultVOUtils.success("导入成功");
} }
public OrderEntity vialErpExit(List<ErpOrderResponse> docids) {
if (CollUtil.isNotEmpty(docids)) {
for (ErpOrderResponse erpOrderResponse : docids) {
OrderFilterRequest orderFilterRequest = new OrderFilterRequest();
orderFilterRequest.setErpFk(erpOrderResponse.getBillNo());
List<OrderEntity> orderEntities = orderService.findAllOrders(orderFilterRequest);
if (CollUtil.isNotEmpty(orderEntities)) {
return orderEntities.get(0);
}
}
}
return null;
}
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@PostMapping("/warehouse/repeatPrintCheck")//TODO 重新校验 @PostMapping("/warehouse/repeatPrintCheck")//TODO 重新校验
public BaseResponse repeatPrintCheck(@RequestBody FilterErpOrderRequest filterErpOrderRequest, BindingResult bindingResult) { public BaseResponse repeatPrintCheck(@RequestBody FilterErpOrderRequest filterErpOrderRequest, BindingResult bindingResult) {

@ -78,17 +78,17 @@ public class InvSubWarehouseController {
AuthAdmin authAdmin = customerService.getUserBean(); AuthAdmin authAdmin = customerService.getUserBean();
if (StrUtil.isNotEmpty(filterInvWarehouseRequest.getPcode())) { if (StrUtil.isNotEmpty(filterInvWarehouseRequest.getPcode())) {
if (filterInvWarehouseRequest.getFilter() == null || filterInvWarehouseRequest.getFilter() == 1) { if (filterInvWarehouseRequest.getFilter() == null || filterInvWarehouseRequest.getFilter() == 1 || filterInvWarehouseRequest.getFilter() == 2) {
if (authAdmin.getCustomerId() == 110) { if (authAdmin.getCustomerId() == 110) {
filterInvWarehouseRequest.setUserId(authAdmin.getId().intValue()); filterInvWarehouseRequest.setUserId(authAdmin.getId().intValue());
} else { } else {
filterInvWarehouseRequest.setSpUse(true); filterInvWarehouseRequest.setSpUse(true);
} }
} }
} else{ } else {
if(filterInvWarehouseRequest.getFilter()==3 && filterInvWarehouseRequest.getFilter()!=null){ if (filterInvWarehouseRequest.getFilter() == 3 && filterInvWarehouseRequest.getFilter() != null) {
filterInvWarehouseRequest.setUserId(authAdmin.getId().intValue()); filterInvWarehouseRequest.setUserId(authAdmin.getId().intValue());
}else{ } else {
//走这边表示单据选择的是往来单位里面调出调入的库 //走这边表示单据选择的是往来单位里面调出调入的库
//判断单据类型是1就是设置单据需要需要查询除自己以外的分库 //判断单据类型是1就是设置单据需要需要查询除自己以外的分库
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("corp_innor_inv"); SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("corp_innor_inv");

@ -168,12 +168,7 @@ public class PurApplyController {
purPlanEntity.setBillNo(billNo); purPlanEntity.setBillNo(billNo);
purPlanEntity.setBillDate(new Date()); purPlanEntity.setBillDate(new Date());
purPlanEntity.setStatus(ConstantStatus.APPLY_DRAFT); purPlanEntity.setStatus(ConstantStatus.APPLY_DRAFT);
// purPlanEntity.setLocStorageCode(purApplyEntity.getTargetInv());
// purPlanEntity.setInvWarehouseCode(purApplyEntity.getTargetSubInv());
purPlanEntity.setBillType("purPlan"); purPlanEntity.setBillType("purPlan");
// purPlanEntity.setBillType(purApplyEntity.getTargetBillType());
// purPlanEntity.setDeptCode(purApplyEntity.getDeptCode());
// purPlanEntity.setCreateBy(purApplyEntity.getAuditBy());
purPlanEntity.setCreateTime(new Date()); purPlanEntity.setCreateTime(new Date());
purPlanEntity.setUpdateTime(new Date()); purPlanEntity.setUpdateTime(new Date());
purPlanEntity.setApplyBillNo(purApplyEntity.getBillNo()); purPlanEntity.setApplyBillNo(purApplyEntity.getBillNo());
@ -182,8 +177,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)) {

@ -306,11 +306,11 @@ public class UdiInfoEntity {
this.versionNumber = versionNumber; this.versionNumber = versionNumber;
} }
public int getDiType() { public Integer getDiType() {
return diType; return diType;
} }
public void setDiType(int diType) { public void setDiType(Integer diType) {
this.diType = diType; this.diType = diType;
} }

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

@ -9,4 +9,6 @@ public class BusTypeChangeFilterRequest extends ListPageRequest {
private String action; private String action;
private String originAction; private String originAction;
private String name; private String name;
private String originName;
private String targetName;
} }

@ -47,4 +47,6 @@ public class StockOrderFilterRequest extends ListPageRequest {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String endDate; private String endDate;
private Boolean filterNoSelect;
} }

@ -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;
} }

@ -48,5 +48,7 @@ public class OrderFilterRequest extends ListPageRequest {
private boolean entrust; private boolean entrust;
private String invWarehouseCode; private String invWarehouseCode;
private String erpFk;
} }

@ -17,6 +17,7 @@ import java.util.Date;
public class PurApplyRequest extends ListPageRequest { public class PurApplyRequest extends ListPageRequest {
/** /**
* *
*/ */
@ -102,7 +103,9 @@ public class PurApplyRequest extends ListPageRequest {
private String startDate; private String startDate;
private String endDate; private String endDate;
private Integer generatePlan;
private boolean audtoPlan; private boolean audtoPlan;
private Integer applyType;
} }

@ -8,6 +8,7 @@ import java.util.Date;
public class PurApplyResponse { public class PurApplyResponse {
/** /**
* *
*/ */
@ -69,7 +70,11 @@ public class PurApplyResponse {
private String subInvName; private String subInvName;
private String auditRemark; private String auditRemark;
private String planBillNo; //生成采购计划单据号 private String targetInv;
private String targetSubInv;
private String targetBillType;
private boolean audtoPlan; private String planBillNo; //生成采购计划单据号
private boolean generatePlan;
private boolean audtoPlan; ///
} }

@ -20,25 +20,26 @@
<select id="filterAll" parameterType="com.glxp.api.admin.req.basic.BusTypeChangeFilterRequest" <select id="filterAll" parameterType="com.glxp.api.admin.req.basic.BusTypeChangeFilterRequest"
resultType="com.glxp.api.admin.entity.basic.BussinessChangeTypeEntity"> resultType="com.glxp.api.admin.entity.basic.BussinessChangeTypeEntity">
SELECT basic_bustype_pre.*,invA.name defautSubInvName,invB.name locSubInvName , SELECT basic_bustype_pre.*,invA.name defautSubInvName,invB.name locSubInvName ,
busTypeA.name originName,busTypeB.name targetName busTypeA.name originName,busTypeB.name targetName
FROM basic_bustype_pre FROM basic_bustype_pre
left JOIN inv_warehouse_sub invA on basic_bustype_pre.defaultSubInv = invA.code left JOIN inv_warehouse_sub invA on basic_bustype_pre.defaultSubInv = invA.code
left JOIN inv_warehouse_sub invB on basic_bustype_pre.locSubInv = invB.code left JOIN inv_warehouse_sub invB on basic_bustype_pre.locSubInv = invB.code
left JOIN basic_bustype_local busTypeA on basic_bustype_pre.originAction = busTypeA.action left JOIN basic_bustype_local busTypeA on basic_bustype_pre.originAction = busTypeA.action
left JOIN basic_bustype_local busTypeB on basic_bustype_pre.action = busTypeB.action left JOIN basic_bustype_local busTypeB on basic_bustype_pre.action = busTypeB.action
<where> <where>
<if test="action != ''and action != null"> <if test="action != ''and action != null">
AND basic_bustype_pre.`action` = #{action} AND basic_bustype_pre.`action` = #{action}
</if> </if>
<if test="originName != ''and originName != null">
AND busTypeA.NAME LIKE CONCAT(#{originName},'%')
</if>
<if test="targetName != ''and targetName != null">
AND busTypeB.name LIKE CONCAT(#{targetName},'%')
</if>
<if test="originAction != ''and originAction != null"> <if test="originAction != ''and originAction != null">
AND basic_bustype_pre.`originAction` = #{originAction} AND basic_bustype_pre.`originAction` = #{originAction}
</if> </if>
<if test="name != '' and name != null">
AND busTypeB.`name` like concat('%',#{name},'%')
</if>
</where> </where>
</select> </select>

@ -95,7 +95,8 @@
<update id="updateByStatus" parameterType="Map"> <update id="updateByStatus" parameterType="Map">
UPDATE stock_order UPDATE stock_order
SET `status` = #{status},`updateTime` = #{updateTime} SET `status` = #{status},
`updateTime` = #{updateTime}
where id = #{orderId} where id = #{orderId}
</update> </update>
<update id="updateSupplementNoByBillNo"> <update id="updateSupplementNoByBillNo">
@ -216,9 +217,13 @@
<if test="userId!=null"> <if test="userId!=null">
and inv_warehouse_user.userId =#{userId} and inv_warehouse_user.userId =#{userId}
</if> </if>
<if test="filterNoSelect!=null">
and stock_order.orderIdFk is null
</if>
</where> </where>
group by stock_order.id group by stock_order.id
ORDER BY updateTime DESC ORDER BY stock_order.billdate DESC
</select> </select>

@ -47,6 +47,9 @@
<if test="createBy != '' and createBy != null"> <if test="createBy != '' and createBy != null">
AND createBy = #{createBy} AND createBy = #{createBy}
</if> </if>
<if test="applyType != null">
AND generatePlan = 1
</if>
</where> </where>
</select> </select>
@ -57,7 +60,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 +80,7 @@
#{targetInv}, #{targetInv},
#{targetSubInv}, #{targetSubInv},
#{targetBillType}, #{targetBillType},
#{planBillNo} #{planBillNo},#{generatePlan}
) )
</insert> </insert>
@ -117,6 +120,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