|
@@ -183,32 +183,36 @@ public interface JianYanJianChaDao {
|
|
|
List<Map<String, String>> selectTemplateContent(@Param(Constants.WRAPPER) QueryWrapper<?> queryWrapper);
|
|
|
|
|
|
|
|
|
- @Select("SELECT rtrim(a.order_code) as orderCode,\n" +
|
|
|
- " rtrim(a.order_name) as orderName,\n" +
|
|
|
- " rtrim(a.order_code) as code,\n" +
|
|
|
- " rtrim(a.order_name) as name,\n" +
|
|
|
- " rtrim(a.yb_comment) ybComment,\n" +
|
|
|
- " '0' as checkFlag,\n" +
|
|
|
- " a.exec_dept as execDept,\n" +
|
|
|
- " a.order_type as orderType,\n" +
|
|
|
+ @Select("SELECT rtrim(a.order_code) as orderCode,\n" +
|
|
|
+ " rtrim(a.order_name) as orderName,\n" +
|
|
|
+ " rtrim(a.order_code) as code,\n" +
|
|
|
+ " rtrim(a.order_name) as name,\n" +
|
|
|
+ " rtrim(a.yb_comment) ybComment,\n" +
|
|
|
+ " '0' as checkFlag,\n" +
|
|
|
+ " jyjc.exec_unit as execDept,\n" +
|
|
|
+ " a.order_type as orderType,\n" +
|
|
|
" (select rtrim(name)\n" +
|
|
|
" from zd_unit_code with (NOLOCK)\n" +
|
|
|
- " where code = a.exec_dept) execDeptName,\n" +
|
|
|
- " CONVERT(varchar(100), GETDATE(), 20) as startTime,\n" +
|
|
|
- " inspect_stuff as inspectStuff,\n" +
|
|
|
- " inspectStuffName = (select rtrim(name) from jy_zd_sample with (NOLOCK) where code = inspect_stuff)," +
|
|
|
- " inspect_part AS inspectPart, " +
|
|
|
- " (select rtrim(name)\n" +
|
|
|
- " from ysh_zd_part_code\n" +
|
|
|
- " where code = inspect_part) inspectPartName,\n" +
|
|
|
- " rtrim(c.tc_no) as tc_no,\n" +
|
|
|
- " '2' as isTheParentNode,\n" +
|
|
|
- " class as classes,\n" +
|
|
|
+ " where code = jyjc.exec_unit) execDeptName,\n" +
|
|
|
+ " CONVERT(varchar(100),\n" +
|
|
|
+ " GETDATE(),\n" +
|
|
|
+ " 20) as startTime,\n" +
|
|
|
+ " b.inspect_stuff as inspectStuff,\n" +
|
|
|
+ " inspectStuffName = (select rtrim(name)\n" +
|
|
|
+ " from jy_zd_sample with (NOLOCK)\n" +
|
|
|
+ " where code = b.inspect_stuff),\n" +
|
|
|
+ " b.inspect_part AS inspectPart,\n" +
|
|
|
+ " (select rtrim(name)\n" +
|
|
|
+ " from ysh_zd_part_code\n" +
|
|
|
+ " where code = b.inspect_part) inspectPartName,\n" +
|
|
|
+ " rtrim(c.tc_no) as tc_no,\n" +
|
|
|
+ " '2' as isTheParentNode,\n" +
|
|
|
+ " class as classes,\n" +
|
|
|
" note,\n" +
|
|
|
- " collection_info as collectionInfo,\n" +
|
|
|
- " gender_restriction AS genderRestriction,\n" +
|
|
|
- " min_age_restriction AS minAgeRestriction,\n" +
|
|
|
- " max_age_restriction AS maxAgeRestriction\n" +
|
|
|
+ " collection_info as collectionInfo,\n" +
|
|
|
+ " gender_restriction AS genderRestriction,\n" +
|
|
|
+ " min_age_restriction AS minAgeRestriction,\n" +
|
|
|
+ " max_age_restriction AS maxAgeRestriction\n" +
|
|
|
"FROM yz_order_item a with (NOLOCK),\n" +
|
|
|
" zy_tc_detail_yj b with (NOLOCK),\n" +
|
|
|
" zy_tc_yj c with (NOLOCK),\n" +
|
|
@@ -221,8 +225,9 @@ public interface JianYanJianChaDao {
|
|
|
" and isnull(jyjc.zy_flag, '0') != '1'\n" +
|
|
|
" and c.tc_no = #{code}\n" +
|
|
|
" and c.req_type = #{type}\n" +
|
|
|
- "order by item_no ")
|
|
|
- List<Map<String, String>> getTemplateByCodeAndType(@Param("code") String code, @Param("type") String type,
|
|
|
+ "order by item_no;")
|
|
|
+ List<Map<String, String>> getTemplateByCodeAndType(@Param("code") String code,
|
|
|
+ @Param("type") String type,
|
|
|
@Param("tableName") String tableName);
|
|
|
|
|
|
@Select("<script>" +
|
|
@@ -295,10 +300,7 @@ public interface JianYanJianChaDao {
|
|
|
"insert into zy_tc_detail_yj (tc_no, order_code, inspect_part, inspect_stuff, item_no) " +
|
|
|
"values " +
|
|
|
"<foreach collection='list' item='item' index='index' separator=','>" +
|
|
|
- "(#{tcNo}, #{item.orderCode}, " +
|
|
|
- "(select bw_code " +
|
|
|
- "from jc_zd_item " +
|
|
|
- "where zy_order_code = #{item.orderCode}) , #{item.inspectStuff}" +
|
|
|
+ "(#{tcNo}, #{item.orderCode}, #{item.inspectPart}, #{item.inspectStuff}" +
|
|
|
", ${index} + 1)" +
|
|
|
"</foreach>" +
|
|
|
"</script>")
|