Jelajahi Sumber

招标项目上报处理,签章下载IP变更为阿里内网ip

user5 3 tahun lalu
induk
melakukan
51da90cac1

+ 57 - 3
src/main/java/com/jeeplus/modules/projectrecord/service/ProjectReportedImportService.java

@@ -182,9 +182,9 @@ public class ProjectReportedImportService extends CrudService<ProjectReportedImp
             reportedConsultant.setReportedId(projectReportedImport.getId());
             reportedConsultant.setZixunyuan(userName.getId());
             reportedConsultant.setZhucezigezhKey("161");
-            reportedConsultant.setWcyysrbl(100D);
+            reportedConsultant.setWcyysrbl(80D);
             if(StringUtils.isNotBlank(projectReportedImport.getZiXunShouRu())){
-                reportedConsultant.setWcyysr(Double.valueOf(projectReportedImport.getZiXunShouRu()));
+                reportedConsultant.setWcyysr(Double.valueOf(projectReportedImport.getZiXunShouRu())*0.8);
             }else{
                 reportedConsultant.setWcyysr(0D);
             }
@@ -193,6 +193,25 @@ public class ProjectReportedImportService extends CrudService<ProjectReportedImp
             ruralProjectRecordsReportedDao.insertConsultant(reportedConsultant);
         }
 
+        //添加咨询员中的项目负责人信息
+        //保存咨询员信息
+        User zxyUserName = UserUtils.getByUserName("吴盛楠");
+        if(null != zxyUserName){
+            ReportedConsultant reportedConsultant = new ReportedConsultant();
+            reportedConsultant.setReportedId(projectReportedImport.getId());
+            reportedConsultant.setZixunyuan(zxyUserName.getId());
+            reportedConsultant.setZhucezigezhKey("161");
+            reportedConsultant.setWcyysrbl(20D);
+            if(StringUtils.isNotBlank(projectReportedImport.getZiXunShouRu())){
+                reportedConsultant.setWcyysr(Double.valueOf(projectReportedImport.getZiXunShouRu())*0.2);
+            }else{
+                reportedConsultant.setWcyysr(0D);
+            }
+            reportedConsultant.setRoleFlag("0");
+            reportedConsultant.preInsert();
+            ruralProjectRecordsReportedDao.insertConsultant(reportedConsultant);
+        }
+
     }
 
 
@@ -308,8 +327,43 @@ public class ProjectReportedImportService extends CrudService<ProjectReportedImp
 
         //启动审核
         if (Integer.parseInt(reported.getReportStatus())== ProjectStatusEnum.IN_APRL.getValue() &&(oldStatus==null|| ProjectStatusEnum.REJECTED.getValue()!=oldStatus)) {
-            this.startOverallAudit(reported, reported.getProcessInstanceId());
+            //this.startOverallAudit(reported, reported.getProcessInstanceId());
+        }
+
+        //信用代码id
+        String jsonUscCode = "{\"uscCode\": \"91320000746823994F\"";
+        Map map = RuralProjectReportedInfoUtil.reportedDataManageImport(reported);
+        String jsonUscData = JSONObject.toJSONString(map);
+        byte[] privateKey = org.apache.commons.codec.binary.Base64.decodeBase64(PRIVATE_KEY);
+        //客户拿到密钥将自己的数据 jsonUscData 进行非对称加密。
+        byte[] encryptByPrivateKey = new byte[0];
+        try {
+            encryptByPrivateKey = Rsatool.encryptByPrivateKey(jsonUscData.getBytes(), privateKey);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        //将唯一标志和非对称加密后数据采用对称加密,方便传到服务段解析,并获得非对称的公钥来解密客户用密钥加密的数据
+        String encryString = jsonUscCode + ",\"data\":\"" + Base64.encodeBase64String(encryptByPrivateKey) + "\"}";
+        String encryptByAes = null;
+        try {
+            encryptByAes = Aestool.Encrypt(encryString, AES_KEY);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        //测试接口
+        //String url = "http://comp.jszj.com.cn:8031/api/testAddProject";
+        //正式接口
+        String url = "http://comp.jszj.com.cn:8031/api/addProject";
+        //发送请求
+        String returnResult = HttpPostTool.doPost(url, encryptByAes);
+        HashMap hashMap = JSON.parseObject(returnResult, HashMap.class);
+        if(!"1".equals(hashMap.get("code"))){
+            return "上报失败:" + hashMap.get("msg").toString();
         }
+        //修改项目上报表中状态
+        reported.setReportStatus(String.valueOf(ProjectStatusEnum.SIGNED.getValue()));
+        reported.preUpdate();
+        dao.update(reported);
 
         return null;
     }

+ 2 - 2
src/main/java/com/jeeplus/modules/projectrecord/web/ProjectReportedImportController.java

@@ -220,9 +220,9 @@ public class ProjectReportedImportController extends BaseController {
         if(!projectReportedImport.getIsNewRecord()){//编辑表单保存
             ProjectReportedImport t = projectReportedImportService.getRuralProjectRecordsReported(projectReportedImport.getId());;//从数据库取出记录的值
             MyBeanUtils.copyBeanNotNull2Bean(projectReportedImport, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
-            str = projectReportedImportService.saveReportedInfo(t, ProjectStatusEnum.IN_APRL);
+            str = projectReportedImportService.saveReportedInfo(t, ProjectStatusEnum.TSTORE);
         }else{//新增表单保存
-            str = projectReportedImportService.saveReportedInfo(projectReportedImport,ProjectStatusEnum.IN_APRL);
+            str = projectReportedImportService.saveReportedInfo(projectReportedImport,ProjectStatusEnum.TSTORE);
         }
 
 

+ 1 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/reported/import/projectReportedImportList.jsp

@@ -408,7 +408,7 @@
                         {
 							if(d.reportedState !=undefined && d.reportedState != null && d.reportedState !='' && d.reportedState !='0'){
 								if(d.reportedState == 1){
-									xml+="<a href=\"#\" onclick=\"openDialogreReportSwitch('上报管理', '${ctx}/project/projectRecords/updateReported?id=" +  d.id + " ','95%', '95%','','上报,暂存,关闭')\"  class=\"layui-btn layui-btn-xs  layui-bg-green\" style='height: 32px;margin-top: 5px;margin-bottom: 5px;' > 修改上报</a>";
+									xml+="<a href=\"#\" onclick=\"openDialogreReportSwitch('上报管理', '${ctx}/project/projectReportedImport/updateReported?id=" +  d.id + " ','95%', '95%','','上报,暂存,关闭')\"  class=\"layui-btn layui-btn-xs  layui-bg-green\" style='height: 32px;margin-top: 5px;margin-bottom: 5px;' > 修改上报</a>";
 								}
 								if(d.reportedState == 2){
 									xml+="<a href=\"${ctx}/project/projectReportedImport/cancelInvalidateByReported?id=" + d.id + "&processInstanceId=" + d.processInstanceId + "\" onclick=\"return confirmx('确认要撤回该上报审批吗?', this.href)\" class=\"layui-btn layui-btn-xs  layui-bg-red\" style='height: 32px;margin-top: 5px;margin-bottom: 5px;' > 撤回上报</a>";

+ 4 - 4
src/main/webapp/webpage/modules/ruralprojectrecords/reported/import/reportedForm.jsp

@@ -89,7 +89,7 @@
                     }*/
                     var list = [];
                     var size = $("#reportedConsultantList tr").length;
-                    if(size <= 0){
+                    if(size <= 1){
                         parent.layer.msg("咨询员数量至少有1个人!", {icon: 5});
                         return false;
                     }
@@ -231,11 +231,11 @@
                         return false;
                     }
 
-                    var checkedCount = $('input[type=checkbox]:checked').length;
+                    /*var checkedCount = $('input[type=checkbox]:checked').length;
                     if(checkedCount == 0){
                         parent.layer.msg("请选择咨询项目造价包含内容说明!", {icon: 5});
                         return false;
-                    }
+                    }*/
 
                     var BaoGaoShuQianFaDate = $("#BaoGaoShuQianFaDate").val();
                     var s = BaoGaoShuQianFaDate.replace(/-/g,"/");
@@ -1369,7 +1369,7 @@
             <div class="form-group layui-row first lw9">
                 <div class="form-group-label"><h2>咨询项目造价包含内容说明</h2></div>
                 <div class="layui-item layui-col-sm12">
-                    <label class="layui-form-label double-line"><span class="require-item">*</span>咨询项目造价包含内容说明(勾选):</label>
+                    <label class="layui-form-label double-line">咨询项目造价包含内容说明(勾选):</label>
                     <div class="layui-input-block paddingDiv">
                         <c:forEach items="${fns:getMainDictList('contents_include')}" var="contents">
                             <input type="checkbox" name="contentsIncludeList" class="contents_${contents.value}" value="${contents.value}" title="${contents.label}"/>

+ 2 - 2
src/main/webapp/webpage/modules/ruralprojectrecords/reported/import/reportedModify.jsp

@@ -228,11 +228,11 @@
                     return false;
                 }
 
-                var checkedCount = $('input[type=checkbox]:checked').length;
+                /*var checkedCount = $('input[type=checkbox]:checked').length;
                 if(checkedCount == 0){
                     parent.layer.msg("请选择咨询项目造价包含内容说明!", {icon: 5});
                     return false;
-                }
+                }*/
 
                 var BaoGaoShuQianFaDate = $("#BaoGaoShuQianFaDate").val();
                 var s = BaoGaoShuQianFaDate.replace(/-/g,"/");