From 08363052cecb30230a2c8b3eba791ca8d1be00a5 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Tue, 31 Aug 2021 15:32:38 +0800
Subject: [PATCH] 二维码生成地址修改,保安证编码生成修改

---
 src/main/java/org/springblade/modules/information/controller/InformationController.java |   31 ++++++++++++++++++-------------
 1 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/src/main/java/org/springblade/modules/information/controller/InformationController.java b/src/main/java/org/springblade/modules/information/controller/InformationController.java
index 30b0d71..480049d 100644
--- a/src/main/java/org/springblade/modules/information/controller/InformationController.java
+++ b/src/main/java/org/springblade/modules/information/controller/InformationController.java
@@ -23,6 +23,7 @@
 import lombok.AllArgsConstructor;
 import com.alibaba.fastjson.JSON;
 import org.springblade.common.cache.DictCache;
+import org.springblade.common.constant.FtpConstant;
 import org.springblade.common.enums.DictEnum;
 import org.springblade.core.boot.ctrl.BladeController;
 import org.springblade.core.cache.utils.CacheUtil;
@@ -208,9 +209,14 @@
 	@ApiOperation(value = "修改", notes = "传入information")
 	public R update(@Valid @RequestBody Information information) throws Exception {
 		informationService.updateById(information);
-		String ip = "http://192.168.0.108";
-		String businessLicense = information.getBusinessLicense().substring(26, information.getBusinessLicense().length());
-		String licence = information.getLicence().substring(26, information.getLicence().length());
+		String businessLicense=null;
+		String licence=null;
+		if(information.getBusinessLicense()!=null && !"".equals(information.getBusinessLicense())){
+			 businessLicense = information.getBusinessLicense().substring(26, information.getBusinessLicense().length());
+		}
+		if(information.getLicence()!=null && !"".equals(information.getLicence())){
+			 licence = information.getLicence().substring(26, information.getLicence().length());
+		}
 		//内网同步
 		String s1 = "update sys_information set creditcode = " + "'" + information.getCreditcode() + "'" +
 			",enterprisename = " + "'" + information.getEnterprisename() + "'" +
@@ -231,8 +237,8 @@
 			",representativecell = " + "'" + information.getRepresentativecell() + "'" +
 			",contacts = " + "'" + information.getContacts() + "'" +
 			",contactscell = " + "'" + information.getContactscell() + "'" +
-			",business_License = " + "'" + ip + businessLicense + "'" +
-			",licence = " + "'" + ip + licence + "'" +
+			",business_License = " + "'" + FtpConstant.ip + businessLicense + "'" +
+			",licence = " + "'" + FtpConstant.ip + licence + "'" +
 			" " + "where id = " + "'" + information.getId() + "'";
 		FtpUtil.sqlFileUpload(s1);
 		return R.success("修改成功");
@@ -303,8 +309,8 @@
 	 * 保安派遣数量统计
 	 */
 	@PostMapping("/selectDisp")
-	public R selectDisp(String deptid) {
-		List<Map<Object, Object>> lists = informationService.selectDisp(deptid);
+	public R selectDisp(String deptid,String jurisdiction) {
+		List<Map<Object, Object>> lists = informationService.selectDisp(deptid,jurisdiction);
 		return R.data(lists);
 	}
 
@@ -312,8 +318,8 @@
 	 * 社保统计
 	 */
 	@PostMapping("/selectSoil")
-	public R selectSoil(String deptid) {
-		List<Map<Object, Object>> lists = informationService.selectSoil(deptid);
+	public R selectSoil(String deptid,String jurisdiction) {
+		List<Map<Object, Object>> lists = informationService.selectSoil(deptid,jurisdiction);
 		List<Map<String, Object>> list = new ArrayList<>();
 		for (int i = 0; i < lists.size(); i++) {
 			Map<String, Object> map = new HashMap<String, Object>();
@@ -347,12 +353,11 @@
 	 * @return
 	 */
 	@PostMapping("/queryYearKh")
-	public R queryYearKh(String jurisdiction, String deptid) {
+	public List queryYearKh(String jurisdiction, String deptid) {
 		Calendar cal = Calendar.getInstance();
 		String year = String.valueOf(cal.get(Calendar.YEAR));
-		Map<String, String> map = informationService.queryYearKh(year, jurisdiction, deptid);
-		map = (HashMap<String, String>) sortMapBykeyAsc(map);//key升序
-		return R.data(map);
+		List list = informationService.queryYearKh(year, jurisdiction, deptid);
+		return list;
 	}
 	//升序
 	public static Map<String, String> sortMapBykeyAsc(Map<String, String> oriMap) {

--
Gitblit v1.9.3