Merge remote-tracking branch 'origin/kjs' into kjs
This commit is contained in:
commit
be2578ee32
|
@ -0,0 +1,102 @@
|
||||||
|
package com.hzya.frame.plugin.kjs.plugin;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
|
import com.hzya.frame.plugin.kjs.service.IDeliveryOrderPluginService;
|
||||||
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/22 16:39
|
||||||
|
**/
|
||||||
|
public class DeliveryOrderPluginInitializer extends PluginBaseEntity {
|
||||||
|
Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
@Autowired
|
||||||
|
private IDeliveryOrderPluginService deliveryOrderPluginService;
|
||||||
|
/***
|
||||||
|
* 插件初始化方法
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 10:48
|
||||||
|
* @Param []
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void initialize() {
|
||||||
|
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件销毁方法
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的ID
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginId() {
|
||||||
|
return "kjsDeliveryOrderPlugin";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的名称
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginName() {
|
||||||
|
return "kjs发货单同步WMS插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的显示值
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginLabel() {
|
||||||
|
return "kjs发货单同步WMS插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 插件类型 1、场景插件
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 14:01
|
||||||
|
* @Param []
|
||||||
|
* @return java.lang.String
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginType() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 执行业务代码
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-07 11:20
|
||||||
|
* @param requestJson 执行业务代码的参数
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
|
logger.info("开始执行"+getPluginName());
|
||||||
|
String res = deliveryOrderPluginService.sync2wms(requestJson);
|
||||||
|
return BaseResult.getSuccessMessageEntity("操作成功");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,103 @@
|
||||||
|
package com.hzya.frame.plugin.kjs.plugin;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
|
import com.hzya.frame.plugin.kjs.service.IMomOrderPluginService;
|
||||||
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description u8生产订单同步wms
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/23 09:17
|
||||||
|
**/
|
||||||
|
public class MomOrderPluginInitializer extends PluginBaseEntity {
|
||||||
|
Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMomOrderPluginService momOrderPluginService;
|
||||||
|
/***
|
||||||
|
* 插件初始化方法
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 10:48
|
||||||
|
* @Param []
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void initialize() {
|
||||||
|
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件销毁方法
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的ID
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginId() {
|
||||||
|
return "kjsMomOrderPlugin";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的名称
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginName() {
|
||||||
|
return "kjs生产订单同步WMS插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的显示值
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginLabel() {
|
||||||
|
return "kjs生产订单同步WMS插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 插件类型 1、场景插件
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 14:01
|
||||||
|
* @Param []
|
||||||
|
* @return java.lang.String
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginType() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 执行业务代码
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-07 11:20
|
||||||
|
* @param requestJson 执行业务代码的参数
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
|
logger.info("开始执行"+getPluginName());
|
||||||
|
momOrderPluginService.sync2wms(requestJson);
|
||||||
|
return BaseResult.getSuccessMessageEntity("执行成功");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.hzya.frame.plugin.kjs.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 发货单插件service
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/22 16:43
|
||||||
|
**/
|
||||||
|
public interface IDeliveryOrderPluginService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发货单同步到wms
|
||||||
|
* @param requestJson
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String sync2wms(JSONObject requestJson);
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.hzya.frame.plugin.kjs.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 生产订单同步wsm
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/23 09:21
|
||||||
|
**/
|
||||||
|
public interface IMomOrderPluginService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产订单单同步到wms
|
||||||
|
* @param requestJson
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String sync2wms(JSONObject requestJson);
|
||||||
|
}
|
|
@ -0,0 +1,107 @@
|
||||||
|
package com.hzya.frame.plugin.kjs.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.map.MapBuilder;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.http.HttpRequest;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.plugin.kjs.service.IDeliveryOrderPluginService;
|
||||||
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||||
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
|
||||||
|
import com.hzya.frame.u8.delivery.dto.DeliveryDetailDTO;
|
||||||
|
import com.hzya.frame.u8.delivery.dto.DeliveryOrderDTO;
|
||||||
|
import com.hzya.frame.u8.delivery.entity.DeliveryDetailEntity;
|
||||||
|
import com.hzya.frame.u8.delivery.entity.DeliveryOrderEntity;
|
||||||
|
import com.hzya.frame.u8.delivery.service.DeliveryMapper;
|
||||||
|
import com.hzya.frame.u8.delivery.service.IDeliveryDetaiService;
|
||||||
|
import com.hzya.frame.u8.delivery.service.IDeliveryOrderService;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 发货单插件service
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/22 16:46
|
||||||
|
**/
|
||||||
|
public class DeliveryOrderPluginServiceImpl implements IDeliveryOrderPluginService {
|
||||||
|
Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
@Autowired
|
||||||
|
private IDeliveryOrderService deliveryOrderService;
|
||||||
|
@Autowired
|
||||||
|
private IDeliveryDetaiService deliveryDetaiService;
|
||||||
|
@Resource
|
||||||
|
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
|
||||||
|
/**
|
||||||
|
* 发货单同步到wsm
|
||||||
|
* @param requestJson
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String sync2wms(JSONObject requestJson) {
|
||||||
|
if (null != requestJson){
|
||||||
|
//1 查询发货单主表
|
||||||
|
DeliveryOrderEntity orderEntity = new DeliveryOrderEntity();
|
||||||
|
String id = requestJson.getString("integration_task_living_details_id");
|
||||||
|
if (StrUtil.isNotEmpty(id)){
|
||||||
|
IntegrationTaskLivingDetailsEntity taskLivingDetails = taskLivingDetailsService.get(id);
|
||||||
|
orderEntity.setDlid(taskLivingDetails.getRootAppPk());
|
||||||
|
}
|
||||||
|
orderEntity.setDataSourceCode("YONYOUU8");
|
||||||
|
orderEntity.setDlid("1000000152");
|
||||||
|
orderEntity.setbReturnFlag("0");
|
||||||
|
List<DeliveryOrderEntity> orderList = deliveryOrderService.query(orderEntity);
|
||||||
|
if (CollectionUtils.isNotEmpty(orderList)){
|
||||||
|
for (DeliveryOrderEntity order : orderList) {
|
||||||
|
try {
|
||||||
|
//2 查询发货单明细表
|
||||||
|
DeliveryDetailEntity detailEntity = new DeliveryDetailEntity();
|
||||||
|
detailEntity.setDlid(order.getDlid());
|
||||||
|
detailEntity.setDataSourceCode("YONYOUU8");
|
||||||
|
List<DeliveryDetailEntity> detailList = deliveryDetaiService.query(detailEntity);
|
||||||
|
//发货单表头entity转dto
|
||||||
|
DeliveryOrderDTO deliveryOrderDTO = DeliveryMapper.INSTANCE.deliveryEntityToDto(order);
|
||||||
|
//发货单表体entity转dto
|
||||||
|
List<DeliveryDetailDTO> deliveryDetailList = DeliveryMapper.INSTANCE.deliveryDetailListToDto(detailList);
|
||||||
|
deliveryOrderDTO.setItesm(deliveryDetailList);
|
||||||
|
String reqParams = JSONObject.toJSONString(deliveryOrderDTO);
|
||||||
|
logger.info("发货单请求参数:{}",reqParams);
|
||||||
|
//调用wms接口
|
||||||
|
Map<String, String> headerMap = MapBuilder.<String, String>create(true)
|
||||||
|
.put("apiCode", "")
|
||||||
|
.put("publicKey","ZJYA1vBeY1ai53iNmbAEsw6DImjkXGBkdMailxcBdliFC85Ce7eDIk+3zDUT+v578prj")
|
||||||
|
.put("secretKey","7Gp6OjHrIaQ6R3tXGPrI4morjQyWL+qu4JJschQnkBRtv26VDgGFVYKOy5kMZfd/j3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")
|
||||||
|
.put("appId","")
|
||||||
|
.build();
|
||||||
|
//String body = HttpRequest.post("http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(reqParams).timeout(60000).execute().body();
|
||||||
|
//保存日志
|
||||||
|
IntegrationTaskLivingDetailsEntity taskLivingDetail = new IntegrationTaskLivingDetailsEntity();
|
||||||
|
taskLivingDetail.setCreate_time(new Date());
|
||||||
|
taskLivingDetail.setModify_time(new Date());
|
||||||
|
taskLivingDetail.setRootAppPk(order.getDlid());
|
||||||
|
taskLivingDetail.setRootAppBill(order.getCdlcode());
|
||||||
|
taskLivingDetail.setPluginId("kjsDeliveryOrderPlugin");
|
||||||
|
taskLivingDetail.setRootAppNewData(reqParams);
|
||||||
|
//判断,成功调用这个方法
|
||||||
|
//taskLivingDetailsService.saveLogToSuccess(taskLivingDetail);
|
||||||
|
//失败 调用这个方法
|
||||||
|
//taskLivingDetailsService.saveLogToFail(taskLivingDetail);
|
||||||
|
//如果是重试 成功调这个方法
|
||||||
|
//taskLivingDetailsService.saveLogFailToSuccess(taskLivingDetail);
|
||||||
|
//如果是重试 失败调这个方法
|
||||||
|
// taskLivingDetailsService.updateLogFailToSuccess(taskLivingDetail);
|
||||||
|
}catch(Exception e){
|
||||||
|
logger.error("同步发货单到wsm出错:{}",e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,107 @@
|
||||||
|
package com.hzya.frame.plugin.kjs.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.map.MapBuilder;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.http.HttpRequest;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.plugin.kjs.service.IMomOrderPluginService;
|
||||||
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||||
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
|
||||||
|
import com.hzya.frame.u8.production.dto.MomOrderDTO;
|
||||||
|
import com.hzya.frame.u8.production.dto.MomOrderDetailDTO;
|
||||||
|
import com.hzya.frame.u8.production.entity.MomOrderDetailEntity;
|
||||||
|
import com.hzya.frame.u8.production.entity.MomOrderEntity;
|
||||||
|
import com.hzya.frame.u8.production.service.IMomOrderDetailService;
|
||||||
|
import com.hzya.frame.u8.production.service.IMomOrderService;
|
||||||
|
import com.hzya.frame.u8.production.service.MomOrderMapper;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 生产订单同步wsm
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/23 09:21
|
||||||
|
**/
|
||||||
|
public class MomOrderPluginServiceImpl implements IMomOrderPluginService {
|
||||||
|
Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
@Autowired
|
||||||
|
private IMomOrderService momOrderService;
|
||||||
|
@Autowired
|
||||||
|
private IMomOrderDetailService momOrderDetailService;
|
||||||
|
@Resource
|
||||||
|
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
|
||||||
|
/**
|
||||||
|
* 生产订单单同步到wms
|
||||||
|
*
|
||||||
|
* @param requestJson
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String sync2wms(JSONObject requestJson) {
|
||||||
|
if (null != requestJson){
|
||||||
|
//1查询主表
|
||||||
|
MomOrderEntity entity = new MomOrderEntity();
|
||||||
|
String id = requestJson.getString("integration_task_living_details_id");
|
||||||
|
//如果这个id不为空说明是重试
|
||||||
|
if (StrUtil.isNotEmpty(id)){
|
||||||
|
IntegrationTaskLivingDetailsEntity taskLivingDetails = taskLivingDetailsService.get(id);
|
||||||
|
entity.setMoId(taskLivingDetails.getRootAppPk());
|
||||||
|
}
|
||||||
|
entity.setMoId("1000000001");
|
||||||
|
entity.setDataSourceCode("YONYOUU8");
|
||||||
|
List<MomOrderEntity> orderList = momOrderService.query(entity);
|
||||||
|
if (CollectionUtils.isNotEmpty(orderList)){
|
||||||
|
for (MomOrderEntity order : orderList) {
|
||||||
|
try {
|
||||||
|
//查询生产订单明细表
|
||||||
|
MomOrderDetailEntity detailEntity = new MomOrderDetailEntity();
|
||||||
|
detailEntity.setMoId(order.getMoId());
|
||||||
|
detailEntity.setDataSourceCode("YONYOUU8");
|
||||||
|
List<MomOrderDetailEntity> detailList = momOrderDetailService.query(detailEntity);
|
||||||
|
//表头转换dto
|
||||||
|
MomOrderDTO momOrderDTO = MomOrderMapper.INSTANCE.momOrderEntityToDto(order);
|
||||||
|
//表体转换dto
|
||||||
|
List<MomOrderDetailDTO> momOrderDetailList = MomOrderMapper.INSTANCE.momOrderDetailListToDto(detailList);
|
||||||
|
momOrderDTO.setItesm(momOrderDetailList);
|
||||||
|
String reqParam = JSONObject.toJSONString(momOrderDTO);
|
||||||
|
logger.info("u8生产订单传wms请求参数:{}",reqParam);
|
||||||
|
Map<String, String> headerMap = MapBuilder.<String, String>create(true)
|
||||||
|
.put("apiCode", "")
|
||||||
|
.put("publicKey","ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")
|
||||||
|
.put("secretKey","fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")
|
||||||
|
.put("appId","")
|
||||||
|
.build();
|
||||||
|
//String body = HttpRequest.post("http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(reqParam).timeout(60000).execute().body();
|
||||||
|
|
||||||
|
//保存日志
|
||||||
|
IntegrationTaskLivingDetailsEntity taskLivingDetail = new IntegrationTaskLivingDetailsEntity();
|
||||||
|
taskLivingDetail.setCreate_time(new Date());
|
||||||
|
taskLivingDetail.setModify_time(new Date());
|
||||||
|
taskLivingDetail.setRootAppPk(order.getMoId());
|
||||||
|
taskLivingDetail.setRootAppBill(order.getMocode());
|
||||||
|
taskLivingDetail.setPluginId("kjsMomOrderPlugin");
|
||||||
|
taskLivingDetail.setRootAppNewData(reqParam);
|
||||||
|
//判断,成功调用这个方法
|
||||||
|
//taskLivingDetailsService.saveLogToSuccess(taskLivingDetail);
|
||||||
|
//失败 调用这个方法
|
||||||
|
//taskLivingDetailsService.saveLogToFail(taskLivingDetail);
|
||||||
|
//如果是重试 成功调这个方法
|
||||||
|
//taskLivingDetailsService.saveLogFailToSuccess(taskLivingDetail);
|
||||||
|
//如果是重试 失败调这个方法
|
||||||
|
// taskLivingDetailsService.updateLogFailToSuccess(taskLivingDetail);
|
||||||
|
}catch (Exception e){
|
||||||
|
logger.error("生产订单同步wsm出错:{}",e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<plugin>
|
||||||
|
<id>kjsPlugin</id>
|
||||||
|
<name>kjs插件</name>
|
||||||
|
<category>202408220001</category>
|
||||||
|
</plugin>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||||
|
<beans default-autowire="byName">
|
||||||
|
<bean name="deliveryOrderPluginInitializer" class="com.hzya.frame.plugin.kjs.plugin.DeliveryOrderPluginInitializer" />
|
||||||
|
<bean name="momOrderPluginInitializer" class="com.hzya.frame.plugin.kjs.plugin.MomOrderPluginInitializer" />
|
||||||
|
</beans>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||||
|
<beans default-autowire="byName">
|
||||||
|
<bean name="deliveryOrderPluginServiceImpl" class="com.hzya.frame.plugin.kjs.service.impl.DeliveryOrderPluginServiceImpl" />
|
||||||
|
<bean name="momOrderPluginServiceImpl" class="com.hzya.frame.plugin.kjs.service.impl.MomOrderPluginServiceImpl" />
|
||||||
|
</beans>
|
11
pom.xml
11
pom.xml
|
@ -383,6 +383,17 @@
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-data-mongodb</artifactId>
|
<artifactId>spring-boot-starter-data-mongodb</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mapstruct</groupId>
|
||||||
|
<artifactId>mapstruct</artifactId>
|
||||||
|
<version>1.4.2.Final</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mapstruct</groupId>
|
||||||
|
<artifactId>mapstruct-processor</artifactId>
|
||||||
|
<version>1.4.2.Final</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.hzya.frame.u8.delivery.dao;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
import com.hzya.frame.u8.delivery.entity.DeliveryDetailEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description u8发货单明细行
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/22 16:22
|
||||||
|
**/
|
||||||
|
public interface IDeliveryDetailDao extends IBaseDao<DeliveryDetailEntity,String> {
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.hzya.frame.u8.delivery.dao;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
import com.hzya.frame.u8.delivery.entity.DeliveryOrderEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description U8发货单
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/22 15:07
|
||||||
|
**/
|
||||||
|
public interface IDeliveryOrderDao extends IBaseDao<DeliveryOrderEntity,String> {
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.hzya.frame.u8.delivery.dao.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
import com.hzya.frame.u8.delivery.dao.IDeliveryDetailDao;
|
||||||
|
import com.hzya.frame.u8.delivery.entity.DeliveryDetailEntity;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/22 16:24
|
||||||
|
**/
|
||||||
|
@Repository
|
||||||
|
public class DeliveryDetailDaoImpl extends MybatisGenericDao<DeliveryDetailEntity,String> implements IDeliveryDetailDao {
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.hzya.frame.u8.delivery.dao.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
import com.hzya.frame.u8.delivery.dao.IDeliveryOrderDao;
|
||||||
|
import com.hzya.frame.u8.delivery.entity.DeliveryOrderEntity;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description u8发货单
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/22 15:09
|
||||||
|
**/
|
||||||
|
@Repository
|
||||||
|
public class DeliveryOrderDaoImpl extends MybatisGenericDao<DeliveryOrderEntity,String> implements IDeliveryOrderDao {
|
||||||
|
}
|
|
@ -0,0 +1,179 @@
|
||||||
|
package com.hzya.frame.u8.delivery.dto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 发货单明细行
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/22 17:01
|
||||||
|
**/
|
||||||
|
public class DeliveryDetailDTO {
|
||||||
|
//主表id
|
||||||
|
private String dlid;
|
||||||
|
//仓库编码
|
||||||
|
private String cwhcode;
|
||||||
|
//仓库名称
|
||||||
|
private String cwhname;
|
||||||
|
//存货编码
|
||||||
|
private String cinvcode;
|
||||||
|
//存货名称
|
||||||
|
private String cinvname;
|
||||||
|
//规格型号
|
||||||
|
private String cinvstd;
|
||||||
|
//数量
|
||||||
|
private String iquantity;
|
||||||
|
//件数
|
||||||
|
private String inum;
|
||||||
|
//计量单位编码
|
||||||
|
private String ccomunitcode;
|
||||||
|
//计量单位名称
|
||||||
|
private String ccomunitname;
|
||||||
|
//辅计量单位编码
|
||||||
|
private String casscomunitcode;
|
||||||
|
//辅计量单位名称
|
||||||
|
private String casscomunitname;
|
||||||
|
//备注
|
||||||
|
private String cmemo;
|
||||||
|
//行号
|
||||||
|
private String irowno;
|
||||||
|
//订单行号
|
||||||
|
private String iorderrowno;
|
||||||
|
//销售订单号
|
||||||
|
private String csocode;
|
||||||
|
//税率
|
||||||
|
private String itaxrate;
|
||||||
|
|
||||||
|
public String getDlid() {
|
||||||
|
return dlid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDlid(String dlid) {
|
||||||
|
this.dlid = dlid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCwhcode() {
|
||||||
|
return cwhcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCwhcode(String cwhcode) {
|
||||||
|
this.cwhcode = cwhcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCwhname() {
|
||||||
|
return cwhname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCwhname(String cwhname) {
|
||||||
|
this.cwhname = cwhname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCinvcode() {
|
||||||
|
return cinvcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCinvcode(String cinvcode) {
|
||||||
|
this.cinvcode = cinvcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCinvname() {
|
||||||
|
return cinvname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCinvname(String cinvname) {
|
||||||
|
this.cinvname = cinvname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCinvstd() {
|
||||||
|
return cinvstd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCinvstd(String cinvstd) {
|
||||||
|
this.cinvstd = cinvstd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIquantity() {
|
||||||
|
return iquantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIquantity(String iquantity) {
|
||||||
|
this.iquantity = iquantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInum() {
|
||||||
|
return inum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInum(String inum) {
|
||||||
|
this.inum = inum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCcomunitcode() {
|
||||||
|
return ccomunitcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCcomunitcode(String ccomunitcode) {
|
||||||
|
this.ccomunitcode = ccomunitcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCcomunitname() {
|
||||||
|
return ccomunitname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCcomunitname(String ccomunitname) {
|
||||||
|
this.ccomunitname = ccomunitname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCasscomunitcode() {
|
||||||
|
return casscomunitcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCasscomunitcode(String casscomunitcode) {
|
||||||
|
this.casscomunitcode = casscomunitcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCasscomunitname() {
|
||||||
|
return casscomunitname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCasscomunitname(String casscomunitname) {
|
||||||
|
this.casscomunitname = casscomunitname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCmemo() {
|
||||||
|
return cmemo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCmemo(String cmemo) {
|
||||||
|
this.cmemo = cmemo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIrowno() {
|
||||||
|
return irowno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIrowno(String irowno) {
|
||||||
|
this.irowno = irowno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIorderrowno() {
|
||||||
|
return iorderrowno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIorderrowno(String iorderrowno) {
|
||||||
|
this.iorderrowno = iorderrowno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCsocode() {
|
||||||
|
return csocode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCsocode(String csocode) {
|
||||||
|
this.csocode = csocode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getItaxrate() {
|
||||||
|
return itaxrate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItaxrate(String itaxrate) {
|
||||||
|
this.itaxrate = itaxrate;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,155 @@
|
||||||
|
package com.hzya.frame.u8.delivery.dto;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 发货单
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/22 17:01
|
||||||
|
**/
|
||||||
|
public class DeliveryOrderDTO {
|
||||||
|
@JSONField(serialize = false)
|
||||||
|
private String dlid;
|
||||||
|
//发货单号
|
||||||
|
@JSONField(ordinal = 1)
|
||||||
|
private String cdlcode;
|
||||||
|
//客户编码
|
||||||
|
@JSONField(ordinal = 2)
|
||||||
|
private String ccuscode;
|
||||||
|
//客户名称
|
||||||
|
@JSONField(ordinal = 3)
|
||||||
|
private String ccusname;
|
||||||
|
//销售订单号
|
||||||
|
@JSONField(ordinal = 4)
|
||||||
|
private String csocode;
|
||||||
|
//发货日期
|
||||||
|
@JSONField(ordinal = 5)
|
||||||
|
private String ddate;
|
||||||
|
//制单人
|
||||||
|
@JSONField(ordinal = 6)
|
||||||
|
private String cmaker;
|
||||||
|
//制单时间
|
||||||
|
@JSONField(ordinal = 7)
|
||||||
|
private String dcreatesystime;
|
||||||
|
//币种
|
||||||
|
@JSONField(ordinal = 8)
|
||||||
|
private String cexch_name;
|
||||||
|
//汇率
|
||||||
|
@JSONField(ordinal = 9)
|
||||||
|
private String iexchrate;
|
||||||
|
//税率
|
||||||
|
@JSONField(ordinal = 10)
|
||||||
|
private String itaxrate;
|
||||||
|
//备注
|
||||||
|
@JSONField(ordinal = 11)
|
||||||
|
private String cmemo;
|
||||||
|
//子表
|
||||||
|
@JSONField(ordinal = 12)
|
||||||
|
private List<DeliveryDetailDTO> itesm;
|
||||||
|
|
||||||
|
public String getDlid() {
|
||||||
|
return dlid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDlid(String dlid) {
|
||||||
|
this.dlid = dlid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCdlcode() {
|
||||||
|
return cdlcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCdlcode(String cdlcode) {
|
||||||
|
this.cdlcode = cdlcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCcuscode() {
|
||||||
|
return ccuscode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCcuscode(String ccuscode) {
|
||||||
|
this.ccuscode = ccuscode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCcusname() {
|
||||||
|
return ccusname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCcusname(String ccusname) {
|
||||||
|
this.ccusname = ccusname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCsocode() {
|
||||||
|
return csocode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCsocode(String csocode) {
|
||||||
|
this.csocode = csocode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDdate() {
|
||||||
|
return ddate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDdate(String ddate) {
|
||||||
|
this.ddate = ddate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCmaker() {
|
||||||
|
return cmaker;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCmaker(String cmaker) {
|
||||||
|
this.cmaker = cmaker;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDcreatesystime() {
|
||||||
|
return dcreatesystime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDcreatesystime(String dcreatesystime) {
|
||||||
|
this.dcreatesystime = dcreatesystime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCexch_name() {
|
||||||
|
return cexch_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCexch_name(String cexch_name) {
|
||||||
|
this.cexch_name = cexch_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIexchrate() {
|
||||||
|
return iexchrate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIexchrate(String iexchrate) {
|
||||||
|
this.iexchrate = iexchrate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getItaxrate() {
|
||||||
|
return itaxrate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItaxrate(String itaxrate) {
|
||||||
|
this.itaxrate = itaxrate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCmemo() {
|
||||||
|
return cmemo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCmemo(String cmemo) {
|
||||||
|
this.cmemo = cmemo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DeliveryDetailDTO> getItesm() {
|
||||||
|
return itesm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItesm(List<DeliveryDetailDTO> itesm) {
|
||||||
|
this.itesm = itesm;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,182 @@
|
||||||
|
package com.hzya.frame.u8.delivery.entity;
|
||||||
|
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description U8发货明细行
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/22 16:12
|
||||||
|
**/
|
||||||
|
public class DeliveryDetailEntity extends BaseEntity {
|
||||||
|
|
||||||
|
//主表id
|
||||||
|
private String dlid;
|
||||||
|
//仓库编码
|
||||||
|
private String cwhcode;
|
||||||
|
//仓库名称
|
||||||
|
private String cwhname;
|
||||||
|
//存货编码
|
||||||
|
private String cinvcode;
|
||||||
|
//存货名称
|
||||||
|
private String cinvname;
|
||||||
|
//规格型号
|
||||||
|
private String cinvstd;
|
||||||
|
//数量
|
||||||
|
private String iquantity;
|
||||||
|
//件数
|
||||||
|
private String inum;
|
||||||
|
//计量单位编码
|
||||||
|
private String ccomunitcode;
|
||||||
|
//计量单位名称
|
||||||
|
private String ccomunitname;
|
||||||
|
//辅计量单位编码
|
||||||
|
private String casscomunitcode;
|
||||||
|
//辅计量单位名称
|
||||||
|
private String casscomunitname;
|
||||||
|
//备注
|
||||||
|
private String cmemo;
|
||||||
|
//行号
|
||||||
|
private String irowno;
|
||||||
|
//订单行号
|
||||||
|
private String iorderrowno;
|
||||||
|
//销售订单号
|
||||||
|
private String csocode;
|
||||||
|
//税率
|
||||||
|
private String itaxrate;
|
||||||
|
|
||||||
|
public String getDlid() {
|
||||||
|
return dlid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDlid(String dlid) {
|
||||||
|
this.dlid = dlid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCwhcode() {
|
||||||
|
return cwhcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCwhcode(String cwhcode) {
|
||||||
|
this.cwhcode = cwhcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCwhname() {
|
||||||
|
return cwhname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCwhname(String cwhname) {
|
||||||
|
this.cwhname = cwhname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCinvcode() {
|
||||||
|
return cinvcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCinvcode(String cinvcode) {
|
||||||
|
this.cinvcode = cinvcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCinvname() {
|
||||||
|
return cinvname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCinvname(String cinvname) {
|
||||||
|
this.cinvname = cinvname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCinvstd() {
|
||||||
|
return cinvstd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCinvstd(String cinvstd) {
|
||||||
|
this.cinvstd = cinvstd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIquantity() {
|
||||||
|
return iquantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIquantity(String iquantity) {
|
||||||
|
this.iquantity = iquantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInum() {
|
||||||
|
return inum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInum(String inum) {
|
||||||
|
this.inum = inum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCcomunitcode() {
|
||||||
|
return ccomunitcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCcomunitcode(String ccomunitcode) {
|
||||||
|
this.ccomunitcode = ccomunitcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCcomunitname() {
|
||||||
|
return ccomunitname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCcomunitname(String ccomunitname) {
|
||||||
|
this.ccomunitname = ccomunitname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCasscomunitcode() {
|
||||||
|
return casscomunitcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCasscomunitcode(String casscomunitcode) {
|
||||||
|
this.casscomunitcode = casscomunitcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCasscomunitname() {
|
||||||
|
return casscomunitname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCasscomunitname(String casscomunitname) {
|
||||||
|
this.casscomunitname = casscomunitname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCmemo() {
|
||||||
|
return cmemo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCmemo(String cmemo) {
|
||||||
|
this.cmemo = cmemo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIrowno() {
|
||||||
|
return irowno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIrowno(String irowno) {
|
||||||
|
this.irowno = irowno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIorderrowno() {
|
||||||
|
return iorderrowno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIorderrowno(String iorderrowno) {
|
||||||
|
this.iorderrowno = iorderrowno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCsocode() {
|
||||||
|
return csocode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCsocode(String csocode) {
|
||||||
|
this.csocode = csocode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getItaxrate() {
|
||||||
|
return itaxrate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItaxrate(String itaxrate) {
|
||||||
|
this.itaxrate = itaxrate;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,57 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.hzya.frame.u8.delivery.dao.impl.DeliveryDetailDaoImpl">
|
||||||
|
<resultMap id="get-entity-result" type="com.hzya.frame.u8.delivery.entity.DeliveryDetailEntity">
|
||||||
|
<result property="dlid" column="dlid" />
|
||||||
|
<result property="cwhcode" column="cwhcode" />
|
||||||
|
<result property="cwhname" column="cwhname" />
|
||||||
|
<result property="cinvcode" column="cinvcode" />
|
||||||
|
<result property="cinvname" column="cinvname" />
|
||||||
|
<result property="cinvstd" column="cinvstd" />
|
||||||
|
<result property="iquantity" column="iquantity" />
|
||||||
|
<result property="inum" column="inum" />
|
||||||
|
<result property="ccomunitcode" column="ccomunitcode" />
|
||||||
|
<result property="ccomunitname" column="ccomunitname" />
|
||||||
|
<result property="casscomunitcode" column="casscomunitcode" />
|
||||||
|
<result property="casscomunitname" column="casscomunitname" />
|
||||||
|
<result property="cmemo" column="cmemo" />
|
||||||
|
<result property="irowno" column="irowno" />
|
||||||
|
<result property="iorderrowno" column="iorderrowno" />
|
||||||
|
<result property="csocode" column="csocode" />
|
||||||
|
<result property="itaxrate" column="itaxrate" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="DeliveryDetailEntity_Base_Column_List">
|
||||||
|
dls.dlid,
|
||||||
|
dls.cwhcode,
|
||||||
|
cwhname,
|
||||||
|
dls.cinvcode,
|
||||||
|
dls.cinvname,
|
||||||
|
cinvstd,
|
||||||
|
iquantity,
|
||||||
|
inum,
|
||||||
|
inv.ccomunitcode,
|
||||||
|
comUnit.ccomunitname,
|
||||||
|
casscomunitcode,
|
||||||
|
assUnit.ccomunitname as 'casscomunitname',
|
||||||
|
cmemo,
|
||||||
|
irowno,
|
||||||
|
iorderrowno,
|
||||||
|
csocode,
|
||||||
|
dls.itaxrate
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="entity_list_base" resultMap="get-entity-result" parameterType="com.hzya.frame.u8.delivery.entity.DeliveryDetailEntity">
|
||||||
|
select
|
||||||
|
<include refid="DeliveryDetailEntity_Base_Column_List" />
|
||||||
|
from DispatchLists dls
|
||||||
|
left join Warehouse wh on wh.cWhCode = dls.cWhCode
|
||||||
|
left join inventory inv on inv.cInvCode = dls.cInvCode
|
||||||
|
left join ComputationUnit comUnit on comUnit.cComunitCode = inv.cComUnitCode
|
||||||
|
left join ComputationUnit assUnit on assUnit.cComunitCode = inv.cAssComUnitCode
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="dlid != null ">dls.DLID = #{dlid} </if>
|
||||||
|
<if test="cwhcode != null and cwhcode !='' "> and dls.cwhcode = #{cwhcode} </if>
|
||||||
|
</trim>
|
||||||
|
order by dlid,irowno
|
||||||
|
</select>
|
||||||
|
</mapper>
|
|
@ -0,0 +1,142 @@
|
||||||
|
package com.hzya.frame.u8.delivery.entity;
|
||||||
|
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description U8发货单
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/22 15:04
|
||||||
|
**/
|
||||||
|
public class DeliveryOrderEntity extends BaseEntity {
|
||||||
|
|
||||||
|
//主键
|
||||||
|
private String dlid;
|
||||||
|
//发货单号
|
||||||
|
private String cdlcode;
|
||||||
|
//客户编码
|
||||||
|
private String ccuscode;
|
||||||
|
//客户名称
|
||||||
|
private String ccusname;
|
||||||
|
//销售订单号
|
||||||
|
private String csocode;
|
||||||
|
//发货日期
|
||||||
|
private String ddate;
|
||||||
|
//制单人
|
||||||
|
private String cmaker;
|
||||||
|
//制单时间
|
||||||
|
private String dcreatesystime;
|
||||||
|
//币种
|
||||||
|
private String cexch_name;
|
||||||
|
//汇率
|
||||||
|
private String iexchrate;
|
||||||
|
//税率
|
||||||
|
private String itaxrate;
|
||||||
|
//备注
|
||||||
|
private String cmemo;
|
||||||
|
|
||||||
|
//退货标记。 0发货 1退货
|
||||||
|
private String bReturnFlag;
|
||||||
|
public String getDlid() {
|
||||||
|
return dlid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDlid(String dlid) {
|
||||||
|
this.dlid = dlid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCdlcode() {
|
||||||
|
return cdlcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCdlcode(String cdlcode) {
|
||||||
|
this.cdlcode = cdlcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCcuscode() {
|
||||||
|
return ccuscode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCcuscode(String ccuscode) {
|
||||||
|
this.ccuscode = ccuscode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCcusname() {
|
||||||
|
return ccusname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCcusname(String ccusname) {
|
||||||
|
this.ccusname = ccusname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCsocode() {
|
||||||
|
return csocode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCsocode(String csocode) {
|
||||||
|
this.csocode = csocode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDdate() {
|
||||||
|
return ddate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDdate(String ddate) {
|
||||||
|
this.ddate = ddate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCmaker() {
|
||||||
|
return cmaker;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCmaker(String cmaker) {
|
||||||
|
this.cmaker = cmaker;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDcreatesystime() {
|
||||||
|
return dcreatesystime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDcreatesystime(String dcreatesystime) {
|
||||||
|
this.dcreatesystime = dcreatesystime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCexch_name() {
|
||||||
|
return cexch_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCexch_name(String cexch_name) {
|
||||||
|
this.cexch_name = cexch_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIexchrate() {
|
||||||
|
return iexchrate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIexchrate(String iexchrate) {
|
||||||
|
this.iexchrate = iexchrate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getItaxrate() {
|
||||||
|
return itaxrate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItaxrate(String itaxrate) {
|
||||||
|
this.itaxrate = itaxrate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCmemo() {
|
||||||
|
return cmemo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCmemo(String cmemo) {
|
||||||
|
this.cmemo = cmemo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getbReturnFlag() {
|
||||||
|
return bReturnFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setbReturnFlag(String bReturnFlag) {
|
||||||
|
this.bReturnFlag = bReturnFlag;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,47 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.hzya.frame.u8.delivery.dao.impl.DeliveryOrderDaoImpl">
|
||||||
|
<resultMap id="get-entity-result" type="com.hzya.frame.u8.delivery.entity.DeliveryOrderEntity">
|
||||||
|
<result property="dlid" column="dlid" />
|
||||||
|
<result property="cdlcode" column="cdlcode" />
|
||||||
|
<result property="ccuscode" column="ccuscode" />
|
||||||
|
<result property="ccusname" column="ccusname" />
|
||||||
|
<result property="csocode" column="csocode" />
|
||||||
|
<result property="ddate" column="ddate" />
|
||||||
|
<result property="cmaker" column="cmaker" />
|
||||||
|
<result property="dcreatesystime" column="dcreatesystime" />
|
||||||
|
<result property="cexch_name" column="cexch_name" />
|
||||||
|
<result property="iexchrate" column="iexchrate" />
|
||||||
|
<result property="itaxrate" column="itaxrate" />
|
||||||
|
<result property="cmemo" column="cmemo" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="DeliveryOrder_Base_Column_List">
|
||||||
|
dlid,
|
||||||
|
cdlcode,
|
||||||
|
ccuscode,
|
||||||
|
ccusname,
|
||||||
|
csocode,
|
||||||
|
ddate,
|
||||||
|
cmaker,
|
||||||
|
dcreatesystime,
|
||||||
|
cexch_name,
|
||||||
|
iexchrate,
|
||||||
|
itaxrate,
|
||||||
|
cmemo
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="entity_list_base" resultMap="get-entity-result" parameterType="com.hzya.frame.u8.delivery.entity.DeliveryOrderEntity">
|
||||||
|
select
|
||||||
|
<include refid="DeliveryOrder_Base_Column_List" />
|
||||||
|
from DispatchList
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="dlid != null ">dlid= #{dlid} </if>
|
||||||
|
<if test="cdlcode != null and cdlcode !='' "> and cdlcode = #{cdlcode} </if>
|
||||||
|
<if test="ccuscode != null and ccuscode !='' "> and ccuscode = #{ccuscode} </if>
|
||||||
|
<if test="ccusname != null and ccusname !='' "> and ccusname = #{ccusname} </if>
|
||||||
|
<if test="csocode != null and csocode !='' "> and csocode = #{csocode} </if>
|
||||||
|
<if test="bReturnFlag != null and bReturnFlag !='' "> and bReturnFlag = #{bReturnFlag} </if>
|
||||||
|
</trim>
|
||||||
|
order by dlid
|
||||||
|
</select>
|
||||||
|
</mapper>
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.hzya.frame.u8.delivery.service;
|
||||||
|
|
||||||
|
import com.hzya.frame.u8.delivery.dto.DeliveryDetailDTO;
|
||||||
|
import com.hzya.frame.u8.delivery.dto.DeliveryOrderDTO;
|
||||||
|
import com.hzya.frame.u8.delivery.entity.DeliveryDetailEntity;
|
||||||
|
import com.hzya.frame.u8.delivery.entity.DeliveryOrderEntity;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 转换器, entity转dto用
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/22 17:45
|
||||||
|
**/
|
||||||
|
@Mapper
|
||||||
|
public interface DeliveryMapper {
|
||||||
|
|
||||||
|
DeliveryMapper INSTANCE = Mappers.getMapper(DeliveryMapper.class);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发货单entity转换成dto
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
DeliveryOrderDTO deliveryEntityToDto(DeliveryOrderEntity entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发货单明细行转换成dto
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
DeliveryDetailDTO deliveryDetailEntityToDto(DeliveryDetailEntity entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发货单明细行列表转成dto
|
||||||
|
* @param list
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<DeliveryDetailDTO> deliveryDetailListToDto(List<DeliveryDetailEntity> list);
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.hzya.frame.u8.delivery.service;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
import com.hzya.frame.u8.delivery.entity.DeliveryDetailEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description u8发货单明细行
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/22 16:26
|
||||||
|
**/
|
||||||
|
public interface IDeliveryDetaiService extends IBaseService<DeliveryDetailEntity,String> {
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.hzya.frame.u8.delivery.service;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
import com.hzya.frame.u8.delivery.entity.DeliveryOrderEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description U8发货单
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/22 15:12
|
||||||
|
**/
|
||||||
|
public interface IDeliveryOrderService extends IBaseService<DeliveryOrderEntity,String> {
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.hzya.frame.u8.delivery.service.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
import com.hzya.frame.u8.delivery.dao.IDeliveryDetailDao;
|
||||||
|
import com.hzya.frame.u8.delivery.dao.IDeliveryOrderDao;
|
||||||
|
import com.hzya.frame.u8.delivery.entity.DeliveryDetailEntity;
|
||||||
|
import com.hzya.frame.u8.delivery.service.IDeliveryDetaiService;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description u8发货单明细行
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/22 16:27
|
||||||
|
**/
|
||||||
|
@Service()
|
||||||
|
public class DeliveryDetaiServiceImpl extends BaseService<DeliveryDetailEntity,String> implements IDeliveryDetaiService {
|
||||||
|
Logger logger = LogManager.getLogger(getClass());
|
||||||
|
private IDeliveryDetailDao deliveryDetailDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setDeliveryDetailDao(IDeliveryDetailDao dao) {
|
||||||
|
this.deliveryDetailDao = dao;
|
||||||
|
this.dao = dao;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
package com.hzya.frame.u8.delivery.service.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
import com.hzya.frame.u8.delivery.dao.IDeliveryOrderDao;
|
||||||
|
import com.hzya.frame.u8.delivery.entity.DeliveryOrderEntity;
|
||||||
|
import com.hzya.frame.u8.delivery.service.IDeliveryOrderService;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description U8发货单
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/22 15:13
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class DeliveryOrderServiceImpl extends BaseService<DeliveryOrderEntity,String> implements IDeliveryOrderService {
|
||||||
|
Logger logger = LogManager.getLogger(getClass());
|
||||||
|
private IDeliveryOrderDao deliveryOrderDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setDeliveryOrderDao(IDeliveryOrderDao dao) {
|
||||||
|
this.deliveryOrderDao = dao;
|
||||||
|
this.dao = dao;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.hzya.frame.u8.production.dao;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
import com.hzya.frame.u8.production.entity.MomOrderEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description u8生产订单表头
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/23 08:49
|
||||||
|
**/
|
||||||
|
public interface IMomOrderDao extends IBaseDao<MomOrderEntity,String> {
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.hzya.frame.u8.production.dao;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
import com.hzya.frame.u8.production.entity.MomOrderDetailEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description u8生产订单表体
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/23 09:00
|
||||||
|
**/
|
||||||
|
public interface IMomOrderDetailDao extends IBaseDao<MomOrderDetailEntity,String> {
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.hzya.frame.u8.production.dao.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
import com.hzya.frame.u8.production.dao.IMomOrderDao;
|
||||||
|
import com.hzya.frame.u8.production.entity.MomOrderEntity;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/23 08:50
|
||||||
|
**/
|
||||||
|
@Repository
|
||||||
|
public class MomOrderDaoImpl extends MybatisGenericDao<MomOrderEntity,String> implements IMomOrderDao {
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.hzya.frame.u8.production.dao.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
import com.hzya.frame.u8.production.dao.IMomOrderDetailDao;
|
||||||
|
import com.hzya.frame.u8.production.entity.MomOrderDetailEntity;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/23 09:01
|
||||||
|
**/
|
||||||
|
@Repository
|
||||||
|
public class MomOrderDetailDaoImpl extends MybatisGenericDao<MomOrderDetailEntity,String> implements IMomOrderDetailDao {
|
||||||
|
}
|
|
@ -0,0 +1,68 @@
|
||||||
|
package com.hzya.frame.u8.production.dto;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/23 09:09
|
||||||
|
**/
|
||||||
|
public class MomOrderDTO {
|
||||||
|
@JSONField(ordinal = 1)
|
||||||
|
//主键
|
||||||
|
private String moId;
|
||||||
|
//生产订单号
|
||||||
|
@JSONField(ordinal = 2)
|
||||||
|
private String mocode;
|
||||||
|
//制单日期
|
||||||
|
@JSONField(ordinal = 3)
|
||||||
|
private String createtime;
|
||||||
|
//制单人
|
||||||
|
@JSONField(ordinal = 4)
|
||||||
|
private String createuser;
|
||||||
|
//表体
|
||||||
|
@JSONField(ordinal = 5)
|
||||||
|
private List<MomOrderDetailDTO> itesm;
|
||||||
|
public String getMoId() {
|
||||||
|
return moId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMoId(String moId) {
|
||||||
|
this.moId = moId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMocode() {
|
||||||
|
return mocode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMocode(String mocode) {
|
||||||
|
this.mocode = mocode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreatetime() {
|
||||||
|
return createtime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatetime(String createtime) {
|
||||||
|
this.createtime = createtime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateuser() {
|
||||||
|
return createuser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateuser(String createuser) {
|
||||||
|
this.createuser = createuser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<MomOrderDetailDTO> getItesm() {
|
||||||
|
return itesm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItesm(List<MomOrderDetailDTO> itesm) {
|
||||||
|
this.itesm = itesm;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,88 @@
|
||||||
|
package com.hzya.frame.u8.production.dto;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/23 09:09
|
||||||
|
**/
|
||||||
|
public class MomOrderDetailDTO {
|
||||||
|
//存货编码
|
||||||
|
@JSONField(ordinal = 1)
|
||||||
|
private String cinvcode;
|
||||||
|
//存货名称
|
||||||
|
@JSONField(ordinal = 2)
|
||||||
|
private String cinvname;
|
||||||
|
//规格型号
|
||||||
|
@JSONField(ordinal = 3)
|
||||||
|
private String cinvstd;
|
||||||
|
//数量
|
||||||
|
@JSONField(ordinal = 4)
|
||||||
|
private String qty;
|
||||||
|
//件数
|
||||||
|
@JSONField(ordinal = 5)
|
||||||
|
private String auxqty;
|
||||||
|
//部门名称
|
||||||
|
@JSONField(ordinal = 6)
|
||||||
|
private String mdeptname;
|
||||||
|
//部门编码
|
||||||
|
@JSONField(ordinal = 7)
|
||||||
|
private String mdeptcode;
|
||||||
|
|
||||||
|
public String getCinvcode() {
|
||||||
|
return cinvcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCinvcode(String cinvcode) {
|
||||||
|
this.cinvcode = cinvcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCinvname() {
|
||||||
|
return cinvname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCinvname(String cinvname) {
|
||||||
|
this.cinvname = cinvname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCinvstd() {
|
||||||
|
return cinvstd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCinvstd(String cinvstd) {
|
||||||
|
this.cinvstd = cinvstd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQty() {
|
||||||
|
return qty;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQty(String qty) {
|
||||||
|
this.qty = qty;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAuxqty() {
|
||||||
|
return auxqty;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAuxqty(String auxqty) {
|
||||||
|
this.auxqty = auxqty;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMdeptname() {
|
||||||
|
return mdeptname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMdeptname(String mdeptname) {
|
||||||
|
this.mdeptname = mdeptname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMdeptcode() {
|
||||||
|
return mdeptcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMdeptcode(String mdeptcode) {
|
||||||
|
this.mdeptcode = mdeptcode;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,91 @@
|
||||||
|
package com.hzya.frame.u8.production.entity;
|
||||||
|
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description u8生产订单表体 mom_orderdetail
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/23 08:57
|
||||||
|
**/
|
||||||
|
public class MomOrderDetailEntity extends BaseEntity {
|
||||||
|
//主表id
|
||||||
|
private String moId;
|
||||||
|
//存货编码
|
||||||
|
private String cinvcode;
|
||||||
|
//存货名称
|
||||||
|
private String cinvname;
|
||||||
|
//规格型号
|
||||||
|
private String cinvstd;
|
||||||
|
//数量
|
||||||
|
private String qty;
|
||||||
|
//件数
|
||||||
|
private String auxqty;
|
||||||
|
//部门名称
|
||||||
|
private String mdeptname;
|
||||||
|
//部门编码
|
||||||
|
private String mdeptcode;
|
||||||
|
|
||||||
|
public String getMoId() {
|
||||||
|
return moId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMoId(String moId) {
|
||||||
|
this.moId = moId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCinvcode() {
|
||||||
|
return cinvcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCinvcode(String cinvcode) {
|
||||||
|
this.cinvcode = cinvcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCinvname() {
|
||||||
|
return cinvname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCinvname(String cinvname) {
|
||||||
|
this.cinvname = cinvname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCinvstd() {
|
||||||
|
return cinvstd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCinvstd(String cinvstd) {
|
||||||
|
this.cinvstd = cinvstd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQty() {
|
||||||
|
return qty;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQty(String qty) {
|
||||||
|
this.qty = qty;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAuxqty() {
|
||||||
|
return auxqty;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAuxqty(String auxqty) {
|
||||||
|
this.auxqty = auxqty;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMdeptname() {
|
||||||
|
return mdeptname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMdeptname(String mdeptname) {
|
||||||
|
this.mdeptname = mdeptname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMdeptcode() {
|
||||||
|
return mdeptcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMdeptcode(String mdeptcode) {
|
||||||
|
this.mdeptcode = mdeptcode;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.hzya.frame.u8.production.dao.impl.MomOrderDetailDaoImpl">
|
||||||
|
<resultMap id="get-entity-result" type="com.hzya.frame.u8.production.entity.MomOrderDetailEntity">
|
||||||
|
<result property="moId" column="moId" />
|
||||||
|
<result property="cinvcode" column="cinvcode" />
|
||||||
|
<result property="cinvname" column="cinvname" />
|
||||||
|
<result property="cinvstd" column="cinvstd" />
|
||||||
|
<result property="qty" column="qty" />
|
||||||
|
<result property="auxqty" column="auxqty" />
|
||||||
|
<result property="mdeptname" column="mdeptname" />
|
||||||
|
<result property="mdeptcode" column="mdeptcode" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="MomOrderDetail_Base_Column_List">
|
||||||
|
MoId,
|
||||||
|
invCode as 'cinvcode',
|
||||||
|
cinvname,
|
||||||
|
cinvstd,
|
||||||
|
qty,
|
||||||
|
auxqty,
|
||||||
|
dep.cDepName as 'mdeptname',
|
||||||
|
mdeptcode
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="entity_list_base" resultMap="get-entity-result" parameterType="com.hzya.frame.u8.production.entity.MomOrderDetailEntity">
|
||||||
|
select
|
||||||
|
<include refid="MomOrderDetail_Base_Column_List" />
|
||||||
|
from mom_orderdetail mos
|
||||||
|
left join inventory inv on inv.cInvCode = mos.InvCode
|
||||||
|
left join Department dep on dep.cDepCode = mos.MDeptCode
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="moId != null ">moId= #{moId} </if>
|
||||||
|
<if test="cinvcode != null and cinvcode !='' "> and mos.InvCode = #{cinvcode} </if>
|
||||||
|
<if test="cinvname != null and cinvname !='' "> and inv.cinvname = #{cinvname} </if>
|
||||||
|
</trim>
|
||||||
|
order by moId
|
||||||
|
</select>
|
||||||
|
</mapper>
|
|
@ -0,0 +1,51 @@
|
||||||
|
package com.hzya.frame.u8.production.entity;
|
||||||
|
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description u8生产订单表头 mom_order
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/23 08:46
|
||||||
|
**/
|
||||||
|
public class MomOrderEntity extends BaseEntity {
|
||||||
|
//主键
|
||||||
|
private String moId;
|
||||||
|
//生产订单号
|
||||||
|
private String mocode;
|
||||||
|
//制单日期
|
||||||
|
private String createtime;
|
||||||
|
//制单人
|
||||||
|
private String createuser;
|
||||||
|
|
||||||
|
public String getMoId() {
|
||||||
|
return moId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMoId(String moId) {
|
||||||
|
this.moId = moId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMocode() {
|
||||||
|
return mocode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMocode(String mocode) {
|
||||||
|
this.mocode = mocode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreatetime() {
|
||||||
|
return createtime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatetime(String createtime) {
|
||||||
|
this.createtime = createtime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateuser() {
|
||||||
|
return createuser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateuser(String createuser) {
|
||||||
|
this.createuser = createuser;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.hzya.frame.u8.production.dao.impl.MomOrderDaoImpl">
|
||||||
|
<resultMap id="get-entity-result" type="com.hzya.frame.u8.production.entity.MomOrderEntity">
|
||||||
|
<result property="moId" column="moId" />
|
||||||
|
<result property="mocode" column="mocode" />
|
||||||
|
<result property="createtime" column="createtime" />
|
||||||
|
<result property="createuser" column="createuser" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="MomOrder_Base_Column_List">
|
||||||
|
moId,
|
||||||
|
mocode,
|
||||||
|
createtime,
|
||||||
|
createuser
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="entity_list_base" resultMap="get-entity-result" parameterType="com.hzya.frame.u8.production.entity.MomOrderEntity">
|
||||||
|
select
|
||||||
|
<include refid="MomOrder_Base_Column_List" />
|
||||||
|
from mom_order
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="moId != null ">moId= #{moId} </if>
|
||||||
|
<if test="mocode != null and mocode !='' "> and mocode = #{mocode} </if>
|
||||||
|
</trim>
|
||||||
|
order by moId
|
||||||
|
</select>
|
||||||
|
</mapper>
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.hzya.frame.u8.production.service;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
import com.hzya.frame.u8.production.entity.MomOrderDetailEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description u8生产订单表体
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/23 09:02
|
||||||
|
**/
|
||||||
|
public interface IMomOrderDetailService extends IBaseService<MomOrderDetailEntity,String> {
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.hzya.frame.u8.production.service;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
import com.hzya.frame.u8.production.entity.MomOrderEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description u8生产订单表头
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/23 08:54
|
||||||
|
**/
|
||||||
|
public interface IMomOrderService extends IBaseService<MomOrderEntity,String> {
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.hzya.frame.u8.production.service;
|
||||||
|
|
||||||
|
import com.hzya.frame.u8.production.dto.MomOrderDTO;
|
||||||
|
import com.hzya.frame.u8.production.dto.MomOrderDetailDTO;
|
||||||
|
import com.hzya.frame.u8.production.entity.MomOrderDetailEntity;
|
||||||
|
import com.hzya.frame.u8.production.entity.MomOrderEntity;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description entity转换成 dto
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/23 09:10
|
||||||
|
**/
|
||||||
|
@Mapper
|
||||||
|
public interface MomOrderMapper {
|
||||||
|
|
||||||
|
MomOrderMapper INSTANCE = Mappers.getMapper(MomOrderMapper.class);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产订单entity转dto
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
MomOrderDTO momOrderEntityToDto(MomOrderEntity entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产订单明细行列表转dto
|
||||||
|
* @param list
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<MomOrderDetailDTO> momOrderDetailListToDto(List<MomOrderDetailEntity> list);
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.hzya.frame.u8.production.service.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
import com.hzya.frame.u8.production.dao.IMomOrderDetailDao;
|
||||||
|
import com.hzya.frame.u8.production.entity.MomOrderDetailEntity;
|
||||||
|
import com.hzya.frame.u8.production.service.IMomOrderDetailService;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/23 09:03
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class MomOrderDetailServiceImpl extends BaseService<MomOrderDetailEntity,String> implements IMomOrderDetailService {
|
||||||
|
Logger logger = LogManager.getLogger(getClass());
|
||||||
|
private IMomOrderDetailDao momOrderDetailDao;
|
||||||
|
@Autowired
|
||||||
|
public void setMomOrderDetailDao(IMomOrderDetailDao dao) {
|
||||||
|
this.momOrderDetailDao = dao;
|
||||||
|
this.dao = dao;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.hzya.frame.u8.production.service.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
import com.hzya.frame.u8.production.dao.IMomOrderDao;
|
||||||
|
import com.hzya.frame.u8.production.entity.MomOrderEntity;
|
||||||
|
import com.hzya.frame.u8.production.service.IMomOrderService;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description u8生产订单表头
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/8/23 08:56
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class MomOrderServiceImpl extends BaseService<MomOrderEntity,String> implements IMomOrderService {
|
||||||
|
Logger logger = LogManager.getLogger(getClass());
|
||||||
|
private IMomOrderDao momOrderDao;
|
||||||
|
@Autowired
|
||||||
|
public void setMomOrderDao(IMomOrderDao dao) {
|
||||||
|
this.momOrderDao = dao;
|
||||||
|
this.dao = dao;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue