yangbq 1 viikko sitten
vanhempi
commit
c4d89521e0

+ 9 - 6
project-zcustom/src/main/java/com/project/zcustom/controller/engineering/PlatProjectCheckController.java

@@ -25,6 +25,7 @@ import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.Date;
+import java.util.Objects;
 
 @RestController
 @RequestMapping("/large/check")
@@ -98,13 +99,15 @@ public class PlatProjectCheckController extends BaseController {
      * 更改问题状态
      * */
     @PostMapping("/changeIssueStatus")
-    public AjaxResult changeIssueStatus(@RequestPart("issue") LargeIssue entity, @RequestPart(value = "file") MultipartFile file) {
+    public AjaxResult changeIssueStatus(@RequestPart("issue") LargeIssue entity, @RequestPart(value = "file",required = false) MultipartFile file) {
         try {
-            // 上传文件路径
-            String filePath = ProjectConfig.getUploadPath();
-            // 上传并返回新文件名称
-            String fileName = FileUploadUtils.upload(filePath, file);
-            entity.setImagePath("/uploadPath" + fileName.substring(8));
+            if (Objects.nonNull(file)) {
+                // 上传文件路径
+                String filePath = ProjectConfig.getUploadPath();
+                // 上传并返回新文件名称
+                String fileName = FileUploadUtils.upload(filePath, file);
+                entity.setImagePath("/uploadPath" + fileName.substring(8));
+            }
         }catch (Exception e){
         }
         return toAjax(largeIssueService.updateById(entity));

+ 1 - 1
project-zcustom/src/main/java/com/project/zcustom/service/service/smart/impl/PlatGreenSmartSafetyServiceImpl.java

@@ -175,7 +175,7 @@ public class PlatGreenSmartSafetyServiceImpl extends ServiceImpl<PlatGreenSmartS
     @Override
     @Transactional
     public void addPlatGreenSmartSafety(String appOrg, Map<String, Object> mapField){
-        List<String> keyList = Arrays.asList("name","sample","positive","negative","Ingredients","LeaveSample");
+        List<String> keyList = Arrays.asList("name","sample","positive","negative","ingredients","leaveSample");
         // 先删除所有数据
         LambdaQueryWrapper<PlatGreenSmartSafety> lqw = new LambdaQueryWrapper<>();
         lqw.eq(PlatGreenSmartSafety::getAppOrg, appOrg);

+ 1 - 2
project-zcustom/src/main/resources/mapper/zcustom/basics/PlatAppOrgMapper.xml

@@ -42,8 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         WHERE
             c.del_flag = 0
         <if test="appOrg != '0000'">AND ( c.app_parent_org = #{appOrg} OR c.app_org = #{appOrg} )</if>
-        GROUP BY
-            c.id
+        GROUP BY c.id order by cameraNum desc
     </select>
 
     <select id="getConnectUnitNum" resultType="int">