Redeem 1 ano atrás
pai
commit
f2d42e73f0

+ 7 - 0
src/main/java/com/steerinfo/dil/controller/UniversalController.java

@@ -462,4 +462,11 @@ public class UniversalController extends BaseRESTfulController {
         return success(list);
     }
 
+    @ApiModelProperty(value = "查询钢坯内转合同号")
+    @PostMapping("/selectGpTzd")
+    public RESTfulResult selectGpTzd(@RequestBody(required = false) Map<String, Object> map) {
+        List<Map<String, Object>> list = universalMapper.selectGpTzd(map);
+        return success(list);
+    }
+
 }

+ 2 - 0
src/main/java/com/steerinfo/dil/mapper/UniversalMapper.java

@@ -130,4 +130,6 @@ public interface UniversalMapper {
 
     List<Map<String, Object>> getTransOrderInFoByNo(Map<String, Object> map);
 
+    List<Map<String, Object>> selectGpTzd(Map<String, Object> map);
+
 }

+ 13 - 12
src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

@@ -243,11 +243,8 @@
         t.MATERIAL_TYPE_NAME "label",
         t.MATERIAL_TYPE_NAME "text",
         t.REMARK "remark",
-        t1.company_id "businessCompanyId",
         'operationsName' "prop"
         from RMS_MATERIAL_TYPE t
-        left join rms_company_b_m_t t1
-        on t.material_type_id = t1.material_type_id
         where t.DELETED = 0
         )
         <where>
@@ -260,9 +257,6 @@
             <if test="lastIndex!=null">
                 and "operationsNameId" &lt; #{lastIndex}
             </if>
-            <if test="companyType != null and companyType == '业务单位' and isListed == null">
-                <include refid="com.steerinfo.dil.mapper.CommonMapper.filterCompanyData"></include>
-            </if>
         </where>
         order by "operationsNameId" desc
         FETCH NEXT 10 ROWS ONLY
@@ -932,23 +926,17 @@
         rc.START_POINT_ID "shippingPointId",
         rc.END_POINT_ID "receivingPointId",
         rc.LINE_ID "lineId",
-        t1.company_id "businessCompanyId",
         'operationRangeName' "prop"
         from RMS_TRANS_RANGE RC
         left join rms_operation_point rop_s
         on rop_s.operation_point_id = RC.start_point_id
         left join rms_operation_point rop_e
         on rop_e.operation_point_id = RC.end_point_id
-        left join rms_company_b_m_t t1
-        on RC.trans_range_id = t1.trans_range_id
         <where>
             and RC.DELETED = 0
         </where>
         )
         <where>
-            <if test="companyType != null and companyType == '业务单位' and isListed == null">
-                <include refid="com.steerinfo.dil.mapper.CommonMapper.filterCompanyData"></include>
-            </if>
             <if test="index!=null and index!=''">
                 <bind name="indexBind" value="'%' + index + '%'"/>
                 AND "label" like #{indexBind}
@@ -2302,5 +2290,18 @@
                FROM OMS_TRANS_ORDER OTO
         WHERE OTO.SERIAL_NUMBER = #{transOrderNumber}
     </select>
+    <select id="selectGpTzd" resultType="java.util.Map">
+    SELECT atr.SERIAL_NUMBER "label",
+           atr.SERIAL_NUMBER "text",
+           atr.TRANS_REQUIREMENT_ID "value",
+           arc.REQUIREMENT_CHILD_ID "requirementChildId",
+           atr.TRANS_REQUIREMENT_ID "transRequirementId",
+           arc.MATERIAL_NAME "materialName"
+           FROM AMS_TRANS_REQUIREMENT ATR
+    LEFT JOIN AMS_REQUIREMENT_CHILD ARC
+    ON ARC.TRANS_REQUIREMENT_ID = ATR.TRANS_REQUIREMENT_ID
+    WHERE ATR.ALTERNATE_FIELDS13 = '炼钢厂产品库→高线轧钢一车间'
+    AND REGEXP_LIKE(ARC.MATERIAL_NAME,'钢坯')
+    </select>
 
 </mapper>