业务单相关修改

master
anthonywj 2 years ago
parent f450b6eeb7
commit 5cd6586c97

@ -7,6 +7,7 @@ import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.ConstantType;
import com.glxp.api.controller.BaseController;
import com.glxp.api.entity.basic.BasicBussinessTypeEntity;
import com.glxp.api.entity.inout.IoOrderDetailBizEntity;
@ -78,9 +79,15 @@ public class IoOrderDetailResultController extends BaseController {
orderDetailResultRequest.setActions(actions);
List<IoOrderDetailResultResponse> list = orderDetailResultService.filterOrderList(orderDetailResultRequest);
// for (IoOrderDetailResultResponse orderDetailResultResponse : list) {
// if(orderDetailResultResponse.get)
// }
for (IoOrderDetailResultResponse orderDetailResultResponse : list) {
if (orderDetailResultResponse.getMainAction().equals(ConstantType.TYPE_OUT)) {
orderDetailResultResponse.setOutCount(orderDetailResultResponse.getReCount());
orderDetailResultResponse.setInCount(0);
} else {
orderDetailResultResponse.setOutCount(0);
orderDetailResultResponse.setInCount(orderDetailResultResponse.getReCount());
}
}
PageInfo<IoOrderDetailResultResponse> pageInfo = new PageInfo<>(list);
return ResultVOUtils.page(pageInfo);
}

@ -145,6 +145,74 @@ public class PurOrderController {
}
@RepeatSubmit()
@PostMapping("/purchase/order/dealOrder")
public BaseResponse dealOrder(@RequestBody PostPurOrderRequest postPurOrderRequest) {
PurOrderEntity purOrderEntity = postPurOrderRequest.getPurOrderEntity();
purOrderEntity.setUpdateTime(new Date());
purOrderService.update(purOrderEntity);
// String billNo = "";
// List<PurOrderDetailEntity> purOrderDetailEntities = purOrderDetailService.findByOrderId(purOrderEntity.getId() + "");
//
// //对计划单里面的供应商进行分组
// Map<String, List<PurOrderDetailEntity>> map = purOrderDetailEntities.stream().collect(Collectors.groupingBy(PurOrderDetailEntity::getSupId));
//
// if (postPurOrderRequest.getEditStatus() == ConstantStatus.APPLY_AUDIT_ED) {
//
// if (CollUtil.isNotEmpty(purOrderDetailEntities) && postPurOrderRequest.isAutoPurchase() == true
// && StrUtil.isNotEmpty(postPurOrderRequest.getTargetSubInv()) && StrUtil.isNotEmpty(postPurOrderRequest.getTargetBillAction())) {
//
// for (Map.Entry<String, List<PurOrderDetailEntity>> 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(postPurOrderRequest.getTargetBillAction());
// ioOrderEntity.setFromCorp(m.getKey());
// ioOrderEntity.setFromType(ConstantStatus.FROM_Order);
// ioOrderEntity.setStatus(1);
// ioOrderEntity.setDealStatus(1);
// ioOrderEntity.setOrderType(1);
// ioOrderEntity.setCreateTime(new Date());
// ioOrderEntity.setCreateUser(postPurOrderRequest.getPurOrderEntity().getAuditUser());
// ioOrderEntity.setUpdateTime(new Date());
// ioOrderEntity.setUpdateUser(postPurOrderRequest.getPurOrderEntity().getAuditUser());
// ioOrderEntity.setCustomerId("110");
// ioOrderEntity.setDeptCode(purOrderEntity.getDeptCode());
// ioOrderEntity.setInvCode(purOrderEntity.getInvCode());
// ioOrderService.insertOrder(ioOrderEntity);
// billNo += ioOrderEntity.getBillNo() + ",";
// //插入业务单表
// for (PurOrderDetailEntity obj : m.getValue()) {
// BasicProductsEntity basicProductsEntity = purOrderDetailService.selectIoOrderDetailBiz(obj.getId());
// IoOrderDetailBizEntity ioOrderDetailBizEntity = new IoOrderDetailBizEntity();
// ioOrderDetailBizEntity.setOrderIdFk(ioOrderEntity.getBillNo());
// ioOrderDetailBizEntity.setBindRlFk(Long.valueOf(obj.getProductId()));
// ioOrderDetailBizEntity.setCount(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());
// if (basicProductsEntity.getPrice() != null) {
// ioOrderDetailBizEntity.setPrice(BigDecimal.valueOf(basicProductsEntity.getPrice()));
// }
// ioOrderDetailBizEntity.setSupId(obj.getSupId());
// ioOrderDetailBizService.insert(ioOrderDetailBizEntity);
// }
// }
// purOrderEntity.setStockOrderNo(billNo.substring(0, billNo.length() - 1));
// purOrderService.update(purOrderEntity);
// }
// }
return ResultVOUtils.success("更新成功!");
}
/**
*
*/

@ -143,6 +143,9 @@ public class PurOrderEntity {
*/
@TableField(value = "arrivalTime")
private Date arrivalTime;
@TableField(value = "dealStatus")
private int dealStatus;
public static final String COL_ID = "id";

@ -97,5 +97,6 @@ public class PurOrderRequest extends ListPageRequest {
private String startAuditDate;
private String endAuditDate;
private Integer dealStatus;
}

@ -79,4 +79,6 @@ public class PurOrderResponse {
private String supId;
private String supName;
private int dealStatus;
}

@ -30,7 +30,7 @@
<!--@mbg.generated-->
id, billNo, billDate, `status`, billType, remark, invCode, deptCode, `createUser`,
createTime, auditUser, auditTime, auditRemark, updateTime, updateUser, applyCreateUser,
applyAuditUser, applyRemark, applyBillNo, stockOrderNo,supId
applyAuditUser, applyRemark, applyBillNo, stockOrderNo,supId,dealStatus
</sql>
@ -83,6 +83,9 @@
<if test="deptCode != '' and deptCode != null">
AND deptCode = #{deptCode}
</if>
<if test="dealStatus != null">
AND dealStatus = #{dealStatus}
</if>
<if test="invCode != '' and invCode != null">
AND invCode = #{invCode}
</if>

@ -85,6 +85,8 @@ CALL Pro_Temp_ColumnWork('basic_bustype_change', 'busBeforeTime', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('pur_order', 'emergency', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('pur_order', 'supId', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('pur_order', 'arrivalTime', 'datetime', 1);
CALL Pro_Temp_ColumnWork('pur_order', 'dealStatus', 'int', 1);
CALL Pro_Temp_ColumnWork('pur_order_detail', 'planCount', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('inv_prein_detail', 'status', 'tinyint', 1);

Loading…
Cancel
Save