소스 검색

Merge branch 'dev' of https://git.steerinfo.com/DAL-DAZHOU2/DAL-DAZHOU-JOIN-API into dev

HUJIANGUO 3 년 전
부모
커밋
b3aa455525

+ 0 - 3
pom.xml

@@ -160,8 +160,6 @@
             <artifactId>slf4j-nop</artifactId>
             <artifactId>slf4j-nop</artifactId>
             <version>1.7.21</version>
             <version>1.7.21</version>
         </dependency>
         </dependency>
-
-
     </dependencies>
     </dependencies>
     <build>
     <build>
         <plugins>
         <plugins>
@@ -208,7 +206,6 @@
                     <include>**/*.xml</include>
                     <include>**/*.xml</include>
                 </includes>
                 </includes>
             </resource>
             </resource>
-
             <resource>
             <resource>
                 <directory>src/main/resources</directory>
                 <directory>src/main/resources</directory>
             </resource>
             </resource>

+ 6 - 2
src/main/java/com/steerinfo/dil/controller/TmsTruckEnFactoryResultController.java

@@ -4,6 +4,8 @@ import com.steerinfo.dil.service.impl.TmsTruckEnFactoryResultService;
 import com.steerinfo.dil.util.BaseRESTfulController;
 import com.steerinfo.dil.util.BaseRESTfulController;
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.controller.RESTfulResult;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
 
 
@@ -14,13 +16,15 @@ import java.util.Map;
  * @create 2021-10-29 17:52
  * @create 2021-10-29 17:52
  */
  */
 @RestController
 @RestController
-@RequestMapping("/${api.version}/tmsTruckEnFactoryResultResult")
+@RequestMapping("/${api.version}/tmsTruck")
 public class TmsTruckEnFactoryResultController extends BaseRESTfulController {
 public class TmsTruckEnFactoryResultController extends BaseRESTfulController {
 
 
     @Autowired
     @Autowired
     TmsTruckEnFactoryResultService tmsTruckEnFactoryResultService;
     TmsTruckEnFactoryResultService tmsTruckEnFactoryResultService;
 
 
-    public RESTfulResult addEnFactory(Map<String,Object> map){
+
+    @PostMapping("/enfactory")
+    public RESTfulResult addEnFactory(@RequestBody(required = false) Map<String,Object> map){
         Integer integer=tmsTruckEnFactoryResultService.updateEnFactory(map);
         Integer integer=tmsTruckEnFactoryResultService.updateEnFactory(map);
         if (integer!=1){
         if (integer!=1){
             return failed();
             return failed();

+ 5 - 2
src/main/java/com/steerinfo/dil/controller/TmsTruckLeaveFactoryController.java

@@ -5,6 +5,8 @@ import com.steerinfo.dil.service.impl.TmsTruckLeaveFactoryService;
 import com.steerinfo.dil.util.BaseRESTfulController;
 import com.steerinfo.dil.util.BaseRESTfulController;
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.controller.RESTfulResult;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
 
 
@@ -15,13 +17,14 @@ import java.util.Map;
  * @create 2021-10-29 17:52
  * @create 2021-10-29 17:52
  */
  */
 @RestController
 @RestController
-@RequestMapping("/${api.version}/tmsTruckLeaveFactoryResult")
+@RequestMapping("/${api.version}/tmsTruck")
 public class TmsTruckLeaveFactoryController extends BaseRESTfulController {
 public class TmsTruckLeaveFactoryController extends BaseRESTfulController {
 
 
     @Autowired
     @Autowired
     TmsTruckLeaveFactoryService tmsTruckLeaveFactoryService;
     TmsTruckLeaveFactoryService tmsTruckLeaveFactoryService;
 
 
-    public RESTfulResult addLeaveFactory(Map<String,Object> map){
+    @PostMapping("/leaveFactory")
+    public RESTfulResult addLeaveFactory(@RequestBody(required = true) Map<String,Object> map){
         Integer integer=tmsTruckLeaveFactoryService.updateLeaveFactory(map);
         Integer integer=tmsTruckLeaveFactoryService.updateLeaveFactory(map);
         if (integer!=1){
         if (integer!=1){
             return failed();
             return failed();

+ 7 - 7
src/main/resources/com/steerinfo/dil/mapper/TmstruckEnfactoryResultMapper.xml

@@ -419,17 +419,17 @@
   </delete>
   </delete>
   <!-- 友情提示!!!-->
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
-  <update id="updateEnFactory">
-    update (select *
+  <update id="updateEnFactory" parameterType="java.util.Map">
+ update (select *
             from TMSTRUCK_ENFACTORY_RESULT TER
             from TMSTRUCK_ENFACTORY_RESULT TER
                    LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
                    LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
                              ON TTR.RESULT_TOTAL_ID = TER.RESULT_TOTAL_ID
                              ON TTR.RESULT_TOTAL_ID = TER.RESULT_TOTAL_ID
                    LEFT JOIN OMSTRUCK_ORDER OO
                    LEFT JOIN OMSTRUCK_ORDER OO
                              ON Ttr.Order_Id = oo.order_id
                              ON Ttr.Order_Id = oo.order_id
-            where oo.order_id = #{orderId}) tt
-    set tt.gatepost_id = {select rg.gatepost_id from rms_gatepost rg
-    where rg.gatepost_name = {gatepostName}},
-    set tt.result_entry_mode=#{resultEntryMode},
-    set tt.result_entry_gate_time=#{resultTime}
+            where oo.order_number = #{orderNumber}) tt
+    set tt.gatepost_id = (select rg.gatepost_id from rms_gatepost rg
+    where rg.gatepost_name = #{gatepostName}),
+     tt.result_entry_mode=#{resultEntryMode},
+     tt.result_entry_gate_time=TO_DATE(#{resultTime}, 'yyyy-mm-dd hh24:mi:ss' )
   </update>
   </update>
 </mapper>
 </mapper>

+ 7 - 7
src/main/resources/com/steerinfo/dil/mapper/TmstruckLeaveFactoryResultMapper.xml

@@ -420,8 +420,8 @@
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
   <!-- 友情提示!!!-->
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
-  <update id="updateLeaveFactory">
-    update(
+  <update id="updateLeaveFactory" parameterType="java.util.Map">
+   update(
       select * from tmstruck_leave_factory_result tlfr
       select * from tmstruck_leave_factory_result tlfr
                       LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
                       LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
                                 on
                                 on
@@ -429,10 +429,10 @@
                       left join omstruck_order oo
                       left join omstruck_order oo
                                 on
                                 on
                                   oo.order_id=ttr.order_id
                                   oo.order_id=ttr.order_id
-      where oo.order_id=#{orderId}) tt
-    set tt.gatepost_id = {select rg.gatepost_id from rms_gatepost rg
-    where rg.gatepost_name = {gatepostName}},
-    set tt.result_out_mode=#{resultOutMode},
-    set tt.result_out_gate_time=#{resultTime}
+      where oo.order_number=#{orderNumber}) tt
+    set tt.gatepost_id = (select rg.gatepost_id from rms_gatepost rg
+    where rg.gatepost_name = #{gatepostName}),
+    tt.result_out_mode=#{resultOutMode},
+    tt.result_out_gate_time=TO_DATE(#{resultTime}, 'yyyy-mm-dd hh24:mi:ss' )
   </update>
   </update>
 </mapper>
 </mapper>