Преглед на файлове

Merge remote-tracking branch 'origin/dev' into dev

wangjiang988 преди 5 години
родител
ревизия
936a0a8b71

+ 6 - 0
src/main/java/platform/modules/build/service/CompanyService.java

@@ -764,6 +764,12 @@ public class CompanyService extends BaseService<Company> {
      * @return
      */
     public List<CompanyContacts> findCompanyListByName(String letter, String companyName) {
+
+        boolean isLogin= ShiroUtils.isLogin();
+        List<CompanyContacts> list = new ArrayList<>();
+        if(!isLogin){
+            return list;
+        }
         return companyContactService.findCompanyContactList(letter, companyName, ShiroUtils.getStreetId(), ShiroUtils.getBuildId());
     }
 

+ 1 - 0
src/main/java/platform/modules/carrier/web/api/WeChatApiController.java

@@ -363,6 +363,7 @@ public class WeChatApiController extends BaseController {
     @GetMapping("/companyContactList")
     public Object companyContact(String letter, String companyName) {
 
+
         List<CompanyContacts> companyContacts = companyService.findCompanyListByName(letter, companyName);
 
         return ResponseMessage.success("success", companyContacts);

+ 42 - 4
src/main/java/platform/modules/government/service/IndustrialLandSupplyDetailService.java

@@ -754,10 +754,16 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
 
         IndustrialLandSupplyDetail entity = industrialLandSupplyDetailDao.selectById(id);
         //文件
-        List<Attachment> attachments = attachmentService.selectByIdAndBusinessId(Constant.Attachment.INDUSTRIAL_LAND_SUPPLY, entity.getId(), null);
+        List<Attachment> attachments = null;
+        //基本信息附件
+        attachments = attachmentService.selectByIdAndBusinessId(Constant.Attachment.INDUSTRIAL_LAND_SUPPLY, entity.getId(), null);
         if (null != attachments && attachments.size() > 0) {
-            FileDown fileDown = new FileDown(attachments.get(0).getId(), attachments.get(0).getFile_name(), attachments.get(0).getFile_url(), attachments.get(0).getDownload_uri());
-            entity.setFileDown(fileDown);
+            List<FileDown> fileList = new ArrayList<>();
+            for (Attachment attachment : attachments) {
+                FileDown fileDown = new FileDown(attachment.getId(), attachment.getFile_name(), attachment.getFile_url(), attachment.getDownload_uri());
+                fileList.add(fileDown);
+            }
+            entity.setFileList(fileList);
         }
         //补充附件
         attachments = attachmentService.selectByIdAndBusinessId(Constant.Attachment.INDUSTRIAL_LAND_SUPPLY_COMMERCE_SUPPLEMENT, entity.getId(), null);
@@ -2101,7 +2107,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
             approvalService.insertAndGetId(newApproval);
             return true;
         } else if (Objects.equals(Constant.LandSupplyApproveStatus.COMMERCE_RETURN, approval.getAfter_approvalstatus())) {
-            //商务局受理员退回--》待商务局受理员审核
+            //商务局受理员退回 --》待商务局受理员审核
             Group group = null;
             newApproval.setOper_type(Constant.OperType.SUBMIT);
             newApproval.setBefore_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_RETURN);
@@ -2139,6 +2145,10 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
             entity.setProcess_stage(Constant.LandSupplyApproveStage.PRE_AUDIT);
             industrialLandSupplyDetailDao.updateByPrimaryKeySelective(entity);
             approvalService.insertAndGetId(newApproval);
+
+            IndustrialLandSupplyConsultation query = new IndustrialLandSupplyConsultation();
+            query.setIndustrial_land_supply_id(applyId+"");
+            industrialLandSupplyConsultationService.deleteByWhere(query);
             return true;
         } else if (Objects.equals(Constant.LandSupplyApproveStatus.COMMERCE_LEADER_RETURN, approval.getAfter_approvalstatus())) {
             //商务局分管领导退回  --》待商务局商务局分管领导审核
@@ -2674,6 +2684,34 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
 //            messageService.saveMessageAndPush(messages, streetArrInt, Constant.UserType.COMPANY);
 //            waitToDoService.completeAllTODO(projectApplication.getId(), Constant.DictionaryType.PROJECT_INTELLIGENT);
 //            waitToDoService.newTODO("智能制造编辑", "/projectIntelligent/edit/" + projectApplication.getId(), Constant.WaitToDo_OperType.EDIT, projectApplication.getId(),
+//                    Constant.DictionaryType.PROJECT_INTELLIGENT, projectApplication.getApply_no(), companyAdmin.getId().toString(), Constant.WaitToDo_IsSerial.IS_SERIAL, false);
+
+            //发送短信
+            templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_UNTREAD;
+            try {
+                AlibabaSMSUtil.sendSMS(
+                        userService.getUser(entity.getCreate_by()).getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
+                );
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            return true;
+        }
+        if (Objects.equals(Constant.LandSupplyApproveStatus.MANAGEMENT_COMMITTEE_LEADER_RETURN, approval.getAfter_approvalstatus())) {
+            //预审退回  --》 街道板块
+            newApproval.setOper_type(Constant.OperType.REJECT);
+            newApproval.setBefore_approvalstatus(Constant.LandSupplyApproveStatus.MANAGEMENT_COMMITTEE_LEADER_RETURN);
+            newApproval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_RETURN);
+            newApproval.setNextchecker(entity.getCreate_by().toString());
+            IndustrialLandSupplyDetail p = new IndustrialLandSupplyDetail();
+            p.setId(applyId);
+            p.setApprove_status(Constant.LandSupplyApproveStatus.COMMERCE_RETURN);
+            p.setProcess_stage(null);
+            industrialLandSupplyDetailDao.updateByPrimaryKeySelective(p);
+            approvalService.insertAndGetId(newApproval);
+//            messageService.saveMessageAndPush(messages, streetArrInt, Constant.UserType.COMPANY);
+//            waitToDoService.completeAllTODO(projectApplication.getId(), Constant.DictionaryType.PROJECT_INTELLIGENT);
+//            waitToDoService.newTODO("智能制造编辑", "/projectIntelligent/edit/" + projectApplication.getId(), Constant.WaitToDo_OperType.EDIT, projectApplication.getId(),
 //                    Constant.DictionaryType.PROJECT_INTELLIGENT, projectApplication.getApply_no(), companyAdmin.getId().toString(), Constant.WaitToDo_IsSerial.IS_SERIAL, false);
 
             //发送短信

+ 10 - 2
src/main/java/platform/modules/government/web/IndustrialLandSupplyController.java

@@ -21,9 +21,11 @@ import platform.modules.government.dto.IndustrialLandSupplyParam;
 import platform.modules.government.entity.IndustrialLandSupplyConfig;
 import platform.modules.government.entity.IndustrialLandSupplyConsultation;
 import platform.modules.government.entity.IndustrialLandSupplyDetail;
+import platform.modules.government.entity.User;
 import platform.modules.government.service.IndustrialLandSupplyConfigService;
 import platform.modules.government.service.IndustrialLandSupplyConsultationService;
 import platform.modules.government.service.IndustrialLandSupplyDetailService;
+import platform.modules.government.service.UserService;
 import platform.modules.sys.service.ApprovalService;
 import platform.modules.sys.web.ResponseMessage;
 
@@ -57,6 +59,9 @@ public class IndustrialLandSupplyController extends BaseController {
     @Autowired
     private ApprovalService approvalService;
 
+    @Autowired
+    private UserService userService;
+
     /**
      * @Author: huZhiHao
      * @Description: 查看产业供地列表 1 待处理 2 已处理 3 全部
@@ -154,7 +159,7 @@ public class IndustrialLandSupplyController extends BaseController {
         boolean canAsk = industrialLandSupplyDetailService.canAsk();
         modelMap.addAttribute("canAsk", canAsk);
         IndustrialLandSupplyDetail entity = industrialLandSupplyDetailService.selectById(id + "");
-        if (canAsk){
+        if (canAsk) {
 //            modelMap.addAttribute("consulDepartmentList", industrialLandSupplyDetailService.consulDepartmentList());
             modelMap.addAttribute("consulDepartmentList", entity.getConsulDepartmentList());
         }
@@ -297,7 +302,7 @@ public class IndustrialLandSupplyController extends BaseController {
         boolean canAsk = industrialLandSupplyDetailService.canAsk();
         modelMap.addAttribute("canAsk", canAsk);
         IndustrialLandSupplyDetail entity = industrialLandSupplyDetailService.selectById(id + "");
-        if (canAsk){
+        if (canAsk) {
 //            modelMap.addAttribute("consulDepartmentList", industrialLandSupplyDetailService.consulDepartmentList());
             modelMap.addAttribute("consulDepartmentList", entity.getConsulDepartmentList());
         }
@@ -386,6 +391,9 @@ public class IndustrialLandSupplyController extends BaseController {
         industrialLandSupplyConsultation.setDel_flag(false);
         List<IndustrialLandSupplyConsultation> industrialLandSupplyConsultationList = industrialLandSupplyConsultationService.findListByWhere(industrialLandSupplyConsultation);
         modelMap.put("industrialLandSupplyConsultationList", industrialLandSupplyConsultationList);
+        Integer userId = entity.getCreate_by();
+        User user = userService.getUser(userId);
+        modelMap.put("createUserType", user.getUser_type() + "");
 
         return "/admin/government/industrial_land_supply/commerce_approve";
     }

+ 5 - 3
src/main/resources/templates/admin/government/industrial_land_supply/commerce_approve.html

@@ -184,8 +184,8 @@
                 </table>
             </div>
         </div>
-        <div th:if="*{data.approve_status=='2'}" class="line">审核意见</div>
-        <div th:if="*{data.approve_status=='2'}" class="row cl">
+        <div th:if="*{data.approve_status=='2' || (data.approve_status=='12' && createUserType=='4')}" class="line">审核意见</div>
+        <div th:if="*{data.approve_status=='2' || (data.approve_status=='12' && createUserType=='4')}" class="row cl">
             <label class="form-label col-xs-4 col-sm-2"></label>
             <div class="formControls col-xs-8 col-sm-9">
                 <textarea class="textarea" id="approval_comment" th:name="approval_comment"
@@ -198,8 +198,10 @@
 
             <a onclick="save()" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe632;</i>提交 </a>
 
+            <!--   <a onclick="audit(1)" class="btn btn-default radius"
+                  th:if="*{data.approve_status=='2'}">退回 </a>-->
             <a onclick="audit(1)" class="btn btn-default radius"
-               th:if="*{data.approve_status=='2'}">退回 </a>
+               th:if="*{data.approve_status=='2' || (data.approve_status=='12' && createUserType=='4')}">退回 </a>
 
             <a onClick="removeIframe();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</a>
         </div>

+ 3 - 3
src/main/resources/templates/admin/government/industrial_land_supply/edit.html

@@ -183,8 +183,8 @@
                 </table>
             </div>
         </div>
-        <div th:if="*{data.approve_status=='2'}" class="line">审核意见</div>
-        <div th:if="*{data.approve_status=='2'}" class="row cl">
+        <div th:if="*{data.approve_status=='2' || (data.approve_status=='12' && createUserType=='4')}" class="line">审核意见</div>
+        <div th:if="*{data.approve_status=='2' || (data.approve_status=='12' && createUserType=='4')}" class="row cl">
             <label class="form-label col-xs-4 col-sm-2">审核意见:</label>
             <div class="formControls col-xs-8 col-sm-9">
                 <textarea class="textarea" id="approval_comment" th:name="approval_comment"
@@ -202,7 +202,7 @@
             <a onclick="release()" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe632;</i>提交 </a>
 
             <a onclick="audit(1)" class="btn btn-default radius"
-               th:if="*{data.approve_status=='2'}">退回 </a>
+               th:if="*{data.approve_status=='2' || (data.approve_status=='12' && createUserType=='4')}">退回 </a>
 
             <a onClick="removeIframe();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</a>
         </div>