代码备份

master
anthonyywj2 3 years ago
parent 0cab07df5d
commit c1960486af

@ -7,6 +7,7 @@ import com.glxp.sale.admin.entity.basic.BussinessOriginTypeEntity;
import com.glxp.sale.admin.req.basic.BussinessLocalTypeFilterRequest; import com.glxp.sale.admin.req.basic.BussinessLocalTypeFilterRequest;
import com.glxp.sale.admin.req.basic.BussinessOriginTypeFilterRequest; import com.glxp.sale.admin.req.basic.BussinessOriginTypeFilterRequest;
import com.glxp.sale.admin.res.PageSimpleResponse; import com.glxp.sale.admin.res.PageSimpleResponse;
import com.glxp.sale.admin.res.basic.BussinessOriginTypeResponse;
import com.glxp.sale.admin.service.basic.BussinessLocalTypeService; import com.glxp.sale.admin.service.basic.BussinessLocalTypeService;
import com.glxp.sale.admin.service.basic.BussinessOriginTypeService; import com.glxp.sale.admin.service.basic.BussinessOriginTypeService;
import com.glxp.sale.common.enums.ResultEnum; import com.glxp.sale.common.enums.ResultEnum;
@ -28,7 +29,7 @@ public class BussinessOriginTypeController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@GetMapping("/udiwms/originBusType/filter") @GetMapping("/udiwms/originBusType/filter")
public BaseResponse filterJoin(BussinessOriginTypeFilterRequest bussinessTypeFilterRequest, public BaseResponse filterList(BussinessOriginTypeFilterRequest bussinessTypeFilterRequest,
BindingResult bindingResult) { BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -45,4 +46,24 @@ public class BussinessOriginTypeController {
return ResultVOUtils.success(pageSimpleResponse); return ResultVOUtils.success(pageSimpleResponse);
} }
@AuthRuleAnnotation("")
@GetMapping("/udiwms/originBusType/filterJoin")
public BaseResponse filterJoinList(BussinessOriginTypeFilterRequest bussinessTypeFilterRequest,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
List<BussinessOriginTypeResponse> bussinessTypeEntities;
bussinessTypeEntities = bussinessOriginTypeService.filterJoinList(
bussinessTypeFilterRequest);
PageInfo<BussinessOriginTypeResponse> pageInfo;
pageInfo = new PageInfo<>(bussinessTypeEntities);
PageSimpleResponse<BussinessOriginTypeResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(bussinessTypeEntities);
return ResultVOUtils.success(pageSimpleResponse);
}
} }

@ -118,11 +118,6 @@ public class OrderDetailController {
filterThrOrderRequest.setPage(filterErpOrderRequest.getPage()); filterThrOrderRequest.setPage(filterErpOrderRequest.getPage());
filterThrOrderRequest.setLimit(filterErpOrderRequest.getLimit()); filterThrOrderRequest.setLimit(filterErpOrderRequest.getLimit());
// if (filterErpOrderRequest.getCustomerId() != null) {
// CompanyEntity companyEntity = companyService.findCompany(Long.parseLong(filterErpOrderRequest.getCustomerId()));
// filterThrOrderRequest.setUnitIdFk(companyEntity.getUnitIdFk());
// }
// filterErpOrderRequest.setBillAction(filterErpOrderRequest.getOriginType());
List<ErpOrderResponse> erpOrderResponses = new ArrayList<>(); List<ErpOrderResponse> erpOrderResponses = new ArrayList<>();
List<ThrOrderEntity> data = thrOrderService.filterThrOrder(filterThrOrderRequest); List<ThrOrderEntity> data = thrOrderService.filterThrOrder(filterThrOrderRequest);

@ -1,5 +1,6 @@
package com.glxp.sale.admin.controller.inout.utils; package com.glxp.sale.admin.controller.inout.utils;
import cn.hutool.core.util.StrUtil;
import cn.hutool.db.sql.Order; import cn.hutool.db.sql.Order;
import com.glxp.sale.admin.constant.Constant; import com.glxp.sale.admin.constant.Constant;
import com.glxp.sale.admin.constant.ConstantStatus; import com.glxp.sale.admin.constant.ConstantStatus;
@ -217,7 +218,7 @@ public class CheckOrderUtils {
} }
public String checkId(ErpOrderEntity vailOrderEntity, UdiRelevanceResponse udiRelevanceResponse, BussinessTypeEntity bussinessTypeEntity) { public String checkId(ErpOrderEntity vailOrderEntity, UdiRelevanceResponse udiRelevanceResponse, BussinessTypeEntity bussinessTypeEntity) {
if (vailOrderEntity.getGoodsid() != null && udiRelevanceResponse != null) { if (StrUtil.isNotEmpty(vailOrderEntity.getGoodsid()) && udiRelevanceResponse != null) {
if (vailOrderEntity.getBindRlFk() != null) { if (vailOrderEntity.getBindRlFk() != null) {
if (vailOrderEntity.getBindRlFk().equals(udiRelevanceResponse.getId() + "")) if (vailOrderEntity.getBindRlFk().equals(udiRelevanceResponse.getId() + ""))
return null; return null;
@ -252,10 +253,10 @@ public class CheckOrderUtils {
} }
public String checkBatchNo(ErpOrderEntity vailOrderEntity, ErpOrderEntity myErpOrder) { public String checkBatchNo(ErpOrderEntity vailOrderEntity, ErpOrderEntity myErpOrder) {
if (vailOrderEntity.getGoodsid() != null && myErpOrder.getBatchNo() != null) { if (StrUtil.isNotEmpty(vailOrderEntity.getBatchNo()) && StrUtil.isNotEmpty(myErpOrder.getBatchNo())) {
if (vailOrderEntity.getBatchNo().equals(myErpOrder.getBatchNo())) if (vailOrderEntity.getBatchNo().equals(myErpOrder.getBatchNo()))
return null; return null;
} else if (vailOrderEntity.getGoodsid() == null && myErpOrder.getBatchNo() == null) { } else if (StrUtil.isEmpty(vailOrderEntity.getBatchNo()) && StrUtil.isEmpty(myErpOrder.getBatchNo())) {
return null; return null;
} else { } else {
return myErpOrder.getCoName() + "批次号不匹配!"; return myErpOrder.getCoName() + "批次号不匹配!";
@ -264,10 +265,10 @@ public class CheckOrderUtils {
} }
public String checkProductDate(ErpOrderEntity vailOrderEntity, ErpOrderEntity myErpOrder) { public String checkProductDate(ErpOrderEntity vailOrderEntity, ErpOrderEntity myErpOrder) {
if (vailOrderEntity.getProductDate() != null && myErpOrder.getProductDate() != null) { if (StrUtil.isNotEmpty(vailOrderEntity.getProductDate()) && StrUtil.isNotEmpty(myErpOrder.getProductDate())) {
if (vailOrderEntity.getProductDate().equals(myErpOrder.getProductDate())) if (vailOrderEntity.getProductDate().equals(myErpOrder.getProductDate()))
return null; return null;
} else if (vailOrderEntity.getProductDate() == null && myErpOrder.getProductDate() == null) { } else if (StrUtil.isEmpty(vailOrderEntity.getProductDate()) && StrUtil.isEmpty(myErpOrder.getProductDate())) {
return null; return null;
} else { } else {
return myErpOrder.getCoName() + "生产日期不匹配!"; return myErpOrder.getCoName() + "生产日期不匹配!";
@ -277,10 +278,10 @@ public class CheckOrderUtils {
public String checkExpireDate(ErpOrderEntity vailOrderEntity, ErpOrderEntity myErpOrder) { public String checkExpireDate(ErpOrderEntity vailOrderEntity, ErpOrderEntity myErpOrder) {
if (vailOrderEntity.getExpireDate() != null && myErpOrder.getExpireDate() != null) { if (StrUtil.isNotEmpty(vailOrderEntity.getExpireDate()) && StrUtil.isNotEmpty(myErpOrder.getExpireDate())) {
if (vailOrderEntity.getExpireDate().equals(myErpOrder.getExpireDate())) if (vailOrderEntity.getExpireDate().equals(myErpOrder.getExpireDate()))
return null; return null;
} else if (vailOrderEntity.getExpireDate() == null && myErpOrder.getExpireDate() == null) { } else if (StrUtil.isEmpty(vailOrderEntity.getExpireDate()) && StrUtil.isEmpty(myErpOrder.getExpireDate())) {
return null; return null;
} else { } else {
return myErpOrder.getCoName() + "失效日期不匹配!"; return myErpOrder.getCoName() + "失效日期不匹配!";
@ -290,10 +291,10 @@ public class CheckOrderUtils {
public String checkWarehouse(ErpOrderEntity vailOrderEntity, ErpOrderEntity myErpOrder) { public String checkWarehouse(ErpOrderEntity vailOrderEntity, ErpOrderEntity myErpOrder) {
if (vailOrderEntity.getWarehouseCode() != null && myErpOrder.getWarehouseCode() != null) { if (StrUtil.isNotEmpty(vailOrderEntity.getWarehouseCode()) && StrUtil.isNotEmpty(myErpOrder.getWarehouseCode())) {
if (vailOrderEntity.getWarehouseCode().equals(myErpOrder.getWarehouseCode())) if (vailOrderEntity.getWarehouseCode().equals(myErpOrder.getWarehouseCode()))
return null; return null;
} else if (vailOrderEntity.getWarehouseCode() == null && myErpOrder.getWarehouseCode() == null) { } else if (StrUtil.isEmpty(vailOrderEntity.getWarehouseCode()) && StrUtil.isEmpty(myErpOrder.getWarehouseCode())) {
return null; return null;
} else { } else {
return myErpOrder.getCoName() + "仓位号不匹配!"; return myErpOrder.getCoName() + "仓位号不匹配!";

@ -52,15 +52,14 @@ public class ThrOrderReceiveController {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
} }
Integer userId = customerService.getUserId(); Integer userId = customerService.getUserId();
ThrOrderEntity stockOrderEntity = new ThrOrderEntity(); ThrOrderEntity stockOrderEntity = new ThrOrderEntity();
Integer id = Integer.parseInt(CustomUtil.getId());
BeanUtils.copyProperties(stockOrderPostRequest, stockOrderEntity); BeanUtils.copyProperties(stockOrderPostRequest, stockOrderEntity);
stockOrderEntity.setCreateUser(userId + ""); stockOrderEntity.setCreateUser(userId + "");
stockOrderEntity.setType(1);//领用单据 stockOrderEntity.setType(1);//领用单据
stockOrderEntity.setBilldate(DateUtil.formatDate(new Date())); stockOrderEntity.setBilldate(DateUtil.formatDate(new Date()));
stockOrderEntity.setId(id); stockOrderEntity.setBillNo(CustomUtil.getId() + "");
thrOrderService.insertThrOrder(stockOrderEntity); thrOrderService.insertThrOrder(stockOrderEntity);
stockOrderEntity = thrOrderService.findByUnique(stockOrderEntity.getBillNo(), null);
if (stockOrderPostRequest.getSubErpOrders() != null) { if (stockOrderPostRequest.getSubErpOrders() != null) {
List<StockOrderDetailEntity> stockOrderDetailEntityList = stockOrderPostRequest.getSubErpOrders(); List<StockOrderDetailEntity> stockOrderDetailEntityList = stockOrderPostRequest.getSubErpOrders();

@ -11,5 +11,6 @@ public class BussinessOriginTypeEntity {
private String thirdSysName; private String thirdSysName;
private Boolean enable; private Boolean enable;
private String remark; private String remark;
private String mainAction;
} }

@ -24,4 +24,5 @@ public class ThrOrderDetailEntity {
//增加字段 //增加字段
private BigDecimal price; //单价 private BigDecimal price; //单价
private String corpName; //往来单位 private String corpName; //往来单位
} }

@ -32,4 +32,7 @@ public class ThrOrderEntity {
private String remark1; //备注1 private String remark1; //备注1
private String remark2; //备注2 private String remark2; //备注2
private String remark3; //备注3 private String remark3; //备注3
private String locStorageCode;
private Integer editStatus;
} }

@ -24,5 +24,6 @@ public class FilterOrderRequest {
private String locStorageCode; private String locStorageCode;
//第三方系统ID //第三方系统ID
private String thirdSys; private String thirdSys;
private Integer editStatus;
} }

@ -25,6 +25,7 @@ public class StockOrderPostRequest {
private String locStorageCode; private String locStorageCode;
private BigDecimal price; private BigDecimal price;
private String unitIdFk; private String unitIdFk;
private Integer editStatus;
private List<StockOrderDetailEntity> subErpOrders; private List<StockOrderDetailEntity> subErpOrders;
private String customerId; private String customerId;
} }

@ -22,6 +22,7 @@ public class FilterThrOrderRequest extends ListPageRequest {
private String status; private String status;
private String thirdSys; private String thirdSys;
private Integer editStatus;
private List<ErpOrderResponse> erpOrderResponses; private List<ErpOrderResponse> erpOrderResponses;
} }

@ -8,5 +8,9 @@ public class BussinessOriginTypeResponse {
private String action; private String action;
private String localAction; private String localAction;
private String thirdAction; private String thirdAction;
private String thirdName;
private String thirdSys; private String thirdSys;
private int corpType;
} }

@ -16,6 +16,7 @@ public class ErpOrderResponse {
private String unitIdFk; private String unitIdFk;
private String customerId; private String customerId;
private String originType; private String originType;
private String locStorageCode;
private List<SubErpOrder> subErpOrders; private List<SubErpOrder> subErpOrders;
//增加字段 //增加字段
@ -215,6 +216,14 @@ public class ErpOrderResponse {
this.originType = originType; this.originType = originType;
} }
public String getLocStorageCode() {
return locStorageCode;
}
public void setLocStorageCode(String locStorageCode) {
this.locStorageCode = locStorageCode;
}
public static class SubErpOrder { public static class SubErpOrder {
private String productId; private String productId;
private String productName; private String productName;

@ -16,6 +16,8 @@ public interface BussinessOriginTypeService {
List<BussinessOriginTypeEntity> filterEnableList(BussinessOriginTypeFilterRequest bussinessOriginTypeFilterRequest); List<BussinessOriginTypeEntity> filterEnableList(BussinessOriginTypeFilterRequest bussinessOriginTypeFilterRequest);
List<BussinessOriginTypeResponse> filterJoinList(BussinessOriginTypeFilterRequest bussinessOriginTypeFilterRequest);
BussinessOriginTypeResponse finByThirdAction(String action); BussinessOriginTypeResponse finByThirdAction(String action);
BussinessOriginTypeResponse finByLocalAction(String action); BussinessOriginTypeResponse finByLocalAction(String action);

@ -38,6 +38,11 @@ public class BussinessOriginTypeServiceImpl implements BussinessOriginTypeServic
return bussinessOriginTypeDao.filterEnableList(bussinessOriginTypeFilterRequest); return bussinessOriginTypeDao.filterEnableList(bussinessOriginTypeFilterRequest);
} }
@Override
public List<BussinessOriginTypeResponse> filterJoinList(BussinessOriginTypeFilterRequest bussinessOriginTypeFilterRequest) {
return bussinessOriginTypeDao.filterJoinList(bussinessOriginTypeFilterRequest);
}
@Override @Override
public BussinessOriginTypeResponse finByThirdAction(String action) { public BussinessOriginTypeResponse finByThirdAction(String action) {
BussinessOriginTypeFilterRequest bussinessOriginTypeFilterRequest = new BussinessOriginTypeFilterRequest(); BussinessOriginTypeFilterRequest bussinessOriginTypeFilterRequest = new BussinessOriginTypeFilterRequest();

@ -401,18 +401,18 @@ public class IoTransInoutService {
// SystemParamConfigEntity expireParamConfigEntity = systemParamConfigService.selectByParamKey("expire_date_tip"); // SystemParamConfigEntity expireParamConfigEntity = systemParamConfigService.selectByParamKey("expire_date_tip");
if (bussinessTypeEntity.isExpireTip()) { // if (bussinessTypeEntity.isExpireTip()) {
UdiEntity udiEntity = FilterUdiUtils.getUdi(warehouseEntity.getCode()); // UdiEntity udiEntity = FilterUdiUtils.getUdi(warehouseEntity.getCode());
if (StrUtil.isNotEmpty(udiEntity.getExpireDate())) { // if (StrUtil.isNotEmpty(udiEntity.getExpireDate())) {
String expireDate = "20" + udiEntity.getExpireDate(); // String expireDate = "20" + udiEntity.getExpireDate();
long expireTime = DateUtil.parseDateExpire(expireDate); // long expireTime = DateUtil.parseDateExpire(expireDate);
if (expireTime - System.currentTimeMillis() < 0) { // if (expireTime - System.currentTimeMillis() < 0) {
orderService.updateOrderStatus(warehouseEntity.getOrderId(), ConstantStatus.ORDER_STATUS_FAIL); // orderService.updateOrderStatus(warehouseEntity.getOrderId(), ConstantStatus.ORDER_STATUS_FAIL);
orderService.updateRemark(orderEntity.getId(), "udi码" + warehouseEntity.getCode() + "已经过期!"); // orderService.updateRemark(orderEntity.getId(), "udi码" + warehouseEntity.getCode() + "已经过期!");
return; // return;
} // }
} // }
} // }
// //近效期提醒: // //近效期提醒:

@ -21,9 +21,9 @@
<select id="filterJoinList" parameterType="com.glxp.sale.admin.req.basic.BussinessOriginTypeFilterRequest" <select id="filterJoinList" parameterType="com.glxp.sale.admin.req.basic.BussinessOriginTypeFilterRequest"
resultType="com.glxp.sale.admin.res.basic.BussinessOriginTypeResponse"> resultType="com.glxp.sale.admin.res.basic.BussinessOriginTypeResponse">
select basic_bustype_origin.name, select basic_bustype_origin.name,
basic_bustype_origin.action thirdAction, basic_bustype_origin.action thirdAction,basic_bustype_origin.name thirdName,
basic_bussiness_type.action, basic_bussiness_type.action,basic_bussiness_type.mainAction,
basic_bustype_local.action localAction,basic_bustype_origin.thirdSys basic_bustype_local.action localAction,basic_bustype_origin.thirdSys,basic_bussiness_type.corpType
from basic_bustype_origin from basic_bustype_origin
LEFT JOIN basic_bustype_local on basic_bustype_local.originAction = basic_bustype_origin.action LEFT JOIN basic_bustype_local on basic_bustype_local.originAction = basic_bustype_origin.action
LEFT JOIN basic_bussiness_type on basic_bussiness_type.localAction = basic_bustype_local.action LEFT JOIN basic_bussiness_type on basic_bussiness_type.localAction = basic_bustype_local.action

@ -38,56 +38,78 @@
<if test="endDate!=null and endDate!=''"> <if test="endDate!=null and endDate!=''">
<![CDATA[ and DATE_FORMAT(billdate, '%Y-%m-%d') <= DATE_FORMAT(#{endDate}, '%Y-%m-%d') ]]> <![CDATA[ and DATE_FORMAT(billdate, '%Y-%m-%d') <= DATE_FORMAT(#{endDate}, '%Y-%m-%d') ]]>
</if> </if>
<if test="editStatus != '' and editStatus != null">
AND editStatus = #{editStatus}
</if>
</where> </where>
ORDER BY updateTime DESC ORDER BY updateTime DESC
</select> </select>
<insert id="insertThrOrder" keyProperty="id" parameterType="com.glxp.sale.admin.entity.thrsys.ThrOrderEntity"> <insert id="insertThrOrder" keyProperty="id" parameterType="com.glxp.sale.admin.entity.thrsys.ThrOrderEntity">
replace INTO thr_order replace
INTO thr_order
(billNo, billdate, corpId, corpName, billType, billFlag, thirdSysFk, updateTime, originType, unitIdFk, (billNo, billdate, corpId, corpName, billType, billFlag, thirdSysFk, updateTime, originType, unitIdFk,
startDate, endDate, createUser, reviewUser, address, linkMan, linkTel, remark, remark1, remark2, startDate, endDate, createUser, reviewUser, address, linkMan, linkTel, remark, remark1, remark2,
remark3) remark3,locStorageCode,editStatus)
values (#{billNo}, values (
#{billdate}, #{billNo},
#{corpId}, #{billdate},
#{corpName}, #{corpId},
#{billType}, #{corpName},
#{billFlag}, #{billType},
#{thirdSysFk}, #{updateTime}, #{originType}, #{unitIdFk}, #{billFlag},
#{startDate}, #{endDate}, #{createUser}, #{reviewUser}, #{thirdSysFk},
#{address}, #{linkMan}, #{linkTel}, #{remark}, #{remark1}, #{updateTime},
#{remark2}, #{remark3}) #{originType},
#{unitIdFk},
#{startDate},
#{endDate},
#{createUser},
#{reviewUser},
#{address},
#{linkMan},
#{linkTel},
#{remark},
#{remark1},
#{remark2},
#{remark3},
#{locStorageCode},
#{editStatus}
)
</insert> </insert>
<insert id="insertThrOrders" keyProperty="id" parameterType="java.util.List"> <insert id="insertThrOrders" keyProperty="id" parameterType="java.util.List">
replace INTO thr_order replace INTO thr_order
(billNo, billdate, corpId, corpName, billType, billFlag, thirdSysFk, updateTime, originType, unitIdFk, (billNo, billdate, corpId, corpName, billType, billFlag, thirdSysFk, updateTime, originType, unitIdFk,
startDate, endDate, createUser, reviewUser, address, linkMan, linkTel, remark, remark1, remark2, startDate, endDate, createUser, reviewUser, address, linkMan, linkTel, remark, remark1, remark2,
remark3) remark3,locStorageCode,editStatus)
values values
<foreach collection="thrOrderEntities" item="item" index="index" <foreach collection="thrOrderEntities" item="item" index="index"
separator=","> separator=",">
(#{item.billNo}, (#{item.billNo},
#{item.billdate}, #{item.billdate},
#{item.corpId}, #{item.corpId},
#{item.corpName}, #{item.corpName},
#{item.billType}, #{item.billType},
#{item.billFlag}, #{item.billFlag},
#{item.thirdSysFk}, #{item.updateTime}, #{item.originType}, #{item.unitIdFk}, #{item.thirdSysFk}, #{item.updateTime}, #{item.originType}, #{item.unitIdFk},
#{item.startDate}, #{item.endDate}, #{item.createUser}, #{item.reviewUser}, #{item.startDate}, #{item.endDate}, #{item.createUser}, #{item.reviewUser},
#{item.address}, #{item.linkMan}, #{item.linkTel}, #{item.remark}, #{item.remark1}, #{item.address}, #{item.linkMan}, #{item.linkTel}, #{item.remark}, #{item.remark1},
#{item.remark2}, #{item.remark3}) #{item.remark2}, #{item.remark3},#{item.locStorageCode},#{item.editStatus})
</foreach> </foreach>
</insert> </insert>
<delete id="deleteById" parameterType="Map"> <delete id="deleteById" parameterType="Map">
DELETE FROM thr_order WHERE id = #{id} DELETE
FROM thr_order
WHERE id = #{id}
</delete> </delete>
<delete id="deleteAll"> <delete id="deleteAll">
DELETE FROM thr_order DELETE
FROM thr_order
</delete> </delete>
<update id="updateThrOrder" parameterType="com.glxp.sale.admin.entity.thrsys.ThrOrderEntity"> <update id="updateThrOrder" parameterType="com.glxp.sale.admin.entity.thrsys.ThrOrderEntity">
@ -114,6 +136,9 @@
<if test="remark1 != null">remark1=#{remark1},</if> <if test="remark1 != null">remark1=#{remark1},</if>
<if test="remark2 != null">remark2=#{remark2},</if> <if test="remark2 != null">remark2=#{remark2},</if>
<if test="remark3 != null">remark3=#{remark3},</if> <if test="remark3 != null">remark3=#{remark3},</if>
<if test="locStorageCode != null">locStorageCode=#{locStorageCode},</if>
<if test="editStatus != null">editStatus=#{editStatus},</if>
</trim> </trim>
WHERE id = #{id} WHERE id = #{id}
</update> </update>

Loading…
Cancel
Save