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

View File

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

View File

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

View File

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

View File

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

View File

@ -10,7 +10,6 @@ import com.zcloud.util.Jurisdiction;
import com.zcloud.util.ObjectExcelView;
import com.zcloud.util.Tools;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@ -19,7 +18,6 @@ import org.springframework.web.servlet.ModelAndView;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.DoubleStream;
/**
* 使
@ -60,7 +58,7 @@ public class SafetyInvestmentUseController extends BaseController {
}
/**
* @param out
* @param
* @throws Exception
*/
@RequestMapping(value="/delete")
@ -72,6 +70,7 @@ public class SafetyInvestmentUseController extends BaseController {
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
safetyinvestmentuseService.delete(pd);
map.put("result", errInfo); //返回结果
return map;
@ -90,6 +89,7 @@ public class SafetyInvestmentUseController extends BaseController {
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
safetyinvestmentuseService.edit(pd);
map.put("result", errInfo);
return map;
@ -111,6 +111,7 @@ public class SafetyInvestmentUseController extends BaseController {
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
page.setPd(pd);
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
List<PageData> varList = safetyinvestmentuseService.list(page); //列出SafetyInvestmentUse列表
map.put("varList", varList);
map.put("page", page);
@ -119,7 +120,7 @@ public class SafetyInvestmentUseController extends BaseController {
}
/**
* @param page
* @param
* @throws Exception
*/
@RequestMapping(value="/listAll")
@ -138,11 +139,20 @@ public class SafetyInvestmentUseController extends BaseController {
filter(data -> StringUtils.equals(data.getString("USE_TYPE"), "1"))
.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("drawingsTotal", drawingsTotal);
map.put("allOutlayTotalList", allOutlayTotalList);
map.put("result", errInfo);
return map;
}

View File

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

View File

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

View File

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

View File

@ -79,6 +79,8 @@
ISDELETE = '1'
where
SAFETYINVESTMENTUSE_ID = #{SAFETYINVESTMENTUSE_ID}
AND
CORPINFO_ID = #{CORPINFO_ID}
</delete>
<!-- 修改 -->
@ -99,6 +101,8 @@
SAFETYINVESTMENTUSE_ID = SAFETYINVESTMENTUSE_ID
where
SAFETYINVESTMENTUSE_ID = #{SAFETYINVESTMENTUSE_ID}
AND
CORPINFO_ID = #{CORPINFO_ID}
</update>
<!-- 通过ID获取数据 -->
@ -117,7 +121,7 @@
<include refid="Field"></include>
from
<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 != ''"><!-- 关键词检索 -->
and
(