parent
12ef47d4fc
commit
73bed70c3b
|
@ -1,5 +1,7 @@
|
|||
package com.hzya.frame.u8.delivery.dto;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -8,30 +10,43 @@ import java.util.List;
|
|||
* @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() {
|
||||
|
|
|
@ -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