forked from integrated_whb/integrated_whb
BUG优化
parent
e7f5125534
commit
bce5400d80
|
@ -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<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd = trafficSecurityWaybillRegistrationService.findById(pd);//根据ID读
|
||||
String[] dispatchers = pd.getString("DISPATCHER").split(",");
|
||||
List<PageData> 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<PageData> 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<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
List<PageData> principalContactList = trafficSecurityCustomerManagementService.getPrincipalContactList(pd);
|
||||
map.put("pd",principalContactList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
//修改
|
||||
@RequestMapping(value = "/edit")
|
||||
@ResponseBody
|
||||
public Object edit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
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;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -26,4 +26,6 @@ public interface TrafficSecurityCustomerManagementMapper {
|
|||
void delete(PageData pd);
|
||||
|
||||
List<PageData> getTrafficCustomerSelectList(PageData pd);
|
||||
|
||||
List<PageData> getPrincipalContactList(PageData pd);
|
||||
}
|
||||
|
|
|
@ -27,4 +27,6 @@ public interface TrafficSecurityWaybillRegistrationMapper {
|
|||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
void edit(PageData pd);
|
||||
}
|
||||
|
|
|
@ -15,4 +15,6 @@ public interface TrafficSecurityCustomerManagementService {
|
|||
void delete(PageData pd);
|
||||
|
||||
List<PageData> getTrafficCustomerSelectList(PageData pd) throws Exception;
|
||||
|
||||
List<PageData> getPrincipalContactList(PageData pd);
|
||||
}
|
||||
|
|
|
@ -13,4 +13,6 @@ public interface TrafficSecurityWaybillRegistrationService {
|
|||
void delete(PageData pd);
|
||||
|
||||
PageData findById(PageData pd);
|
||||
|
||||
void edit(PageData pd);
|
||||
}
|
||||
|
|
|
@ -40,4 +40,9 @@ public class TrafficSecurityCustomerManagementServiceImpl implements TrafficSecu
|
|||
public List<PageData> getTrafficCustomerSelectList(PageData pd) throws Exception {
|
||||
return customerManagementMapper.getTrafficCustomerSelectList(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getPrincipalContactList(PageData pd) {
|
||||
return customerManagementMapper.getPrincipalContactList(pd);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -129,4 +129,15 @@
|
|||
and f.CUSTOMERTYPE = #{CUSTOMERTYPE}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getPrincipalContactList" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
f.*
|
||||
FROM
|
||||
bus_traffic_customer_contact f
|
||||
LEFT JOIN bus_traffic_customer_management btcm on btcm.CUSTOMERMANAGEMENT_ID = f.CUSTOMERMANAGEMENT_ID
|
||||
WHERE
|
||||
btcm.ISDELETE = '0' AND btcm.CORPINFO_ID = #{CORPINFO_ID}
|
||||
and btcm.CUSTOMERNAME_ID = #{CLIENT_ID}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -43,7 +43,8 @@
|
|||
f.CORPINFO_ID,
|
||||
f.PRACTITIONERTYPE,
|
||||
f.PRACTITIONER,
|
||||
f.CONFIRMINGPHONE
|
||||
f.CONFIRMINGPHONE,
|
||||
f.DEPARTMENT_ID
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
|
@ -80,7 +81,8 @@
|
|||
IDENTITYID,
|
||||
CORPINFO_ID,
|
||||
PRACTITIONERTYPE,
|
||||
CONFIRMINGPHONE
|
||||
CONFIRMINGPHONE,
|
||||
DEPARTMENT_ID
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
|
@ -117,7 +119,8 @@
|
|||
#{IDENTITYID},
|
||||
#{CORPINFO_ID},
|
||||
#{PRACTITIONERTYPE},
|
||||
#{CONFIRMINGPHONE}
|
||||
#{CONFIRMINGPHONE},
|
||||
#{DEPARTMENT_ID}
|
||||
</sql>
|
||||
|
||||
|
||||
|
@ -144,6 +147,42 @@
|
|||
WAYBILLREGISTRATION_ID = #{WAYBILLREGISTRATION_ID}
|
||||
</delete>
|
||||
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"/> 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>
|
||||
|
||||
<update id="editStatus" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
|
@ -152,6 +191,7 @@
|
|||
where
|
||||
WAYBILLREGISTRATION_ID = #{WAYBILLREGISTRATION_ID}
|
||||
</update>
|
||||
|
||||
<!--列表-->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
|
@ -206,7 +246,11 @@
|
|||
b2.LOCATIONNAME AS DESTINATION_NAME,
|
||||
m.CUSTOMERNAME AS CLIENT_NAME,
|
||||
e.FRAMES_NUMBER AS VIN,
|
||||
c2.CUSTOMERNAME AS CONFIRMER_NAME
|
||||
c2.CUSTOMERNAME AS CONFIRMER_NAME,
|
||||
btcc.CONTACT AS ENTRUST_PERSON,
|
||||
btcc2.CONTACT AS CONFIRM_PERSON,
|
||||
b.ADDRESSDETAILS AS SHIPPING_ADDR,
|
||||
b2.ADDRESSDETAILS AS DESTINATION_ADDR
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join bus_traffic_operatingvehicle e on f.TRANSPORTVEHICLE = e.PLATE_NUMBER
|
||||
|
@ -218,8 +262,12 @@
|
|||
left join bus_traffic_location_management b2 on f.DESTINATION = b2.LOCATIONNAME_ID
|
||||
left join bus_traffic_customer_management m on f.CLIENT = m.CUSTOMERNAME_ID
|
||||
left join bus_traffic_customer_management c2 on f.CONFIRMER = c2.CUSTOMERNAME_ID
|
||||
left join bus_traffic_customer_contact btcc on btcc.CONTACT_ID = f.CLIENTCONTACTPERSON
|
||||
left join bus_traffic_customer_contact btcc2 on btcc2.CONTACT_ID = f.CONFIRMINGPERSON
|
||||
where
|
||||
f.WAYBILLREGISTRATION_ID = #{WAYBILLREGISTRATION_ID}
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue