生成对应内部码

dev
黄泽腾 2 years ago
parent d43833aad2
commit 388d68b3ae

@ -13,6 +13,7 @@ import java.util.List;
public interface UdiRelevanceDao extends BaseMapperPlus<UdiRelevanceDao, UdiRelevanceEntity, UdiRelevanceEntity> {
List<UdiRelevanceResponse> filterUdiRelevance(FilterUdiRelRequest filterUdiRelRequest);
String selectPackLevel(@Param("nameCode") String nameCode);
List<UdiRelevanceResponse> filterUdiJoinSup(FilterUdiRelRequest filterUdiRelRequest);

@ -13,5 +13,5 @@ public class InnerOrderDetailEntity {
private String productDate;
private String expireDate;
private String batchNo;
private String nameCode;
}

@ -17,7 +17,7 @@ public class FilterUdiRelRequest extends ListPageRequest {
private String ggxh;
private String thirdId;
private Long id;
private String packLevel;
private String thirdId1;
private String thirdId2;
private String thirdId3;

@ -6,7 +6,7 @@ import java.math.BigDecimal;
@Data
public class innerOrderDetailResponse {
private String nameCode;
private String id;
private String orderIdFk;
private String productId;

@ -110,8 +110,11 @@ public class InvInnerOrderPrintServiceImpl implements InvInnerOrderPrintService
innerOrderPrintEntity.setUpdateUser(customerService.getUserId() + "");
FilterUdiRelRequest filterUdiRelRequest = new FilterUdiRelRequest();
filterUdiRelRequest.setId(Long.valueOf(obj.getProductId()));
filterUdiRelRequest.setPackLevel(udiRelevanceDao.selectPackLevel(obj.getNameCode()));
System.out.println(filterUdiRelRequest.getPackLevel());
//查询耗材字典信息
UdiRelevanceResponse filterUdiRelevance = udiRelevanceDao.filterUdiRelevance(filterUdiRelRequest).get(0);
// UdiRelevanceResponse filterUdiRelevance = udiRelevanceDao.filterUdiRelevance(filterUdiRelRequest).get(0);
UdiRelevanceResponse filterUdiRelevance = udiRelevanceDao.filterUdiRelevance(filterUdiRelRequest).get(Integer.parseInt(filterUdiRelRequest.getPackLevel())-1);
//查询产品信息
UdiProductEntity udiProductEntity = udiProductService.findByNameCode(filterUdiRelevance.getNameCode());

@ -129,6 +129,20 @@
</where>
ORDER BY modifyTime DESC
</select>
<select id="selectPackLevel" parameterType="java.lang.String"
resultType="java.lang.String">
select
basic_products.packLevel
FROM basic_udirel
inner JOIN basic_products
ON basic_products.uuid = basic_udirel.uuid
<where>
<if test="nameCode != '' and nameCode != null">
AND basic_products.nameCode = #{nameCode}
</if>
</where>
</select>
<select id="filterUdiJoinSup" parameterType="com.glxp.api.req.basic.FilterUdiRelRequest"

@ -30,7 +30,7 @@
replace
INTO inv_inner_order_detail
(
orderIdFk,productId,productName,`count`,productDate,expireDate,batchNo
orderIdFk,productId,productName,`count`,productDate,expireDate,batchNo,nameCode
)
values (
#{orderIdFk},
@ -39,7 +39,8 @@
#{count},
#{productDate},
#{expireDate},
#{batchNo}
#{batchNo},
#{nameCode}
)
</insert>

@ -439,3 +439,5 @@ CALL Pro_Temp_ColumnWork('io_order', 'rmInvCode', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('io_order', 'outSickInfo', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('inv_inner_order_detail', 'nameCode',
'varchar(255) ', 1);
Loading…
Cancel
Save