gongdecai 4 years ago
parent
commit
ce75a3ef31

+ 1 - 1
pom.xml

@@ -36,7 +36,7 @@
 <!--        <module>winsea-haixin-plugin-finance</module>-->
         <module>winsea-haixin-plugin-operation</module>
 <!--        <module>winsea-haixin-plugin-repair</module>-->
-        <module>winsea-haixin-plugin-com.yh.saas.plugin.yiliangyiyun</module>
+        <module>winsea-haixin-plugin-yiliangyiyun</module>
     </modules>
 
     <repositories>

+ 1 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/GeneratorCodeByTables.java

@@ -54,7 +54,7 @@ public class GeneratorCodeByTables {
 
     public static void main(String[] args) throws IOException {
 //        generateByTables("Gongdc", "com.yh.saas.plugin.crew","crew_interview_info");
-        generateByTables("Gongdc", "com.yh.saas.plugin.com.yh.saas.plugin.yiliangyiyun","common_sys_parameter");
+        generateByTables("Gongdc", "com.yh.saas.plugin.yiliangyiyun","warehouse_position_storage_info");
     }
 
     /**

+ 5 - 9
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/ContractManagementInfoController.java

@@ -8,11 +8,7 @@ import com.yh.saas.plugin.yiliangyiyun.service.IContractManagementInfoService;
 //import org.springframework.web.bind.annotation.*;
 import com.baomidou.mybatisplus.plugins.Page;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-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.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
@@ -52,7 +48,7 @@ public class ContractManagementInfoController {
      * 查看合同信息
      */
     @GetMapping("/getInfo")
-    public ContractManagementInfo getInfo(String id) {
+    public ContractManagementInfo getInfo(@RequestParam String id) {
         return contractManagementInfoService.getInfo(id);
     }
 
@@ -70,12 +66,12 @@ public class ContractManagementInfoController {
     /**
      * 更改状态
      *
-     * @param id
+     * @param contractManagementInfo
      * @return
      */
     @PostMapping("/editStatus")
-    public String editStatus(String id) {
-        return contractManagementInfoService.editStatus(id);
+    public String editStatus(@RequestBody ContractManagementInfo contractManagementInfo) {
+        return contractManagementInfoService.editStatus(contractManagementInfo.getId());
     }
 
     /**

+ 1 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/ContractManagementInfoServiceImpl.java

@@ -146,6 +146,7 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
         pageView.put("startDate", contractManagementInfo.getStartDate());
         pageView.put("endDate", contractManagementInfo.getEndDate());
         pageView.put("searchType", contractManagementInfo.getSearchType());
+        pageView.put("contractType", contractManagementInfo.getContractType());
         // 查询服务商总数
         Integer dataCount = baseMapper.getCountByCondition(pageView);
         List<ContractManagementInfo> dataList = baseMapper.getListByCondition(pageView);

+ 17 - 20
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/ContractManagementInfoMapper.xml

@@ -15,20 +15,17 @@
                 AND m.status_flag != '3'
             </if>
             <if test="searchType == 2">
-                AND m.status_flag == '3'
-            </if>
-            <if test="searchType == 3">
-                AND p.mildew_grain != 0
+                AND m.status_flag = '3'
             </if>
 
         </if>
-        <if test="startDate != null and startDate != ''">
-            AND DATE_FORMAT(m.signing_date,"%Y%m%d") ge
-            DATE_FORMAT(#{startDate},"%Y%m%d")
+        <if test="startDate != null">
+            AND (DATE_FORMAT(m.signing_date,"%Y%m%d") &gt;=
+            DATE_FORMAT(#{startDate},"%Y%m%d"))
         </if>
-        <if test="endDate != null and endDate != ''">
-            AND DATE_FORMAT(m.signing_date,"%Y%m%d") le
-            DATE_FORMAT(#{endDate},"%Y%m%d")
+        <if test="endDate != null">
+            AND (DATE_FORMAT(m.signing_date,"%Y%m%d") &lt;=
+            DATE_FORMAT(#{endDate},"%Y%m%d"))
         </if>
         <if test="searchType != null and searchType != ''">
             AND (lower(m.contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
@@ -64,20 +61,20 @@
                 AND m.status_flag != '3'
             </if>
             <if test="searchType == 2">
-                AND m.status_flag == '3'
-            </if>
-            <if test="searchType == 3">
-                AND p.mildew_grain != 0
+                AND m.status_flag = '3'
             </if>
 
         </if>
-        <if test="startDate != null and startDate != ''">
-            AND DATE_FORMAT(m.signing_date,"%Y%m%d") ge
-            DATE_FORMAT(#{startDate},"%Y%m%d")
+        <if test="contractType != null and contractType != ''">
+            AND m.contract_type = #{contractType}
+        </if>
+        <if test="startDate != null">
+            AND (DATE_FORMAT(m.signing_date,"%Y%m%d") &gt;=
+            DATE_FORMAT(#{startDate},"%Y%m%d"))
         </if>
-        <if test="endDate != null and endDate != ''">
-            AND DATE_FORMAT(m.signing_date,"%Y%m%d") le
-            DATE_FORMAT(#{endDate},"%Y%m%d")
+        <if test="endDate != null">
+            AND (DATE_FORMAT(m.signing_date,"%Y%m%d") &lt;=
+            DATE_FORMAT(#{endDate},"%Y%m%d"))
         </if>
         <if test="searchType != null and searchType != ''">
             AND (lower(m.contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))