BUG优化

dev
xiepeng 2024-04-25 18:02:41 +08:00
parent d27456c596
commit 462de67f21
10 changed files with 63 additions and 18 deletions

View File

@ -71,6 +71,7 @@ public class TrafficDrivingCommitmentController extends BaseController {
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //操作人 pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //操作人
pd.put("OPERATORNAME", Jurisdiction.getName()); //操作人 pd.put("OPERATORNAME", Jurisdiction.getName()); //操作人
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //操作时间 pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //操作时间
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
trafficDrivingCommitmentService.edit(pd); trafficDrivingCommitmentService.edit(pd);
map.put("pd",pd); map.put("pd",pd);
@ -109,6 +110,7 @@ public class TrafficDrivingCommitmentController extends BaseController {
pd.put("DELETOR", Jurisdiction.getUSER_ID());//删除人id pd.put("DELETOR", Jurisdiction.getUSER_ID());//删除人id
pd.put("DELETORNAME", Jurisdiction.getName());//删除人姓名 pd.put("DELETORNAME", Jurisdiction.getName());//删除人姓名
pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间 pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
trafficDrivingCommitmentService.delete(pd); trafficDrivingCommitmentService.delete(pd);
map.put("result", errInfo); map.put("result", errInfo);
return map; return map;
@ -125,6 +127,7 @@ public class TrafficDrivingCommitmentController extends BaseController {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
String errInfo = "success"; String errInfo = "success";
PageData pd = this.getPageData(); PageData pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd = trafficDrivingCommitmentService.findById(pd); // 根据ID读取 pd = trafficDrivingCommitmentService.findById(pd); // 根据ID读取
map.put("pd", pd); map.put("pd", pd);
map.put("result", errInfo); map.put("result", errInfo);

View File

@ -64,6 +64,7 @@ public class TrafficDrivingTypeController extends BaseController {
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //操作人 pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //操作人
pd.put("OPERATORNAME", Jurisdiction.getName()); //操作人 pd.put("OPERATORNAME", Jurisdiction.getName()); //操作人
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //操作时间 pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //操作时间
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
trafficDrivingTypeService.edit(pd); trafficDrivingTypeService.edit(pd);
map.put("pd",pd); map.put("pd",pd);
@ -104,6 +105,7 @@ public class TrafficDrivingTypeController extends BaseController {
pd.put("DELETOR", Jurisdiction.getUSER_ID());//删除人id pd.put("DELETOR", Jurisdiction.getUSER_ID());//删除人id
pd.put("DELETORNAME", Jurisdiction.getName());//删除人姓名 pd.put("DELETORNAME", Jurisdiction.getName());//删除人姓名
pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间 pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
trafficDrivingTypeService.delete(pd); trafficDrivingTypeService.delete(pd);
map.put("result", errInfo); map.put("result", errInfo);
return map; return map;
@ -120,6 +122,7 @@ public class TrafficDrivingTypeController extends BaseController {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
String errInfo = "success"; String errInfo = "success";
PageData pd = this.getPageData(); PageData pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd = trafficDrivingTypeService.findById(pd); // 根据ID读取 pd = trafficDrivingTypeService.findById(pd); // 根据ID读取
map.put("pd", pd); map.put("pd", pd);
map.put("result", errInfo); map.put("result", errInfo);

View File

@ -112,6 +112,7 @@ public class TrafficSecurityCustomerManagementController extends BaseController
pd.put("DELETOR", Jurisdiction.getUSER_ID());//删除人id pd.put("DELETOR", Jurisdiction.getUSER_ID());//删除人id
pd.put("DELETORNAME", Jurisdiction.getName());//删除人姓名 pd.put("DELETORNAME", Jurisdiction.getName());//删除人姓名
pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间 pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
customerManagementService.delete(pd); customerManagementService.delete(pd);
map.put("result", errInfo); map.put("result", errInfo);
return map; return map;
@ -139,9 +140,11 @@ public class TrafficSecurityCustomerManagementController extends BaseController
String errInfo = "success"; String errInfo = "success";
PageData pd = new PageData(); PageData pd = new PageData();
pd = this.getPageData(); pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd = customerManagementService.getTrafficCustomerSelectView(pd); //根据ID读取客户管理信息 pd = customerManagementService.getTrafficCustomerSelectView(pd); //根据ID读取客户管理信息
PageData pageData = new PageData(); PageData pageData = new PageData();
pageData.put("CUSTOMERMANAGEMENT_ID", pd.getString("CUSTOMERMANAGEMENT_ID")); pageData.put("CUSTOMERMANAGEMENT_ID", pd.getString("CUSTOMERMANAGEMENT_ID"));
pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
List<PageData> customercontactList = customerManagementService.findByCustomerManagementId(pageData); List<PageData> customercontactList = customerManagementService.findByCustomerManagementId(pageData);
pd.put("customercontactList", customercontactList); pd.put("customercontactList", customercontactList);
map.put("pd", pd); map.put("pd", pd);
@ -159,6 +162,7 @@ public class TrafficSecurityCustomerManagementController extends BaseController
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); // 修改人id pd.put("OPERATOR", Jurisdiction.getUSER_ID()); // 修改人id
pd.put("OPERATORNAME", Jurisdiction.getName()); // 修改人姓名 pd.put("OPERATORNAME", Jurisdiction.getName()); // 修改人姓名
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间 pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
// 修改 客户管理表 // 修改 客户管理表
customerManagementService.edit(pd); customerManagementService.edit(pd);
if (pd.getString("contacts") != null && !pd.getString("contacts").isEmpty()) { if (pd.getString("contacts") != null && !pd.getString("contacts").isEmpty()) {
@ -206,6 +210,7 @@ public class TrafficSecurityCustomerManagementController extends BaseController
pd.put("DELETOR", Jurisdiction.getUSER_ID());//删除人id pd.put("DELETOR", Jurisdiction.getUSER_ID());//删除人id
pd.put("DELETORNAME", Jurisdiction.getName());//删除人姓名 pd.put("DELETORNAME", Jurisdiction.getName());//删除人姓名
pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间 pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
customerManagementService.deleteContactById(pd); customerManagementService.deleteContactById(pd);
map.put("result", errInfo); map.put("result", errInfo);
return map; return map;

View File

@ -64,7 +64,6 @@ public class TrafficSecurityLocationManagementController extends BaseController
public Object listForSecurityLocationManagement(Page page) throws Exception { public Object listForSecurityLocationManagement(Page page) throws Exception {
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success"; String errInfo = "success";
PageData pd = new PageData(); PageData pd = new PageData();
pd = this.getPageData(); pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
@ -91,6 +90,7 @@ public class TrafficSecurityLocationManagementController extends BaseController
pd.put("DELETOR", Jurisdiction.getUSER_ID());//删除人id pd.put("DELETOR", Jurisdiction.getUSER_ID());//删除人id
pd.put("DELETORNAME", Jurisdiction.getUsername());//删除人姓名 pd.put("DELETORNAME", Jurisdiction.getUsername());//删除人姓名
pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间 pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
locationManagementService.delete(pd); locationManagementService.delete(pd);
map.put("result", errInfo); map.put("result", errInfo);
return map; return map;
@ -138,7 +138,7 @@ public class TrafficSecurityLocationManagementController extends BaseController
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); // 修改人id pd.put("OPERATOR", Jurisdiction.getUSER_ID()); // 修改人id
pd.put("OPERATORNAME", Jurisdiction.getName()); // 修改人姓名 pd.put("OPERATORNAME", Jurisdiction.getName()); // 修改人姓名
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间 pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
locationManagementService.edit(pd); locationManagementService.edit(pd);
map.put("result", errInfo); map.put("result", errInfo);

View File

@ -21,6 +21,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
@Controller @Controller
@RequestMapping("/waybillregistration") @RequestMapping("/waybillregistration")
@ -186,15 +187,19 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
pd = this.getPageData(); pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd = trafficSecurityWaybillRegistrationService.findById(pd);//根据ID读 pd = trafficSecurityWaybillRegistrationService.findById(pd);//根据ID读
List<String> dispatchers = Arrays.stream(pd.getString("DISPATCHER").split(",")).collect(Collectors.toList());
String[] dispatchers = pd.getString("DISPATCHER").split(",");
List<PageData> names = new ArrayList<>(); List<PageData> names = new ArrayList<>();
for (String dispatcher : dispatchers) { dispatchers.forEach(data -> {
PageData user = new PageData(); PageData user = new PageData();
user.put("USER_ID", dispatcher.trim()); user.put("USER_ID", data.trim());
PageData pageData1 = usersService.findById(user); PageData userInfo = null;
names.add(pageData1); try {
} userInfo = usersService.findById(user);
} catch (Exception e) {
throw new RuntimeException(e);
}
names.add(userInfo);
});
List<PageData> deptList = usersService.listUserbyDep(pd); List<PageData> deptList = usersService.listUserbyDep(pd);
pd.put("deptList", deptList); pd.put("deptList", deptList);
pd.put("names", names); pd.put("names", names);

View File

@ -10,7 +10,6 @@ import com.zcloud.util.Jurisdiction;
import com.zcloud.util.ObjectExcelView; import com.zcloud.util.ObjectExcelView;
import com.zcloud.util.Tools; import com.zcloud.util.Tools;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
@ -19,7 +18,6 @@ import org.springframework.web.servlet.ModelAndView;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.DoubleStream;
/** /**
* 使 * 使
@ -60,7 +58,7 @@ public class SafetyInvestmentUseController extends BaseController {
} }
/** /**
* @param out * @param
* @throws Exception * @throws Exception
*/ */
@RequestMapping(value="/delete") @RequestMapping(value="/delete")
@ -72,6 +70,7 @@ public class SafetyInvestmentUseController extends BaseController {
String errInfo = "success"; String errInfo = "success";
PageData pd = new PageData(); PageData pd = new PageData();
pd = this.getPageData(); pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
safetyinvestmentuseService.delete(pd); safetyinvestmentuseService.delete(pd);
map.put("result", errInfo); //返回结果 map.put("result", errInfo); //返回结果
return map; return map;
@ -90,6 +89,7 @@ public class SafetyInvestmentUseController extends BaseController {
String errInfo = "success"; String errInfo = "success";
PageData pd = new PageData(); PageData pd = new PageData();
pd = this.getPageData(); pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
safetyinvestmentuseService.edit(pd); safetyinvestmentuseService.edit(pd);
map.put("result", errInfo); map.put("result", errInfo);
return map; return map;
@ -111,6 +111,7 @@ public class SafetyInvestmentUseController extends BaseController {
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim()); if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
page.setPd(pd); page.setPd(pd);
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
List<PageData> varList = safetyinvestmentuseService.list(page); //列出SafetyInvestmentUse列表 List<PageData> varList = safetyinvestmentuseService.list(page); //列出SafetyInvestmentUse列表
map.put("varList", varList); map.put("varList", varList);
map.put("page", page); map.put("page", page);
@ -119,7 +120,7 @@ public class SafetyInvestmentUseController extends BaseController {
} }
/** /**
* @param page * @param
* @throws Exception * @throws Exception
*/ */
@RequestMapping(value="/listAll") @RequestMapping(value="/listAll")
@ -138,11 +139,20 @@ public class SafetyInvestmentUseController extends BaseController {
filter(data -> StringUtils.equals(data.getString("USE_TYPE"), "1")) filter(data -> StringUtils.equals(data.getString("USE_TYPE"), "1"))
.mapToDouble(data -> Double.valueOf(data.getString("AMOUNT"))).sum(); .mapToDouble(data -> Double.valueOf(data.getString("AMOUNT"))).sum();
varList.forEach(data -> { // 计算所有支出项目合计
}); List<PageData> allOutlayTotalList = new ArrayList<>();
varList.stream().filter(data -> StringUtils.equals(data.getString("USE_TYPE"), "2"))
.collect(Collectors.groupingBy(data -> data.getString("TYPE"))).forEach((key, value) -> {
PageData pageData = new PageData();
double total = value.stream().mapToDouble(data -> Double.valueOf(data.getString("AMOUNT"))).sum();
pageData.put("type", key);
pageData.put("total", total);
allOutlayTotalList.add(pageData);
});
map.put("drawingsTotal", drawingsTotal);
map.put("varList", varList); map.put("varList", varList);
map.put("drawingsTotal", drawingsTotal);
map.put("allOutlayTotalList", allOutlayTotalList);
map.put("result", errInfo); map.put("result", errInfo);
return map; return map;
} }
@ -187,7 +197,7 @@ public class SafetyInvestmentUseController extends BaseController {
}else{ }else{
errInfo = "error"; errInfo = "error";
} }
map.put("result", errInfo); //返回结果 map.put("result", errInfo); //返回结果
return map; return map;
} }

View File

@ -87,6 +87,8 @@
OPERATTIME = #{OPERATTIME} OPERATTIME = #{OPERATTIME}
where where
DRIVINGCOMMITMENT_ID = #{DRIVINGCOMMITMENT_ID} DRIVINGCOMMITMENT_ID = #{DRIVINGCOMMITMENT_ID}
and
CORPINFO_ID = #{CORPINFO_ID}
</update> </update>
<!--列表--> <!--列表-->
@ -122,6 +124,8 @@
<include refid="tableName"></include> f <include refid="tableName"></include> f
where where
f.DRIVINGCOMMITMENT_ID = #{DRIVINGCOMMITMENT_ID} f.DRIVINGCOMMITMENT_ID = #{DRIVINGCOMMITMENT_ID}
AND
f.CORPINFO_ID = #{CORPINFO_ID}
</select> </select>
<!-- 删除--> <!-- 删除-->
@ -134,5 +138,7 @@
DELETETIME = #{DELETETIME} DELETETIME = #{DELETETIME}
where where
DRIVINGCOMMITMENT_ID = #{DRIVINGCOMMITMENT_ID} DRIVINGCOMMITMENT_ID = #{DRIVINGCOMMITMENT_ID}
AND
CORPINFO_ID = #{CORPINFO_ID}
</delete> </delete>
</mapper> </mapper>

View File

@ -93,6 +93,8 @@
OPERATTIME = #{OPERATTIME} OPERATTIME = #{OPERATTIME}
where where
DRIVINGTYPE_ID = #{DRIVINGTYPE_ID} DRIVINGTYPE_ID = #{DRIVINGTYPE_ID}
AND
CORPINFO_ID = #{CORPINFO_ID}
</update> </update>
<!--列表--> <!--列表-->
@ -119,6 +121,8 @@
<include refid="tableName"></include> f <include refid="tableName"></include> f
where where
f.DRIVINGTYPE_ID = #{DRIVINGTYPE_ID} f.DRIVINGTYPE_ID = #{DRIVINGTYPE_ID}
AND
f.CORPINFO_ID = #{CORPINFO_ID}
</select> </select>
<!-- 删除--> <!-- 删除-->
@ -132,6 +136,8 @@
DELETETIME = #{DELETETIME} DELETETIME = #{DELETETIME}
where where
DRIVINGTYPE_ID = #{DRIVINGTYPE_ID} DRIVINGTYPE_ID = #{DRIVINGTYPE_ID}
AND
CORPINFO_ID = #{CORPINFO_ID}
</delete> </delete>
<select id="findCategory" parameterType="pd" resultType="pd"> <select id="findCategory" parameterType="pd" resultType="pd">

View File

@ -104,6 +104,8 @@
DELETETIME = #{DELETETIME} DELETETIME = #{DELETETIME}
where where
CUSTOMERMANAGEMENT_ID = #{CUSTOMERMANAGEMENT_ID} CUSTOMERMANAGEMENT_ID = #{CUSTOMERMANAGEMENT_ID}
AND
CORPINFO_ID = #{CORPINFO_ID}
</delete> </delete>
<!--列表--> <!--列表-->
@ -166,5 +168,6 @@
<include refid="tableName"></include> f <include refid="tableName"></include> f
where f.ISDELETE = 0 where f.ISDELETE = 0
AND f.CUSTOMERMANAGEMENT_ID = #{CUSTOMERMANAGEMENT_ID} AND f.CUSTOMERMANAGEMENT_ID = #{CUSTOMERMANAGEMENT_ID}
AND f.CORPINFO_ID = #{CORPINFO_ID}
</select> </select>
</mapper> </mapper>

View File

@ -79,6 +79,8 @@
ISDELETE = '1' ISDELETE = '1'
where where
SAFETYINVESTMENTUSE_ID = #{SAFETYINVESTMENTUSE_ID} SAFETYINVESTMENTUSE_ID = #{SAFETYINVESTMENTUSE_ID}
AND
CORPINFO_ID = #{CORPINFO_ID}
</delete> </delete>
<!-- 修改 --> <!-- 修改 -->
@ -99,6 +101,8 @@
SAFETYINVESTMENTUSE_ID = SAFETYINVESTMENTUSE_ID SAFETYINVESTMENTUSE_ID = SAFETYINVESTMENTUSE_ID
where where
SAFETYINVESTMENTUSE_ID = #{SAFETYINVESTMENTUSE_ID} SAFETYINVESTMENTUSE_ID = #{SAFETYINVESTMENTUSE_ID}
AND
CORPINFO_ID = #{CORPINFO_ID}
</update> </update>
<!-- 通过ID获取数据 --> <!-- 通过ID获取数据 -->
@ -117,7 +121,7 @@
<include refid="Field"></include> <include refid="Field"></include>
from from
<include refid="tableName"></include> f <include refid="tableName"></include> f
where f.ISDELETE = '0' where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 --> <if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and and
( (