forked from integrated_whb/integrated_whb
parent
c12d2c7774
commit
48a21ed00d
|
@ -0,0 +1,73 @@
|
|||
package com.zcloud.controller.comprehensive;
|
||||
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.comprehensive.TrafficSecurityLocationManagementService;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import com.zcloud.util.Tools;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/securitylocation")
|
||||
public class TrafficSecurityLocationManagementController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private TrafficSecurityLocationManagementService locationManagementService;
|
||||
//新增
|
||||
@RequestMapping(value = "/add")
|
||||
@ResponseBody
|
||||
public Object add() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
|
||||
String locationmanagement_id = this.get32UUID();
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 创建人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); // 创建人姓名
|
||||
pd.put("LOCATIONMANAGEMENT_ID", locationmanagement_id); // 主键
|
||||
pd.put("CREATETIME", DateUtil.date2Str(new Date())); // 添加时间
|
||||
pd.put("ISDELETE", "0");
|
||||
|
||||
locationManagementService.save(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("pd", pd);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/listForSecurityLocationManagement")
|
||||
@ResponseBody
|
||||
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();
|
||||
|
||||
String LOCATIONTYPE = pd.getString("LOCATIONTYPE"); // 关键词检索条件
|
||||
if (Tools.notEmpty(LOCATIONTYPE))
|
||||
pd.put("LOCATIONTYPE", LOCATIONTYPE.trim());
|
||||
|
||||
String TRANSPORTATIONCOMPANY = pd.getString("TRANSPORTATIONCOMPANY"); // 关键词检索条件
|
||||
if (Tools.notEmpty(TRANSPORTATIONCOMPANY))
|
||||
pd.put("REPLYSTTRANSPORTATIONCOMPANYATUS", TRANSPORTATIONCOMPANY.trim());
|
||||
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = locationManagementService.listForSecurityLocationManagement(page);
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
|
@ -41,6 +41,7 @@ public class TrafficSecurityNoticeController extends BaseController {
|
|||
String notificationId = this.get32UUID();
|
||||
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 创建人id
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getPOST_ID()); // 创建人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); // 创建人姓名
|
||||
pd.put("NOTIFICATION_ID", notificationId); // 主键
|
||||
pd.put("CREATETIME", DateUtil.date2Str(new Date())); // 添加时间
|
||||
|
|
|
@ -45,6 +45,7 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
|
|||
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = trafficSecurityWaybillRegistrationService.listForSecurityNotice(page);
|
||||
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
|
@ -82,6 +83,13 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
|
|||
pd.put("CREATETIME", DateUtil.date2Str(new Date())); // 添加时间
|
||||
pd.put("WAYBILLNUMBER", this.get32UUID()); // 添加时间
|
||||
pd.put("ISDELETE", "0");
|
||||
Date shippingDate = DateUtil.str2Date(pd.getString("SHIPPINGDATE"));
|
||||
if (shippingDate != null && shippingDate.after(new Date())) {
|
||||
pd.put("WAYBILLSTATUS", "1");
|
||||
} else {
|
||||
pd.put("WAYBILLSTATUS", "0");
|
||||
}
|
||||
|
||||
trafficSecurityWaybillRegistrationService.save(pd);
|
||||
|
||||
map.put("result", errInfo);
|
||||
|
|
|
@ -8,6 +8,11 @@ import java.util.List;
|
|||
|
||||
@Mapper
|
||||
public interface TrafficSecurityCustomerManagementMapper {
|
||||
/**
|
||||
* 新增
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
package com.zcloud.mapper.datasource.comprehensive;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface TrafficSecurityLocationManagementMapper {
|
||||
/**
|
||||
* 新增
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**
|
||||
* 列表
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.zcloud.service.comprehensive;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TrafficSecurityLocationManagementService {
|
||||
void save(PageData pd);
|
||||
|
||||
List<PageData> listForSecurityLocationManagement(Page page);
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.zcloud.service.comprehensive.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.comprehensive.TrafficSecurityLocationManagementMapper;
|
||||
import com.zcloud.service.comprehensive.TrafficSecurityLocationManagementService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class TrafficSecurityLocationManagementServiceImpl implements TrafficSecurityLocationManagementService {
|
||||
@Autowired
|
||||
private TrafficSecurityLocationManagementMapper locationManagementMapper;
|
||||
@Override
|
||||
public void save(PageData pd) {
|
||||
locationManagementMapper.save(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listForSecurityLocationManagement(Page page) {
|
||||
return locationManagementMapper.datalistPage(page);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,107 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.comprehensive.TrafficSecurityLocationManagementMapper">
|
||||
<sql id="tableName">
|
||||
BUS_TRAFFIC_LOCATION_MANAGEMENT
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于查询 -->
|
||||
<sql id="Field">
|
||||
f.LOCATIONMANAGEMENT_ID,
|
||||
f.LOCATIONTYPE,
|
||||
f.LOCATIONNAME,
|
||||
f.ADDRESSDETAILS,
|
||||
f.ADMINISTRATIVEREGIONS,
|
||||
f.TRANSPORTATIONCOMPANY,
|
||||
f.ISDELETE,
|
||||
f.DELETOR,
|
||||
f.DELETORNAME,
|
||||
f.DELETETIME,
|
||||
f.CREATOR,
|
||||
f.CREATORNAME,
|
||||
f.CREATETIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATORNAME,
|
||||
f.LONGITUDE,
|
||||
f.LATITUDE,
|
||||
f.OPERATTIME
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
LOCATIONMANAGEMENT_ID,
|
||||
LOCATIONTYPE,
|
||||
LOCATIONNAME,
|
||||
ADDRESSDETAILS,
|
||||
ADMINISTRATIVEREGIONS,
|
||||
TRANSPORTATIONCOMPANY,
|
||||
ISDELETE,
|
||||
DELETOR,
|
||||
DELETORNAME,
|
||||
DELETETIME,
|
||||
CREATOR,
|
||||
CREATORNAME,
|
||||
CREATETIME,
|
||||
OPERATOR,
|
||||
OPERATORNAME,
|
||||
LONGITUDE,
|
||||
LATITUDE,
|
||||
OPERATTIME
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{LOCATIONMANAGEMENT_ID},
|
||||
#{LOCATIONTYPE},
|
||||
#{LOCATIONNAME},
|
||||
#{ADDRESSDETAILS},
|
||||
#{ADMINISTRATIVEREGIONS},
|
||||
#{TRANSPORTATIONCOMPANY},
|
||||
#{ISDELETE},
|
||||
#{DELETOR},
|
||||
#{DELETORNAME},
|
||||
#{DELETETIME},
|
||||
#{CREATOR},
|
||||
#{CREATORNAME},
|
||||
#{CREATETIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATORNAME},
|
||||
#{LONGITUDE},
|
||||
#{LATITUDE},
|
||||
#{OPERATTIME}
|
||||
</sql>
|
||||
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!--列表-->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
f.*,
|
||||
i.CORP_NAME
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join bus_corp_info i on f.TRANSPORTATIONCOMPANY = i.CORPINFO_ID
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.LOCATIONTYPE != null and pd.LOCATIONTYPE != ''"><!-- 关键词检索-客户类型 -->
|
||||
and f.LOCATIONTYPE = #{pd.LOCATIONTYPE}
|
||||
</if>
|
||||
<if test="pd.TRANSPORTATIONCOMPANY != null and pd.TRANSPORTATIONCOMPANY != ''"><!-- 关键词检索-运输企业 -->
|
||||
and f.TRANSPORTATIONCOMPANY = #{pd.TRANSPORTATIONCOMPANY}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
|
@ -35,6 +35,7 @@
|
|||
f.OPERATTIME,
|
||||
f.PRACTITIONERTYPE,
|
||||
f.TYPE,
|
||||
f.SIGNING,
|
||||
f.TRANSPORTATIONCOMPANY
|
||||
</sql>
|
||||
|
||||
|
@ -61,6 +62,7 @@
|
|||
OPERATORNAME,
|
||||
OPERATTIME,
|
||||
TYPE,
|
||||
SIGNING,
|
||||
PRACTITIONERTYPE
|
||||
</sql>
|
||||
|
||||
|
@ -87,6 +89,7 @@
|
|||
#{OPERATORNAME},
|
||||
#{OPERATTIME},
|
||||
#{TYPE},
|
||||
#{SIGNING},
|
||||
#{PRACTITIONERTYPE}
|
||||
</sql>
|
||||
|
||||
|
|
Loading…
Reference in New Issue