Merge remote-tracking branch 'origin/dev' into dev
						commit
						1946e4dfef
					
				| @ -1,9 +1,21 @@ | ||||
| package com.glxp.api.dao.basic; | ||||
| 
 | ||||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||||
| import com.glxp.api.entity.basic.BasicDestinyRel; | ||||
| import com.glxp.api.dao.BaseMapperPlus; | ||||
| import com.glxp.api.entity.basic.BasicCorpEntity; | ||||
| import com.glxp.api.entity.basic.BasicDestinyRelEntity; | ||||
| import com.glxp.api.req.basic.FilterUdiRelRequest; | ||||
| import com.glxp.api.res.basic.UdiRelevanceResponse; | ||||
| import org.apache.ibatis.annotations.Mapper; | ||||
| 
 | ||||
| import java.util.List; | ||||
| 
 | ||||
| @Mapper | ||||
| public interface BasicDestinyRelMapper extends BaseMapper<BasicDestinyRel> { | ||||
| public interface BasicDestinyRelMapper extends BaseMapperPlus<BasicDestinyRelMapper, BasicDestinyRelEntity, BasicDestinyRelEntity> { | ||||
| 
 | ||||
|     List<UdiRelevanceResponse> filterUdiJoinSup(FilterUdiRelRequest filterUdiRelRequest); | ||||
| 
 | ||||
|     List<UdiRelevanceResponse> filterDestinyProducts(FilterUdiRelRequest filterUdiRelRequest); | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,9 @@ | ||||
| package com.glxp.api.dao.inout; | ||||
| 
 | ||||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||||
| import com.glxp.api.entity.inout.IoDestinyProcessCodeEntity; | ||||
| import org.apache.ibatis.annotations.Mapper; | ||||
| 
 | ||||
| @Mapper | ||||
| public interface IoDestinyProcessCodeMapper extends BaseMapper<IoDestinyProcessCodeEntity> { | ||||
| } | ||||
| @ -0,0 +1,9 @@ | ||||
| package com.glxp.api.dao.inout; | ||||
| 
 | ||||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||||
| import com.glxp.api.entity.inout.IoDestinyProcessDetailEntity; | ||||
| import org.apache.ibatis.annotations.Mapper; | ||||
| 
 | ||||
| @Mapper | ||||
| public interface IoDestinyProcessDetailMapper extends BaseMapper<IoDestinyProcessDetailEntity> { | ||||
| } | ||||
| @ -0,0 +1,9 @@ | ||||
| package com.glxp.api.dao.inout; | ||||
| 
 | ||||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||||
| import com.glxp.api.entity.inout.IoDestinyProcessEntity; | ||||
| import org.apache.ibatis.annotations.Mapper; | ||||
| 
 | ||||
| @Mapper | ||||
| public interface IoDestinyProcessMapper extends BaseMapper<IoDestinyProcessEntity> { | ||||
| } | ||||
| @ -0,0 +1,82 @@ | ||||
| package com.glxp.api.entity.inout; | ||||
| 
 | ||||
| import com.baomidou.mybatisplus.annotation.IdType; | ||||
| import com.baomidou.mybatisplus.annotation.TableField; | ||||
| import com.baomidou.mybatisplus.annotation.TableId; | ||||
| import com.baomidou.mybatisplus.annotation.TableName; | ||||
| import java.math.BigDecimal; | ||||
| import java.util.Date; | ||||
| import lombok.Data; | ||||
| 
 | ||||
| /** | ||||
|     * 定速包加工明细表 | ||||
|     */ | ||||
| @Data | ||||
| @TableName(value = "io_destiny_process_code") | ||||
| public class IoDestinyProcessCodeEntity { | ||||
|     @TableId(value = "id", type = IdType.INPUT) | ||||
|     private Long id; | ||||
| 
 | ||||
|     /** | ||||
|      * 订单号外键 | ||||
|      */ | ||||
|     @TableField(value = "orderIdFk") | ||||
|     private String orderIdFk; | ||||
| 
 | ||||
|     /** | ||||
|      * 耗材字典ID外键 | ||||
|      */ | ||||
|     @TableField(value = "bindRlFk") | ||||
|     private String bindRlFk; | ||||
| 
 | ||||
|     /** | ||||
|      * DI信息UUID外键 | ||||
|      */ | ||||
|     @TableField(value = "uuidFk") | ||||
|     private String uuidFk; | ||||
| 
 | ||||
|     /** | ||||
|      * DI | ||||
|      */ | ||||
|     @TableField(value = "nameCode") | ||||
|     private String nameCode; | ||||
| 
 | ||||
|     /** | ||||
|      * 批次号 | ||||
|      */ | ||||
|     @TableField(value = "batchNo") | ||||
|     private String batchNo; | ||||
| 
 | ||||
|     /** | ||||
|      * 生产日期 | ||||
|      */ | ||||
|     @TableField(value = "productDate") | ||||
|     private String productDate; | ||||
| 
 | ||||
|     /** | ||||
|      * 失效日期 | ||||
|      */ | ||||
|     @TableField(value = "expireDate") | ||||
|     private String expireDate; | ||||
| 
 | ||||
|     /** | ||||
|      * 价格 | ||||
|      */ | ||||
|     @TableField(value = "price") | ||||
|     private BigDecimal price; | ||||
| 
 | ||||
|     /** | ||||
|      * 供应商ID外键 | ||||
|      */ | ||||
|     @TableField(value = "supId") | ||||
|     private String supId; | ||||
| 
 | ||||
|     /** | ||||
|      * 单据数量 | ||||
|      */ | ||||
|     @TableField(value = "`count`") | ||||
|     private Integer count; | ||||
| 
 | ||||
|     @TableField(value = "updateTime") | ||||
|     private Date updateTime; | ||||
| } | ||||
| @ -0,0 +1,35 @@ | ||||
| package com.glxp.api.entity.inout; | ||||
| 
 | ||||
| import com.baomidou.mybatisplus.annotation.IdType; | ||||
| import com.baomidou.mybatisplus.annotation.TableField; | ||||
| import com.baomidou.mybatisplus.annotation.TableId; | ||||
| import com.baomidou.mybatisplus.annotation.TableName; | ||||
| import lombok.Data; | ||||
| 
 | ||||
| /** | ||||
|     * 定数包产品关联表 | ||||
|     */ | ||||
| @Data | ||||
| @TableName(value = "io_destiny_process_detail") | ||||
| public class IoDestinyProcessDetailEntity { | ||||
|     @TableId(value = "id", type = IdType.INPUT) | ||||
|     private Long id; | ||||
| 
 | ||||
|     /** | ||||
|      * 耗材产品id | ||||
|      */ | ||||
|     @TableField(value = "relId") | ||||
|     private Long relId; | ||||
| 
 | ||||
|     /** | ||||
|      * 数量 | ||||
|      */ | ||||
|     @TableField(value = "`count`") | ||||
|     private Integer count; | ||||
| 
 | ||||
|     /** | ||||
|      * 实际数量 | ||||
|      */ | ||||
|     @TableField(value = "reCount") | ||||
|     private Integer reCount; | ||||
| } | ||||
| @ -0,0 +1,21 @@ | ||||
| package com.glxp.api.req.basic; | ||||
| 
 | ||||
| import com.alibaba.fastjson.annotation.JSONField; | ||||
| import lombok.Data; | ||||
| 
 | ||||
| import java.util.List; | ||||
| 
 | ||||
| @Data | ||||
| public class BasicDestinyRelRequest { | ||||
|     private List<Long> list; | ||||
|     private Long pId; | ||||
|     private Long id; | ||||
|     private int count; | ||||
|     public List<Long> getList() { | ||||
|         return list; | ||||
|     } | ||||
| 
 | ||||
|     public Long getpId() { | ||||
|         return pId; | ||||
|     } | ||||
| } | ||||
| @ -1,7 +1,24 @@ | ||||
| package com.glxp.api.service.basic; | ||||
| 
 | ||||
| import com.glxp.api.req.basic.BasicDestinyRelRequest; | ||||
| import com.glxp.api.req.basic.FilterUdiRelRequest; | ||||
| import com.glxp.api.res.basic.UdiRelevanceResponse; | ||||
| import org.springframework.stereotype.Service; | ||||
| 
 | ||||
| import java.util.List; | ||||
| 
 | ||||
| public interface BasicDestinyRelService{ | ||||
| 
 | ||||
|     Boolean addModeldestinyProduct(BasicDestinyRelRequest basicDestinyRelRequest); | ||||
| 
 | ||||
|     List<UdiRelevanceResponse> filterUdiJoinSup(FilterUdiRelRequest filterUdiRelRequest); | ||||
| 
 | ||||
|     List<Long> filterDestinyRelIds(Long pId); | ||||
| 
 | ||||
|     List<UdiRelevanceResponse> filterDestinyProducts(FilterUdiRelRequest filterUdiRelRequest); | ||||
| 
 | ||||
|     Boolean delectModeldestinyProduct(BasicDestinyRelRequest basicDestinyRelRequest); | ||||
| 
 | ||||
|     Boolean uploadModeldestinyProduct(BasicDestinyRelRequest basicDestinyRelRequest); | ||||
| 
 | ||||
| } | ||||
|  | ||||
| @ -0,0 +1,97 @@ | ||||
| package com.glxp.api.service.basic.impl; | ||||
| 
 | ||||
| 
 | ||||
| import cn.hutool.core.util.IdUtil; | ||||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||||
| import com.github.pagehelper.PageHelper; | ||||
| import com.glxp.api.dao.basic.BasicDestinyRelMapper; | ||||
| import com.glxp.api.dao.basic.UdiRelevanceDao; | ||||
| import com.glxp.api.entity.basic.BasicDestinyRelEntity; | ||||
| import com.glxp.api.req.basic.BasicDestinyRelRequest; | ||||
| import com.glxp.api.req.basic.FilterUdiRelRequest; | ||||
| import com.glxp.api.res.basic.UdiRelevanceResponse; | ||||
| import com.glxp.api.service.basic.BasicDestinyRelService; | ||||
| import org.springframework.stereotype.Service; | ||||
| 
 | ||||
| import javax.annotation.Resource; | ||||
| import java.util.ArrayList; | ||||
| import java.util.Collections; | ||||
| import java.util.List; | ||||
| 
 | ||||
| 
 | ||||
| @Service | ||||
| public class BasicDestinyRelServiceImpl implements BasicDestinyRelService { | ||||
| 
 | ||||
|     @Resource | ||||
|     BasicDestinyRelMapper basicDestinyRelMapper; | ||||
| 
 | ||||
|     @Resource | ||||
|     UdiRelevanceDao udiRelevanceDao; | ||||
| 
 | ||||
|     @Override | ||||
|     public Boolean addModeldestinyProduct(BasicDestinyRelRequest basicDestinyRelRequest) { | ||||
| 
 | ||||
|         List<BasicDestinyRelEntity> basicDestinyRelEntitList = new ArrayList<>(); | ||||
|         for (Long str : basicDestinyRelRequest.getList()) { | ||||
|             BasicDestinyRelEntity basicDestinyRelEntity = new BasicDestinyRelEntity(); | ||||
|             basicDestinyRelEntity.setId(IdUtil.getSnowflakeNextId()); | ||||
|             basicDestinyRelEntity.setRelId(str); | ||||
|             basicDestinyRelEntity.setPId(basicDestinyRelRequest.getpId()); | ||||
|             basicDestinyRelEntitList.add(basicDestinyRelEntity); | ||||
|         } | ||||
|         Boolean flag = basicDestinyRelMapper.insertBatch(basicDestinyRelEntitList); | ||||
|         return flag; | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public List<UdiRelevanceResponse> filterUdiJoinSup(FilterUdiRelRequest filterUdiRelRequest) { | ||||
|         if (filterUdiRelRequest == null) { | ||||
|             return Collections.emptyList(); | ||||
|         } | ||||
|         if (filterUdiRelRequest.getPage() != null) { | ||||
|             int offset = (filterUdiRelRequest.getPage() - 1) * filterUdiRelRequest.getLimit(); | ||||
|             PageHelper.offsetPage(offset, filterUdiRelRequest.getLimit()); | ||||
|         } | ||||
|         List<UdiRelevanceResponse> data = basicDestinyRelMapper.filterUdiJoinSup(filterUdiRelRequest); | ||||
|         return data; | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public List<Long> filterDestinyRelIds(Long pId) { | ||||
| 
 | ||||
|         List<Long> stringList = new ArrayList<>(); | ||||
|         QueryWrapper<BasicDestinyRelEntity> ew = new QueryWrapper<>(); | ||||
|         ew.eq("pId", pId); | ||||
|         List<BasicDestinyRelEntity> basicDestinyRelEntities = basicDestinyRelMapper.selectList(ew); | ||||
|         for (BasicDestinyRelEntity basicDestinyRelEntity : basicDestinyRelEntities) { | ||||
|             stringList.add(basicDestinyRelEntity.getRelId()); | ||||
|         } | ||||
|         return stringList; | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public List<UdiRelevanceResponse> filterDestinyProducts(FilterUdiRelRequest filterUdiRelRequest) { | ||||
|         if (filterUdiRelRequest == null) { | ||||
|             return Collections.emptyList(); | ||||
|         } | ||||
|         if (filterUdiRelRequest.getPage() != null) { | ||||
|             int offset = (filterUdiRelRequest.getPage() - 1) * filterUdiRelRequest.getLimit(); | ||||
|             PageHelper.offsetPage(offset, filterUdiRelRequest.getLimit()); | ||||
|         } | ||||
|         List<UdiRelevanceResponse> data = basicDestinyRelMapper.filterDestinyProducts(filterUdiRelRequest); | ||||
|         return data; | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public Boolean delectModeldestinyProduct(BasicDestinyRelRequest basicDestinyRelRequest) { | ||||
|         return basicDestinyRelMapper.deleteById(basicDestinyRelRequest.getId()) > 0 ? true : false; | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public Boolean uploadModeldestinyProduct(BasicDestinyRelRequest basicDestinyRelRequest) { | ||||
|         BasicDestinyRelEntity basicDestinyRelEntity=new BasicDestinyRelEntity(); | ||||
|         basicDestinyRelEntity.setId(basicDestinyRelRequest.getId()); | ||||
|         basicDestinyRelEntity.setCount(basicDestinyRelRequest.getCount()); | ||||
|         return basicDestinyRelMapper.updateById(basicDestinyRelEntity)> 0 ? true : false; | ||||
|     } | ||||
| } | ||||
| @ -0,0 +1,8 @@ | ||||
| package com.glxp.api.service.inout; | ||||
| 
 | ||||
| import com.glxp.api.entity.inout.IoDestinyProcessCodeEntity; | ||||
| import com.baomidou.mybatisplus.extension.service.IService; | ||||
| public interface IoDestinyProcessCodeService{ | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,8 @@ | ||||
| package com.glxp.api.service.inout; | ||||
| 
 | ||||
| import com.glxp.api.entity.inout.IoDestinyProcessDetailEntity; | ||||
| import com.baomidou.mybatisplus.extension.service.IService; | ||||
| public interface IoDestinyProcessDetailService{ | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,6 @@ | ||||
| package com.glxp.api.service.inout; | ||||
| 
 | ||||
| 
 | ||||
| public interface IoDestinyProcessService{ | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,8 @@ | ||||
| package com.glxp.api.service.inout.impl; | ||||
| 
 | ||||
| import org.springframework.stereotype.Service; | ||||
| import com.glxp.api.service.inout.IoDestinyProcessCodeService; | ||||
| @Service | ||||
| public class IoDestinyProcessCodeServiceImpl  implements IoDestinyProcessCodeService { | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,11 @@ | ||||
| package com.glxp.api.service.inout.impl; | ||||
| 
 | ||||
| import org.springframework.stereotype.Service; | ||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||
| import com.glxp.api.dao.inout.IoDestinyProcessDetailMapper; | ||||
| import com.glxp.api.entity.inout.IoDestinyProcessDetailEntity; | ||||
| import com.glxp.api.service.inout.IoDestinyProcessDetailService; | ||||
| @Service | ||||
| public class IoDestinyProcessDetailServiceImpl implements IoDestinyProcessDetailService{ | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,10 @@ | ||||
| package com.glxp.api.service.inout.impl; | ||||
| 
 | ||||
| 
 | ||||
| import com.glxp.api.service.inout.IoDestinyProcessService; | ||||
| import org.springframework.stereotype.Service; | ||||
| 
 | ||||
| @Service | ||||
| public class IoDestinyProcessServiceImpl implements IoDestinyProcessService { | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,25 @@ | ||||
| <?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.glxp.api.dao.inout.IoDestinyProcessCodeMapper"> | ||||
|   <resultMap id="BaseResultMap" type="com.glxp.api.entity.inout.IoDestinyProcessCodeEntity"> | ||||
|     <!--@mbg.generated--> | ||||
|     <!--@Table udi_wms.io_destiny_process_code--> | ||||
|     <id column="id" jdbcType="BIGINT" property="id" /> | ||||
|     <result column="orderIdFk" jdbcType="VARCHAR" property="orderIdFk" /> | ||||
|     <result column="bindRlFk" jdbcType="VARCHAR" property="bindRlFk" /> | ||||
|     <result column="uuidFk" jdbcType="VARCHAR" property="uuidFk" /> | ||||
|     <result column="nameCode" jdbcType="VARCHAR" property="nameCode" /> | ||||
|     <result column="batchNo" jdbcType="VARCHAR" property="batchNo" /> | ||||
|     <result column="productDate" jdbcType="VARCHAR" property="productDate" /> | ||||
|     <result column="expireDate" jdbcType="VARCHAR" property="expireDate" /> | ||||
|     <result column="price" jdbcType="DECIMAL" property="price" /> | ||||
|     <result column="supId" jdbcType="VARCHAR" property="supId" /> | ||||
|     <result column="count" jdbcType="INTEGER" property="count" /> | ||||
|     <result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" /> | ||||
|   </resultMap> | ||||
|   <sql id="Base_Column_List"> | ||||
|     <!--@mbg.generated--> | ||||
|     id, orderIdFk, bindRlFk, uuidFk, nameCode, batchNo, productDate, expireDate, price,  | ||||
|     supId, `count`, updateTime | ||||
|   </sql> | ||||
| </mapper> | ||||
| @ -0,0 +1,16 @@ | ||||
| <?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.glxp.api.dao.inout.IoDestinyProcessDetailMapper"> | ||||
|   <resultMap id="BaseResultMap" type="com.glxp.api.entity.inout.IoDestinyProcessDetailEntity"> | ||||
|     <!--@mbg.generated--> | ||||
|     <!--@Table udi_wms.io_destiny_process_detail--> | ||||
|     <id column="id" jdbcType="BIGINT" property="id" /> | ||||
|     <result column="relId" jdbcType="BIGINT" property="relId" /> | ||||
|     <result column="count" jdbcType="INTEGER" property="count" /> | ||||
|     <result column="reCount" jdbcType="INTEGER" property="reCount" /> | ||||
|   </resultMap> | ||||
|   <sql id="Base_Column_List"> | ||||
|     <!--@mbg.generated--> | ||||
|     id, relId, `count`, reCount | ||||
|   </sql> | ||||
| </mapper> | ||||
| @ -0,0 +1,25 @@ | ||||
| <?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.glxp.api.dao.inout.IoDestinyProcessMapper"> | ||||
|   <resultMap id="BaseResultMap" type="com.glxp.api.entity.inout.IoDestinyProcessEntity"> | ||||
|     <!--@mbg.generated--> | ||||
|     <!--@Table udi_wms.io_destiny_process--> | ||||
|     <id column="id" jdbcType="BIGINT" property="id" /> | ||||
|     <result column="destinyId" jdbcType="BIGINT" property="destinyId" /> | ||||
|     <result column="destinyNo" jdbcType="BIGINT" property="destinyNo" /> | ||||
|     <result column="billNo" jdbcType="VARCHAR" property="billNo" /> | ||||
|     <result column="billDate" jdbcType="TIMESTAMP" property="billDate" /> | ||||
|     <result column="invCode" jdbcType="VARCHAR" property="invCode" /> | ||||
|     <result column="remark" jdbcType="VARCHAR" property="remark" /> | ||||
|     <result column="createTime" jdbcType="TIMESTAMP" property="createTime" /> | ||||
|     <result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" /> | ||||
|     <result column="createUser" jdbcType="VARCHAR" property="createUser" /> | ||||
|     <result column="updateUser" jdbcType="VARCHAR" property="updateUser" /> | ||||
|     <result column="status" jdbcType="INTEGER" property="status" /> | ||||
|   </resultMap> | ||||
|   <sql id="Base_Column_List"> | ||||
|     <!--@mbg.generated--> | ||||
|     id, destinyId, destinyNo, billNo, billDate, invCode, remark, createTime, updateTime,  | ||||
|     `createUser`, updateUser, `status` | ||||
|   </sql> | ||||
| </mapper> | ||||
					Loading…
					
					
				
		Reference in New Issue