فهرست منبع

适配乌拉特前旗一张图系统(上报到市接收参数改为表单提交)

wanger 1 ماه پیش
والد
کامیت
06757b565f

+ 14 - 3
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/controller/cggl/CgglController.java

@@ -67,12 +67,23 @@ public class CgglController extends BaseController {
     /**
     /**
      * 修改成果上传信息
      * 修改成果上传信息
      *
      *
-     * @param escalationDTO
+     * @param id
+     * @param uploadstatus
+     * @param phone
+     * @param wdbh
+     * @param uploadremark
+     * @param file
      * @return
      * @return
      */
      */
     @PostMapping("/updateCgInfo")
     @PostMapping("/updateCgInfo")
-    public RequestResult updateCgInfo(@RequestBody EscalationDTO escalationDTO) {
-        RequestResult res = cgglService.updateCgInfo(escalationDTO);
+    public RequestResult updateCgInfo(String id, String uploadstatus, String phone, String wdbh, String uploadremark, MultipartFile file) {
+        EscalationDTO escalationDTO = new EscalationDTO();
+        escalationDTO.setId(id);
+        escalationDTO.setUploadstatus(uploadstatus);
+        escalationDTO.setPhone(phone);
+        escalationDTO.setWdbh(wdbh);
+        escalationDTO.setUploadremark(uploadremark);
+        RequestResult res = cgglService.updateCgInfo(escalationDTO, file);
         return res;
         return res;
     }
     }
 
 

+ 4 - 5
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/controller/sbjk/XzczghcgsbController.java

@@ -97,19 +97,18 @@ public class XzczghcgsbController extends BaseController {
      * @return
      * @return
      */
      */
     @PostMapping("/reportSubmit")
     @PostMapping("/reportSubmit")
-    public RequestResult reportSubmit(@RequestBody XzczghcgsbDTO xzczghcgsbDTO) {
-        String uuid = xzczghcgsbDTO.getUuid();
+    public RequestResult reportSubmit(String uuid, String cglevel, String phone, String wdbh, String uploadremark, MultipartFile file) {
+        //String uuid = xzczghcgsbDTO.getUuid();
         if (StringUtils.isEmpty(uuid)) {
         if (StringUtils.isEmpty(uuid)) {
             return RequestResult.error("uuid不能为空");
             return RequestResult.error("uuid不能为空");
         }
         }
-        if (StringUtils.isEmpty(xzczghcgsbDTO.getCglevel())) {
+        if (StringUtils.isEmpty(cglevel)) {
             return RequestResult.error("上报级别不能为空");
             return RequestResult.error("上报级别不能为空");
         }
         }
         String[] uuids = uuid.split(",");
         String[] uuids = uuid.split(",");
-        String cglevel = xzczghcgsbDTO.getCglevel();
         String error = "";
         String error = "";
         for (int i = 0; i < uuids.length; i++) {
         for (int i = 0; i < uuids.length; i++) {
-            AjaxResult ajaxResult = xzczghcgsbService.reportSubmit(uuids[i], cglevel, xzczghcgsbDTO);
+            AjaxResult ajaxResult = xzczghcgsbService.reportSubmit(uuids[i], cglevel, phone, wdbh, uploadremark, file);
             if (!"200".equals(ajaxResult.get("code") + "")) {
             if (!"200".equals(ajaxResult.get("code") + "")) {
                 error = error + ajaxResult.get("msg");
                 error = error + ajaxResult.get("msg");
             }
             }

+ 1 - 1
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/cggl/CgglService.java

@@ -16,7 +16,7 @@ public interface CgglService {
 
 
     List<EscalationInfoDTO> cgInfoList(String year, String xzqdm, String uploadstatus, String username, String cglevel, String plantype, String name);
     List<EscalationInfoDTO> cgInfoList(String year, String xzqdm, String uploadstatus, String username, String cglevel, String plantype, String name);
 
 
-    RequestResult updateCgInfo(EscalationDTO escalationDTO);
+    RequestResult updateCgInfo(EscalationDTO escalationDTO, MultipartFile file);
 
 
     RequestResult cgDelete(String id);
     RequestResult cgDelete(String id);
 
 

+ 8 - 8
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/cggl/CgglServiceImpl.java

@@ -439,7 +439,7 @@ public class CgglServiceImpl implements CgglService {
     }
     }
 
 
     @Override
     @Override
-    public RequestResult updateCgInfo(EscalationDTO escalationDTO) {
+    public RequestResult updateCgInfo(EscalationDTO escalationDTO, MultipartFile zjbgfile) {
         QueryWrapper<EscalationDTO> wrapper = new QueryWrapper<EscalationDTO>();
         QueryWrapper<EscalationDTO> wrapper = new QueryWrapper<EscalationDTO>();
         wrapper.eq("id", escalationDTO.getId());
         wrapper.eq("id", escalationDTO.getId());
         //TODO wanger 条件判断是否需要将成果包推送到厅系统(原始逻辑)
         //TODO wanger 条件判断是否需要将成果包推送到厅系统(原始逻辑)
@@ -713,13 +713,13 @@ public class CgglServiceImpl implements CgglService {
                                                 paramFile.put("xzqmc", validateEscalationDTO.getXzqmc());
                                                 paramFile.put("xzqmc", validateEscalationDTO.getXzqmc());
                                                 paramFile.put("xzqdm", validateEscalationDTO.getXzqdm());
                                                 paramFile.put("xzqdm", validateEscalationDTO.getXzqdm());
                                                 paramFile.put("type", StringUtils.getGhlxByne(validateEscalationDTO.getPlantype()));
                                                 paramFile.put("type", StringUtils.getGhlxByne(validateEscalationDTO.getPlantype()));
-                                                File zjfile = null;
-                                                if (escalationDTO.getFile() != null) {
-                                                    String filepath = temp + "check.pdf";
-                                                    byteArrayToFile(escalationDTO.getFile(), filepath);
-                                                    zjfile = new File(filepath);
-                                                }
-                                                paramFile.put("zjbgFile", zjfile);
+//                                                File zjfile = null;
+//                                                if (escalationDTO.getFile() != null) {
+//                                                    String filepath = temp + "check.pdf";
+//                                                    byteArrayToFile(escalationDTO.getFile(), filepath);
+//                                                    zjfile = new File(filepath);
+//                                                }
+                                                paramFile.put("zjbgFile", zjbgfile);
                                                 paramFile.put("phone", escalationDTO.getPhone());
                                                 paramFile.put("phone", escalationDTO.getPhone());
                                                 paramFile.put("remark", escalationDTO.getUploadremark());
                                                 paramFile.put("remark", escalationDTO.getUploadremark());
                                                 paramFile.put("wdbh", escalationDTO.getWdbh());
                                                 paramFile.put("wdbh", escalationDTO.getWdbh());

+ 11 - 11
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/sbjk/XzczghcgsbServiceImpl.java

@@ -432,7 +432,7 @@ public class XzczghcgsbServiceImpl implements XzczghcgsbService {
      * 上报提交
      * 上报提交
      */
      */
     @Override
     @Override
-    public AjaxResult reportSubmit(String uuid, String cglevel, XzczghcgsbDTO xzczghcgsbDto) {
+    public AjaxResult reportSubmit(String uuid, String cglevel, String phone, String wdbh, String uploadremark, MultipartFile zjbgfile) {
         XzczghcgsbDTO xzczghcgsbDTO = selectByUuid(uuid);
         XzczghcgsbDTO xzczghcgsbDTO = selectByUuid(uuid);
         if (xzczghcgsbDTO == null) {
         if (xzczghcgsbDTO == null) {
             return AjaxResult.error("没有找到该数据!");
             return AjaxResult.error("没有找到该数据!");
@@ -694,16 +694,16 @@ public class XzczghcgsbServiceImpl implements XzczghcgsbService {
                                                 paramFile.put("xzqmc", xzczghcgsbDTO.getXzqName());
                                                 paramFile.put("xzqmc", xzczghcgsbDTO.getXzqName());
                                                 paramFile.put("xzqdm", xzczghcgsbDTO.getXzqCode());
                                                 paramFile.put("xzqdm", xzczghcgsbDTO.getXzqCode());
                                                 paramFile.put("type", 3);//TODO wanger 村庄规划直接赋值3
                                                 paramFile.put("type", 3);//TODO wanger 村庄规划直接赋值3
-                                                File zjfile = null;
-                                                if (xzczghcgsbDTO.getFile() != null) {
-                                                    String filepath = temp + "check.pdf";
-                                                    byteArrayToFile(xzczghcgsbDTO.getFile(), filepath);
-                                                    zjfile = new File(filepath);
-                                                }
-                                                paramFile.put("zjbgFile", zjfile);
-                                                paramFile.put("phone", xzczghcgsbDto.getPhone());
-                                                paramFile.put("remark", xzczghcgsbDto.getUploadremark());
-                                                paramFile.put("wdbh", xzczghcgsbDto.getWdbh());
+//                                                File zjfile = null;
+//                                                if (xzczghcgsbDto.getFile() != null) {
+//                                                    String filepath = temp + "check.pdf";
+//                                                    byteArrayToFile(xzczghcgsbDto.getFile(), filepath);
+//                                                    zjfile = new File(filepath);
+//                                                }
+                                                paramFile.put("zjbgFile", zjbgfile);
+                                                paramFile.put("phone", phone);
+                                                paramFile.put("remark", uploadremark);
+                                                paramFile.put("wdbh", wdbh);
                                                 reStrFileUpload = RInterfaceUtil.postRemote(token, byneUploadFileUrl, null, paramFile);
                                                 reStrFileUpload = RInterfaceUtil.postRemote(token, byneUploadFileUrl, null, paramFile);
                                                 if (reStrFileUpload.containsKey("code") && !"200".equals(reStrFileUpload.getString("code"))) {
                                                 if (reStrFileUpload.containsKey("code") && !"200".equals(reStrFileUpload.getString("code"))) {
                                                     System.out.println("成果上报接口失败: !==" + reStrFileUpload.toJSONString());
                                                     System.out.println("成果上报接口失败: !==" + reStrFileUpload.toJSONString());

+ 1 - 1
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/sbjk/XzczghcgsbService.java

@@ -57,7 +57,7 @@ public interface XzczghcgsbService {
     /**
     /**
      * 上报提交
      * 上报提交
      */
      */
-    AjaxResult reportSubmit(String uuid,String cglevel, XzczghcgsbDTO xzczghcgsbDTO);
+    AjaxResult reportSubmit(String uuid, String cglevel, String phone, String wdbh, String uploadremark, MultipartFile file);
 
 
     List<String> getInstIds(String param);
     List<String> getInstIds(String param);