修复bug

pull/4/head^2
zhangqihang 2024-02-27 08:47:05 +08:00
parent 72495ef2ca
commit 271431816e
4 changed files with 117 additions and 16 deletions

View File

@ -8,6 +8,7 @@ import com.zcloud.entity.PageData;
import com.zcloud.entity.system.Dictionaries; import com.zcloud.entity.system.Dictionaries;
import com.zcloud.logs.LogAnno; import com.zcloud.logs.LogAnno;
import com.zcloud.service.bus.HiddenUserService; import com.zcloud.service.bus.HiddenUserService;
import com.zcloud.service.bus.NoticeCorpUtil;
import com.zcloud.service.check.ListManagerService; import com.zcloud.service.check.ListManagerService;
import com.zcloud.service.check.RecordItemService; import com.zcloud.service.check.RecordItemService;
import com.zcloud.service.corp.CorpInfoService; import com.zcloud.service.corp.CorpInfoService;
@ -17,10 +18,7 @@ import com.zcloud.service.hidden.HiddenService;
import com.zcloud.service.inspection.SafetyEnvironmentalService; import com.zcloud.service.inspection.SafetyEnvironmentalService;
import com.zcloud.service.sms.SMSLogService; import com.zcloud.service.sms.SMSLogService;
import com.zcloud.service.sms.SMSManagementService; import com.zcloud.service.sms.SMSManagementService;
import com.zcloud.service.system.DepartmentService; import com.zcloud.service.system.*;
import com.zcloud.service.system.DictionariesService;
import com.zcloud.service.system.ImgFilesService;
import com.zcloud.service.system.UsersService;
import com.zcloud.util.*; import com.zcloud.util.*;
import com.zcloud.util.message.MessageService; import com.zcloud.util.message.MessageService;
import net.sf.json.JSONArray; import net.sf.json.JSONArray;
@ -35,6 +33,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
@ -46,6 +45,10 @@ import java.util.*;
@RequestMapping("/hidden") @RequestMapping("/hidden")
public class HiddenController extends BaseController { public class HiddenController extends BaseController {
@Autowired
private FHlogService FHLOG;//日志记录
@Autowired
private NoticeCorpUtil noticeUtil;
@Autowired @Autowired
private HiddenService hiddenService; private HiddenService hiddenService;
@Autowired @Autowired
@ -2124,4 +2127,102 @@ public class HiddenController extends BaseController {
map.put("result", errInfo); map.put("result", errInfo);
return map; return map;
} }
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/finalcheck")
@ResponseBody
public Object finalcheck() throws Exception {
// 获取IP
HttpServletRequest request = this.getRequest();
String ip = "";
if (request.getHeader("x-forwarded-for") == null) {
ip = request.getRemoteAddr();
} else {
ip = request.getHeader("x-forwarded-for");
}
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("ACCEPTSTEP", 7);
pd.put("x",false);
boolean success = false;
// List<PageData> list2 = hiddenService.listOtherNotAccept4pc(pd);
// success = (boolean) pd.get("x");
// if (success) {
// return null;
// }else {
// return null;
// }
pd.put("FINAL_CHECKOR", Jurisdiction.getUSER_ID());
hiddenService.finalcheck(pd);
// 是
if ("1".equals(pd.get("FINAL_CHECK").toString())) {
if (Tools.notEmpty(pd.getString("INSPECTION_ID"))) { //安全环保检查验收
pd.put("ACCEPTSTEP", 7);
List<PageData> list = hiddenService.listOtherNotAccept4pc(pd);
if (list.size() == 0) {
PageData inspection = new PageData();
inspection.put("INSPECTION_ID", pd.getString("INSPECTION_ID"));
inspection.put("OPERATOR", Jurisdiction.getUSER_ID());
inspection.put("OPERATTIME", DateUtil.date2Str(new Date()));
inspection.put("INSPECTION_STATUS", "8"); // 已验收
safetyenvironmentalService.editStatus(inspection);
}
}
} else {
// 否
PageData pd2 = new PageData();
pd2.put("FOREIGN_KEY", pd.get("HIDDEN_ID"));
pd2.put("TYPE", "4");
List<PageData> zgImgs = imgFilesService.listAll(pd2);
for (PageData pageData : zgImgs) {
imgFilesService.delete(pageData);
if (Tools.notEmpty(pageData.getString("FILEPATH"))) {
smb.deleteFile(pageData.getString("FILEPATH"));
}
}
PageData hidden = new PageData();
hidden.put("HIDDEN_ID", pd.get("HIDDEN_ID"));
hidden.put("STATE", "101"); //修改隐患表状态为验收打回
hiddenService.changeState(hidden);
PageData inspection = new PageData();
inspection.put("INSPECTION_ID", pd.getString("INSPECTION_ID"));
inspection.put("OPERATOR", Jurisdiction.getUSER_ID());
inspection.put("OPERATTIME", DateUtil.date2Str(new Date()));
inspection.put("INSPECTION_STATUS", "3"); // 安全环保检查打回到归档,隐患待指派
safetyenvironmentalService.editStatus(inspection);
inspection.put("SENDER_ID", Jurisdiction.getUSER_ID());
inspection.put("SENDER_NAME", Jurisdiction.getName());
noticeUtil.SE_Repulse(inspection);
// hiddenExamineService.deleteByHiddenId(pd); 如果验收打回删除隐患相关信息
FHLOG.save(Jurisdiction.getName(), "删除隐患ID:" + pd.getString("HIDDEN_ID") + "关于hiddenexamine表数据", ip);
// hidden.put("HIDDENEXAMINE_ID",this.get32UUID());
// hidden.put("EXAMINE",pd.get("CONTENT"));//打回意见
// hidden.put("CREATOR",Jurisdiction.getUSER_ID());
// hidden.put("CREATTIME",DateUtil.date2Str(new Date()));
// hidden.put("OPERATOR",Jurisdiction.getUSER_ID());
// hidden.put("OPERATTIME",DateUtil.date2Str(new Date()));
// hidden.put("TYPE",3);//验收打回
// hidden.put("STATE",-1);//验收打回变成初始状态-1
// hiddenExamineService.save(hidden);
}
map.put("check", pd);
map.put("result", errInfo);
return map;
}
} }

View File

@ -411,18 +411,18 @@ public class UsersController extends BaseController {
PageData pd = this.getPageData(); PageData pd = this.getPageData();
if (pd.get("USERAVATARURL") != null && !pd.getString("USERAVATARURL").equals("")) { // if(pd.get("USERAVATARURL")!=null && !pd.getString("USERAVATARURL").equals("")){
// System.out.println("USERAVATARURL原长度"+pd.getString("USERAVATARURL").length()); // System.out.println("USERAVATARURL原长度"+pd.getString("USERAVATARURL").length());
String USERAVATARURL64 = ImageAnd64Binary.zipBase64(pd.getString("USERAVATARURL")); // String USERAVATARURL64 = ImageAnd64Binary.zipBase64(pd.getString("USERAVATARURL"));
// System.out.println("USERAVATARURL压缩长度"+USERAVATARURL64.length()); // System.out.println("USERAVATARURL压缩长度"+USERAVATARURL64.length());
try { //// try{
FaceUtil.compareFace(pd.getString("USERAVATARURL"), pd.getString("USERAVATARURL")); //// FaceUtil.compareFace(pd.getString("USERAVATARURL"),pd.getString("USERAVATARURL"));
} catch (Exception e) { //// }catch (Exception e){
map.put("result", "fail"); //// map.put("result", "Error");
map.put("msg", "人脸图像不符合要求 请重新上传!"); //// map.put("msg", "人脸图像不符合要求 请重新上传!");
return map; //// return map;
} //// }
} // }
if ("input".equals(pd.getString("LEARNERCATEGORYSTATUS"))) { if ("input".equals(pd.getString("LEARNERCATEGORYSTATUS"))) {
pd.put("DICTTYPE", "APPLICABLE_PERSONNEL"); pd.put("DICTTYPE", "APPLICABLE_PERSONNEL");

View File

@ -461,7 +461,7 @@
left join sys_user re on re.USER_ID = f.RECTIFICATIONOR left join sys_user re on re.USER_ID = f.RECTIFICATIONOR
left join sys_user ch on ch.USER_ID = f.CHECKOR left join sys_user ch on ch.USER_ID = f.CHECKOR
left join sys_user conUser on conUser.USER_ID = f.CONFIRM_USER left join sys_user conUser on conUser.USER_ID = f.CONFIRM_USER
left join oa_department crd on crd.DEPARTMENT_ID = f.HIDDENFINDDEPT left join oa_department crd on crd.DEPARTMENT_ID = cr.DEPARTMENT_ID
left join oa_department red on red.DEPARTMENT_ID = f.RECTIFICATIONDEPT left join oa_department red on red.DEPARTMENT_ID = f.RECTIFICATIONDEPT
left join oa_department chd on chd.DEPARTMENT_ID = f.CHECKDEPT left join oa_department chd on chd.DEPARTMENT_ID = f.CHECKDEPT
left join bus_checkrecord bc on bc.CHECKRECORD_ID = f.CHECKRECORD_ID and bc.ISDELETE = 0 left join bus_checkrecord bc on bc.CHECKRECORD_ID = f.CHECKRECORD_ID and bc.ISDELETE = 0

View File

@ -284,7 +284,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="LEARNERCATEGORY != null and LEARNERCATEGORY != ''"> <if test="LEARNERCATEGORY != null and LEARNERCATEGORY != ''">
,LEARNERCATEGORY = #{LEARNERCATEGORY} ,LEARNERCATEGORY = #{LEARNERCATEGORY}
</if> </if>
<if test="USERAVATARURL != null and USERAVATARURL != ''"> <if test="USERAVATARURL != null">
,USERAVATARPREFIX = #{USERAVATARPREFIX} ,USERAVATARPREFIX = #{USERAVATARPREFIX}
,USERAVATARURL = #{USERAVATARURL} ,USERAVATARURL = #{USERAVATARURL}
</if> </if>