diff --git a/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityWaybillRegistrationController.java b/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityWaybillRegistrationController.java index 16817fa..be0121e 100644 --- a/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityWaybillRegistrationController.java +++ b/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityWaybillRegistrationController.java @@ -5,7 +5,9 @@ import com.zcloud.entity.Page; import com.zcloud.entity.PageData; import com.zcloud.service.comprehensive.TrafficDrivingCommitmentService; import com.zcloud.service.comprehensive.TrafficDrivingTypeService; +import com.zcloud.service.comprehensive.TrafficSecurityCustomerManagementService; import com.zcloud.service.comprehensive.TrafficSecurityWaybillRegistrationService; +import com.zcloud.service.system.UsersService; import com.zcloud.util.*; import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -16,10 +18,7 @@ import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; @Controller @RequestMapping("/waybillregistration") @@ -32,6 +31,13 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController @Autowired private TrafficDrivingTypeService trafficDrivingTypeService; + @Autowired + private TrafficSecurityCustomerManagementService trafficSecurityCustomerManagementService; + + + @Autowired + private UsersService usersService; + @RequestMapping(value = "/listForSecurityWaybillre") @ResponseBody public Object listForSecurityWaybillRegistra(Page page) throws Exception { @@ -160,4 +166,68 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController map.put("result", errInfo);//返回结果 return map; } + + + //详情 + @RequestMapping(value="/goEdit") + @ResponseBody + public Object getSecurityWaybillRegistrationInfo() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd = trafficSecurityWaybillRegistrationService.findById(pd);//根据ID读 + String[] dispatchers = pd.getString("DISPATCHER").split(","); + List names = new ArrayList<>(); + for (String dispatcher : dispatchers) { + // 通过 用户id获取用户名 + PageData user = new PageData(); + user.put("USER_ID",dispatcher.trim()); + PageData pageData1 = usersService.findById(user); + names.add(pageData1); + } + List deptList = usersService.listUserbyDep(pd); + pd.put("deptList",deptList); + pd.put("names",names); + map.put("pd", pd); + map.put("result", errInfo); + return map; + } + + + @RequestMapping(value="/getPrincipalContactList") + @ResponseBody + public Object getPrincipalContactList() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + List principalContactList = trafficSecurityCustomerManagementService.getPrincipalContactList(pd); + map.put("pd",principalContactList); + map.put("result", errInfo); + return map; + } + + + //修改 + @RequestMapping(value = "/edit") + @ResponseBody + public Object edit() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = this.getPageData(); + + pd.put("OPERATOR", Jurisdiction.getUSER_ID()); // 修改人id + pd.put("OPERATORNAME", Jurisdiction.getName()); // 修改人姓名 + pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间 + + trafficSecurityWaybillRegistrationService.edit(pd); + + map.put("result", errInfo); + map.put("pd", pd); + return map; + + } + } diff --git a/src/main/java/com/zcloud/mapper/datasource/comprehensive/TrafficSecurityCustomerManagementMapper.java b/src/main/java/com/zcloud/mapper/datasource/comprehensive/TrafficSecurityCustomerManagementMapper.java index 02bfd51..6218305 100644 --- a/src/main/java/com/zcloud/mapper/datasource/comprehensive/TrafficSecurityCustomerManagementMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/comprehensive/TrafficSecurityCustomerManagementMapper.java @@ -26,4 +26,6 @@ public interface TrafficSecurityCustomerManagementMapper { void delete(PageData pd); List getTrafficCustomerSelectList(PageData pd); + + List getPrincipalContactList(PageData pd); } diff --git a/src/main/java/com/zcloud/mapper/datasource/comprehensive/TrafficSecurityWaybillRegistrationMapper.java b/src/main/java/com/zcloud/mapper/datasource/comprehensive/TrafficSecurityWaybillRegistrationMapper.java index 181c60d..c6ae7c1 100644 --- a/src/main/java/com/zcloud/mapper/datasource/comprehensive/TrafficSecurityWaybillRegistrationMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/comprehensive/TrafficSecurityWaybillRegistrationMapper.java @@ -27,4 +27,6 @@ public interface TrafficSecurityWaybillRegistrationMapper { * @throws Exception */ PageData findById(PageData pd); + + void edit(PageData pd); } diff --git a/src/main/java/com/zcloud/service/comprehensive/TrafficSecurityCustomerManagementService.java b/src/main/java/com/zcloud/service/comprehensive/TrafficSecurityCustomerManagementService.java index 52fb4a9..e1c4845 100644 --- a/src/main/java/com/zcloud/service/comprehensive/TrafficSecurityCustomerManagementService.java +++ b/src/main/java/com/zcloud/service/comprehensive/TrafficSecurityCustomerManagementService.java @@ -15,4 +15,6 @@ public interface TrafficSecurityCustomerManagementService { void delete(PageData pd); List getTrafficCustomerSelectList(PageData pd) throws Exception; + + List getPrincipalContactList(PageData pd); } diff --git a/src/main/java/com/zcloud/service/comprehensive/TrafficSecurityWaybillRegistrationService.java b/src/main/java/com/zcloud/service/comprehensive/TrafficSecurityWaybillRegistrationService.java index 251b572..80f7adf 100644 --- a/src/main/java/com/zcloud/service/comprehensive/TrafficSecurityWaybillRegistrationService.java +++ b/src/main/java/com/zcloud/service/comprehensive/TrafficSecurityWaybillRegistrationService.java @@ -13,4 +13,6 @@ public interface TrafficSecurityWaybillRegistrationService { void delete(PageData pd); PageData findById(PageData pd); + + void edit(PageData pd); } diff --git a/src/main/java/com/zcloud/service/comprehensive/impl/TrafficSecurityCustomerManagementServiceImpl.java b/src/main/java/com/zcloud/service/comprehensive/impl/TrafficSecurityCustomerManagementServiceImpl.java index 8c06faa..84f6376 100644 --- a/src/main/java/com/zcloud/service/comprehensive/impl/TrafficSecurityCustomerManagementServiceImpl.java +++ b/src/main/java/com/zcloud/service/comprehensive/impl/TrafficSecurityCustomerManagementServiceImpl.java @@ -40,4 +40,9 @@ public class TrafficSecurityCustomerManagementServiceImpl implements TrafficSecu public List getTrafficCustomerSelectList(PageData pd) throws Exception { return customerManagementMapper.getTrafficCustomerSelectList(pd); } + + @Override + public List getPrincipalContactList(PageData pd) { + return customerManagementMapper.getPrincipalContactList(pd); + } } diff --git a/src/main/java/com/zcloud/service/comprehensive/impl/TrafficSecurityWaybillRegistrationServiceImpl.java b/src/main/java/com/zcloud/service/comprehensive/impl/TrafficSecurityWaybillRegistrationServiceImpl.java index 710638f..e99a51b 100644 --- a/src/main/java/com/zcloud/service/comprehensive/impl/TrafficSecurityWaybillRegistrationServiceImpl.java +++ b/src/main/java/com/zcloud/service/comprehensive/impl/TrafficSecurityWaybillRegistrationServiceImpl.java @@ -32,4 +32,9 @@ public class TrafficSecurityWaybillRegistrationServiceImpl implements TrafficSec public PageData findById(PageData pd) { return TrafficSecurityWaybillRegistrationMapper.findById(pd); } + + @Override + public void edit(PageData pd) { + TrafficSecurityWaybillRegistrationMapper.edit(pd); + } } diff --git a/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityCustomerManagementMapper.xml b/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityCustomerManagementMapper.xml index eb3bd6b..304afcc 100644 --- a/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityCustomerManagementMapper.xml +++ b/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityCustomerManagementMapper.xml @@ -129,4 +129,15 @@ and f.CUSTOMERTYPE = #{CUSTOMERTYPE} + + diff --git a/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityWaybillRegistrationMapper.xml b/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityWaybillRegistrationMapper.xml index 89ffd26..a6e1b1e 100644 --- a/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityWaybillRegistrationMapper.xml +++ b/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityWaybillRegistrationMapper.xml @@ -43,7 +43,8 @@ f.CORPINFO_ID, f.PRACTITIONERTYPE, f.PRACTITIONER, - f.CONFIRMINGPHONE + f.CONFIRMINGPHONE, + f.DEPARTMENT_ID @@ -80,7 +81,8 @@ IDENTITYID, CORPINFO_ID, PRACTITIONERTYPE, - CONFIRMINGPHONE + CONFIRMINGPHONE, + DEPARTMENT_ID @@ -117,7 +119,8 @@ #{IDENTITYID}, #{CORPINFO_ID}, #{PRACTITIONERTYPE}, - #{CONFIRMINGPHONE} + #{CONFIRMINGPHONE}, + #{DEPARTMENT_ID} @@ -144,6 +147,42 @@ WAYBILLREGISTRATION_ID = #{WAYBILLREGISTRATION_ID} + + update + f + set + f.WAYBILLREGISTRATION_ID = #{WAYBILLREGISTRATION_ID}, + f.WAYBILLNUMBER = #{WAYBILLNUMBER}, + f.WAYBILLSTATUS = #{WAYBILLSTATUS}, + f.TRANSPORTVEHICLE = #{TRANSPORTVEHICLE}, + f.CLIENT = #{CLIENT}, + f.CONFIRMER = #{CONFIRMER}, + f.ORIGIN = #{ORIGIN}, + f.DESTINATION = #{DESTINATION}, + f.OPERATOR = #{OPERATOR}, + f.OPERATORNAME = #{OPERATORNAME}, + f.OPERATTIME = #{OPERATTIME}, + f.CLIENTCONTACTPERSON = #{CLIENTCONTACTPERSON}, + f.CLIENTCONTACTPHONE = #{CLIENTCONTACTPHONE}, + f.CONFIRMINGPERSON = #{CONFIRMINGPERSON}, + f.DISPATCHER = #{DISPATCHER}, + f.PRACTITIONER = #{PRACTITIONER}, + f.SHIPPINGDATE = #{SHIPPINGDATE}, + f.SHIPPINGADDRESS = #{SHIPPINGADDRESS}, + f.DESTINATIONADDRESS = #{DESTINATIONADDRESS}, + f.STARTADMINISTRATIVEAREA = #{STARTADMINISTRATIVEAREA}, + f.ENDDMINISTRATIVEAREA = #{ENDDMINISTRATIVEAREA}, + f.TRUCKCART = #{TRUCKCART}, + f.EMPLOYEEPHONE = #{EMPLOYEEPHONE}, + f.IDENTITYID = #{IDENTITYID}, + f.CORPINFO_ID = #{CORPINFO_ID}, + f.PRACTITIONERTYPE = #{PRACTITIONERTYPE}, + f.CONFIRMINGPHONE = #{CONFIRMINGPHONE}, + f.DEPARTMENT_ID = #{DEPARTMENT_ID} + where + f.WAYBILLREGISTRATION_ID = #{WAYBILLREGISTRATION_ID} + + update @@ -152,6 +191,7 @@ where WAYBILLREGISTRATION_ID = #{WAYBILLREGISTRATION_ID} + + +