Browse Source

产业供地 商务局增加退回到属地按钮
属地详情页面开放审批记录的查看

huZhiHao 5 years ago
parent
commit
ed74ac7843

+ 2 - 0
src/main/java/platform/common/Constant.java

@@ -417,6 +417,8 @@ public final class Constant {
         public static String COMMERCE_LEADER_PENDING_HANDLE = "8"; //商务局分管领导待审核(商务办事员汇总完成)
         public static String COMMERCE_LEADER_RETURN = "9"; //商务局分管领导退回(商务办事员汇总完成)
         public static String COMMERCE_LEADER_REJECT = "10"; //商务局分管领导不通过(商务办事员汇总完成)
+        public static String COMMERCE_SUMMARY_RETURN_PLATE = "21"; //退回板块(退到板块)
+        public static String COMMERCE_SUMMARY_RETURN_COMMERCE = "22"; //汇总退回(退到商务)
 
         public static String MANAGEMENT_COMMITTEE_LEADER_PENDING_HANDLE = "11"; //待预审审核(商务局分管领导通过)
         public static String MANAGEMENT_COMMITTEE_LEADER_RETURN = "12"; //预审退回(商务局分管领导通过)

+ 75 - 0
src/main/java/platform/modules/government/service/IndustrialLandSupplyDetailService.java

@@ -904,6 +904,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
             apply_status_list.add(Constant.LandSupplyApproveStatus.PLATE_PENDING_SUBMIT);
             apply_status_list.add(Constant.LandSupplyApproveStatus.PLATE_WITHDRAW);
             apply_status_list.add(Constant.LandSupplyApproveStatus.COMMERCE_RETURN);
+            apply_status_list.add(Constant.LandSupplyApproveStatus.COMMERCE_SUMMARY_RETURN_PLATE);
         } else if (Constant.UserType.GOVERNMENT.equals(ShiroUtils.getUserType())) {
 
             //商务局受理员 负责的状态
@@ -917,6 +918,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
                     apply_status_list.add(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_SUMMARY);
                     apply_status_list.add(Constant.LandSupplyApproveStatus.COMMERCE_LEADER_RETURN);
                     apply_status_list.add(Constant.LandSupplyApproveStatus.MANAGEMENT_COMMITTEE_LEADER_RETURN);
+                    apply_status_list.add(Constant.LandSupplyApproveStatus.COMMERCE_SUMMARY_RETURN_COMMERCE);
                     break;
                 }
             }
@@ -2964,6 +2966,79 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
             industrialLandSupplyDetailDao.updateByPrimaryKeySelective(p);
             approvalService.insertAndGetId(newApproval);
             return true;
+        } else if (Objects.equals(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_SUMMARY, approval.getAfter_approvalstatus())) {
+            //商务汇总退回 --》 板块或自己
+
+            //判断提交人是街道还是商务自己
+            boolean isStreet = true;
+            Integer id = entity.getCreate_by();
+            if (Constant.UserType.STREET.equals(userService.getUser(id).getUser_type())) {
+                isStreet = true;
+            } else {
+                isStreet = false;
+            }
+
+            if (!isStreet) {
+                Group group = null;
+                newApproval.setOper_type(Constant.OperType.REJECT);
+                newApproval.setBefore_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_SUMMARY);
+                newApproval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_SUMMARY_RETURN_COMMERCE);
+                group = groupService.findByNameOnly(Constant.INDUSTRIALLANDSUPPLY_1);
+                if (null == group) {
+                    throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_1 + "没有该项目责任单位的人员,请联系管理员配置");
+                }
+                List<UserGroup> userGroups = userGroupService.findByGroupId(group.getId());
+                List<User> users = userService.findListByWhere(new User());
+                StringBuffer sb = new StringBuffer("");
+                for (UserGroup userGroup : userGroups) {
+                    for (User user : users) {
+                        if (Objects.equals(user.getId(), userGroup.getUser_id())) {
+                            sb.append(userGroup.getUser_id() + ",");
+                            //发送短信
+                            templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_UNTREAD;
+                            try {
+                                AlibabaSMSUtil.sendSMS(
+                                        user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
+                                );
+                            } catch (Exception e) {
+                                e.printStackTrace();
+                            }
+                        }
+                    }
+                }
+                newApproval.setNextchecker(sb.toString());
+                if (sb.length() == 0) {
+                    throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_1 + "没有该项目责任单位的人员,请联系管理员配置");
+                }
+                IndustrialLandSupplyDetail p = new IndustrialLandSupplyDetail();
+                p.setId(applyId);
+                p.setApprove_status(Constant.LandSupplyApproveStatus.COMMERCE_SUMMARY_RETURN_COMMERCE);
+                p.setProcess_stage(Constant.LandSupplyApproveStage.SUPPLY);
+                industrialLandSupplyDetailDao.updateByPrimaryKeySelective(p);
+                approvalService.insertAndGetId(newApproval);
+                return true;
+            } else {
+                newApproval.setOper_type(Constant.OperType.REJECT);
+                newApproval.setBefore_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_SUMMARY);
+                newApproval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_SUMMARY_RETURN_PLATE);
+                newApproval.setNextchecker(entity.getCreate_by().toString());
+                IndustrialLandSupplyDetail p = new IndustrialLandSupplyDetail();
+                p.setId(applyId);
+                p.setApprove_status(Constant.LandSupplyApproveStatus.COMMERCE_SUMMARY_RETURN_PLATE);
+                p.setProcess_stage(Constant.LandSupplyApproveStage.SUPPLY);
+                industrialLandSupplyDetailDao.updateByPrimaryKeySelective(p);
+                approvalService.insertAndGetId(newApproval);
+                //发送短信
+                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;
+            }
         }
         return false;
     }

+ 29 - 29
src/main/resources/templates/admin/government/industrial_land_supply/detail.html

@@ -429,37 +429,37 @@
                 </div>
             </div>
 
-            <div class="line">流程信息</div>
-            <div class="row cl">
-                <label class="form-label col-xs-4 col-sm-2"></label>
-                <div class="formControls col-xs-8 col-sm-9">
-                    <table class="table table-border table-bordered table-bg table-hover processTb">
-                        <thead>
-                        <tr class="text-c">
-                            <th>时间</th>
-                            <!-- <th>审核状态</th> -->
-                            <th>单位</th>
-                            <th>操作人</th>
-                            <th>操作</th>
-                            <th>审核意见</th>
-                        </tr>
-                        </thead>
-                        <tbody>
-                        <tr class="text-c" th:each="model,iterStat:${approvalList}" th:object="${model}">
-                            <td th:text="*{create_time}"></td>
-                            <!-- <td th:text="*{before_approvalstatus_str}"></td> -->
-                            <td th:text="*{department}"></td>
-                            <td th:text="*{create_name}"></td>
-                            <td th:text="*{oper_type}"></td>
-                            <td class="viewComment" th:data="*{approval_comment}" th:text="*{approval_comment}"></td>
-                        </tr>
-                        </tbody>
-                    </table>
-                </div>
-            </div>
-
         </th:block>
 
+        <div class="line">流程信息</div>
+        <div class="row cl">
+            <label class="form-label col-xs-4 col-sm-2"></label>
+            <div class="formControls col-xs-8 col-sm-9">
+                <table class="table table-border table-bordered table-bg table-hover processTb">
+                    <thead>
+                    <tr class="text-c">
+                        <th>时间</th>
+                        <!-- <th>审核状态</th> -->
+                        <th>单位</th>
+                        <th>操作人</th>
+                        <th>操作</th>
+                        <th>审核意见</th>
+                    </tr>
+                    </thead>
+                    <tbody>
+                    <tr class="text-c" th:each="model,iterStat:${approvalList}" th:object="${model}">
+                        <td th:text="*{create_time}"></td>
+                        <!-- <td th:text="*{before_approvalstatus_str}"></td> -->
+                        <td th:text="*{department}"></td>
+                        <td th:text="*{create_name}"></td>
+                        <td th:text="*{oper_type}"></td>
+                        <td class="viewComment" th:data="*{approval_comment}" th:text="*{approval_comment}"></td>
+                    </tr>
+                    </tbody>
+                </table>
+            </div>
+        </div>
+
         <div class="row cl text-c" style="background-color: white">
             <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                 <a onClick="removeIframe();" class="btn btn-default radius">&nbsp;&nbsp;返回&nbsp;&nbsp;</a>

+ 2 - 2
src/main/resources/templates/admin/government/industrial_land_supply/index.html

@@ -137,7 +137,7 @@
 
                                 <a title="编辑" href="javascript:;" class="ml-5" style="text-decoration:none"
                                    th:onclick="'javascript:jump_to(\'编辑\',\'/land_supply/edit/'+*{id}+'\');'"
-                                   th:if="*{approve_status=='1' || approve_status=='3' || approve_status=='4' || approve_status=='5' || approve_status=='9' || approve_status=='12'}">编辑</a>
+                                   th:if="*{approve_status=='1' || approve_status=='3' || approve_status=='4' || approve_status=='5' || approve_status=='9'  || approve_status=='22'}">编辑</a>
 
                             </th:block>
 
@@ -239,7 +239,7 @@
 
                             <a title="删除" href="javascript:;" class="ml-5" style="text-decoration:none"
                                th:onclick="'javascript:deleteProject(\''+*{id}+'\');'"
-                               th:if="*{approve_status=='1' || approve_status=='3' || approve_status=='4' || approve_status=='5'}">删除</a>
+                               th:if="*{approve_status=='1' || approve_status=='3' || approve_status=='4' || approve_status=='5' || approve_status=='22'}">删除</a>
 
                         </th:block>
 

+ 82 - 4
src/main/resources/templates/admin/government/industrial_land_supply/summary.html

@@ -153,13 +153,26 @@
             </div>
         </div>
 
-        <div class="row cl text-c" style="background-color: white">
-            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
-                <a onclick="save()" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe632;</i>提交 </a>
-                <a onClick="removeIframe();" class="btn btn-default radius" type="button">&nbsp;&nbsp;返回&nbsp;&nbsp;</a>
+    </form>
+    <form class="form form-horizontal" id="form-approve">
+        <input id="status" type="hidden" name="status"/>
+        <input id="apply_id" type="hidden" name="apply_id" th:value="${data.id}"/>
+        <div class="line">审核意见</div>
+        <div 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"
+                          placeholder="请输入审核意见"></textarea>
             </div>
         </div>
     </form>
+    <div class="row cl text-c" style="background-color: white">
+        <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
+            <a onclick="save()" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe632;</i>提交 </a>
+            <a onclick="audit(1)" class="btn btn-default radius"><i class="Hui-iconfont"></i>退回 </a>
+            <a onClick="removeIframe();" class="btn btn-default radius" type="button">&nbsp;&nbsp;返回&nbsp;&nbsp;</a>
+        </div>
+    </div>
 </article>
 <script type="text/javascript" th:src="@{/h-ui/lib/webuploader/0.1.5/webuploader.min.js}"></script>
 <script th:inline="javascript">
@@ -238,6 +251,71 @@
         });
     }
 
+    //status 1退回,2通过,3不通过
+    function audit(status) {
+        $("#status").val(status);
+        if ($("#approval_comment").val() && $("#approval_comment").val().length > 5000) {
+            errorMessage('审核意见最多支持5000个字符!');
+            return false;
+        }
+        if (status == 1 || status == 3) {
+            //退回、不通过审核意见必填
+            if ($.trim($("#approval_comment").val()) == "") {
+                errorMessage('请填写审核意见!');
+                return false;
+            }
+            var str = "确定操作吗?"
+            if (status == 1) {
+                str = "确定退回吗?"
+            } else if (status == 3) {
+                str = "确定不通过吗?"
+            }
+            layer.confirm(str, function (index) {
+                $("#form-approve").submit();
+                layer.close(index);
+            });
+        } else if (status == 2) {
+            $("#form-approve").submit();
+        }
+    }
+
+    $(function () {
+        $("#form-approve").validate({
+            rules: {},
+            messages: {},
+            onkeyup: false,
+            focusCleanup: true,
+            success: "valid",
+            submitHandler: function (form) {
+                $(form).ajaxSubmit({
+                    type: 'post',
+                    url: pagePath + "/land_supply/approve",
+                    dataType: "json",
+                    success: function (data) {
+                        if (data.success) {
+                            succeedMessage(data.message);
+                            setTimeClose();
+                        } else {
+                            errorMessage(data.message);
+                        }
+                    },
+                    error: function () {
+                        errorMessage('系统错误!');
+                    }
+                });
+                return false; // 非常重要,如果是false,则表明是不跳转,在本页上处理,也就是ajax,如果是非false,则传统的form跳转。
+            }
+        });
+
+        //查看完整意见
+        $(".viewComment").on("click", function () {
+            layer.alert(
+                $(this).attr('data'),
+                {area: ['800px', '500px']}
+            )
+        });
+    });
+
     /**
      * 取消
      */