فهرست منبع

上报空指针问题修复

user5 4 سال پیش
والد
کامیت
faa51aaef0

+ 8 - 8
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageService.java

@@ -3362,14 +3362,14 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
                 while(!"0".equals(engineeringInfo.getParent().getId())){
                     engineeringInfo=engineeringService.get(engineeringInfo.getParent().getId());
                 }
-            }
-            //根据项目类型查询对应上报字段类型
-            ProjectReportedType typeInfo = new ProjectReportedType();
-            typeInfo.setProjectKey(engineeringInfo.getId());
-            typeInfo.setProjectType("engineeringType");
-            ProjectReportedType info = projectReportedTypeService.getReportedByType(typeInfo);
-            if(null!= info){
-                reported.setProjectClassify(info.getReportedKey());
+                //根据项目类型查询对应上报字段类型
+                ProjectReportedType typeInfo = new ProjectReportedType();
+                typeInfo.setProjectKey(engineeringInfo.getId());
+                typeInfo.setProjectType("engineeringType");
+                ProjectReportedType info = projectReportedTypeService.getReportedByType(typeInfo);
+                if(null!= info){
+                    reported.setProjectClassify(info.getReportedKey());
+                }
             }
         }
 

+ 2 - 22
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageNewController.java

@@ -255,24 +255,8 @@ public class RuralCostProjectMessageNewController extends BaseController {
         //总审
         RuralReportConsultant zongshen = new RuralReportConsultant();
         if (StringUtils.isNotBlank(projectcontentinfo.getView()) && projectcontentinfo.getView().equals("reloadReport")){
-            List<WorkStaffCertificate> bzshbCertificateList = Lists.newArrayList();
             if(StringUtils.isNotBlank(projectcontentinfo.getProjectReportData().getBzshbUserId())){
-                bzshbCertificateList = ruralProjectMessageService.getCertificateByUser(projectReportData.getBzshbUserId());
-            }
-            //获取专业类型
-            List<MainDictDetail> certificateMajor1 = DictUtils.getMainDictList("certificate_major");
-            for (WorkStaffCertificate certificateInfo: bzshbCertificateList) {
-                zongshen.setZhucezigezhID(certificateInfo.getNum());
-                zongshen.setZhucezigezhKey(certificateInfo.getName());
-                for (MainDictDetail type : certificateMajor1) {
-                    if(certificateInfo.getMajor().equals(type.getValue())){
-                        zongshen.setMajor(type.getLabel());
-                    }
-                }
-                User currentUser=userService.get(projectcontentinfo.getProjectReportData().getBzshbUserId());
-                zongshen.setZixunyuanName(currentUser.getName());
-                zongshen.setZixunyuan(currentUser.getId());
-                zongshen.setRole("技术咨询员");
+                zongshen.setZixunyuan(projectReportData.getBzshbUserId());
             }
         }
 
@@ -283,12 +267,8 @@ public class RuralCostProjectMessageNewController extends BaseController {
         Iterator<RuralReportConsultant> it = consultantList.iterator();
         while(it.hasNext()){
             RuralReportConsultant consultant = it.next();
+            //判定重新复核中总审人员信息去除展示
             if(consultant.getZixunyuan().equals(zongshen.getZixunyuan())){
-                try {
-                    MyBeanUtils.copyBeanNotNull2Bean(consultant, zongshen);
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
                 it.remove();
             }else if(consultant.getZixunyuan().equals(currentConsultant.getZixunyuan())){
                 try {

+ 1 - 23
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageNewController.java

@@ -261,25 +261,8 @@ public class RuralProjectMessageNewController extends BaseController {
         }
         RuralReportConsultant zongshen = new RuralReportConsultant();
         if (StringUtils.isNotBlank(projectcontentinfo.getView()) && projectcontentinfo.getView().equals("reloadReport")){
-            //总审
-            List<WorkStaffCertificate> bzshbCertificateList = Lists.newArrayList();
             if(StringUtils.isNotBlank(projectcontentinfo.getProjectReportData().getBzshbUserId())){
-                bzshbCertificateList = ruralProjectMessageService.getCertificateByUser(projectReportData.getBzshbUserId());
-            }
-            //获取专业类型
-            List<MainDictDetail> certificateMajor1 = DictUtils.getMainDictList("certificate_major");
-            for (WorkStaffCertificate certificateInfo: bzshbCertificateList) {
-                zongshen.setZhucezigezhID(certificateInfo.getNum());
-                zongshen.setZhucezigezhKey(certificateInfo.getName());
-                for (MainDictDetail type : certificateMajor1) {
-                    if(certificateInfo.getMajor().equals(type.getValue())){
-                        zongshen.setMajor(type.getLabel());
-                    }
-                }
-                User currentUser=userService.get(projectcontentinfo.getProjectReportData().getBzshbUserId());
-                zongshen.setZixunyuanName(currentUser.getName());
-                zongshen.setZixunyuan(currentUser.getId());
-                zongshen.setRole("技术咨询员");
+                zongshen.setZixunyuan(projectReportData.getBzshbUserId());
             }
         }
         //根据项目id查找报告咨询员信息
@@ -290,11 +273,6 @@ public class RuralProjectMessageNewController extends BaseController {
         while(it.hasNext()){
             RuralReportConsultant consultant = it.next();
             if(consultant.getZixunyuan().equals(zongshen.getZixunyuan())){
-                try {
-                    MyBeanUtils.copyBeanNotNull2Bean(consultant, zongshen);
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
                 it.remove();
             }else if(consultant.getZixunyuan().equals(currentConsultant.getZixunyuan())){
                 try {

+ 9 - 9
src/main/resources/mappings/modules/projectcontentinfo/ProjectReportDataDao.xml

@@ -827,16 +827,16 @@
 		<if test="bzshbUserId != null and bzshbUserId != ''">
 			,bzshb_user_id = #{bzshbUserId}
 		</if>
-		,consultant_id = #{consultant.id},
-		consultant_remarks = #{consultantRemarks},
-		principal_id = #{principal.id},
-		principal_remarks = #{principalRemarks},
-		technicist_id = #{technicist.id},
-		technicist_remarks = #{technicistRemarks},
-		contract_category = #{contractCategory},
-		contract_rate = #{contractRate},
+		,consultant_id = #{consultant.id}
+		,consultant_remarks = #{consultantRemarks}
+		,principal_id = #{principal.id}
+		,principal_remarks = #{principalRemarks}
+		,technicist_id = #{technicist.id}
+		,technicist_remarks = #{technicistRemarks}
+		,contract_category = #{contractCategory}
+		,contract_rate = #{contractRate}
 		<if test="ZiXunShouRu != null and ZiXunShouRu != ''">
-			ZiXunShouRu = #{ZiXunShouRu}
+			,ZiXunShouRu = #{ZiXunShouRu}
 		</if>
 		WHERE id = #{id}
 	</update>