diff --git a/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java b/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java index f13a573..5ec03bc 100644 --- a/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java +++ b/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java @@ -248,6 +248,7 @@ public class FreighttTrailerController extends BaseController { return map; } + /**导出到excel * @param * @throws Exception diff --git a/src/main/java/com/zcloud/controller/inspectAnnually/InspectAnnuallyController.java b/src/main/java/com/zcloud/controller/inspectAnnually/InspectAnnuallyController.java index 3a86a98..d9d4545 100644 --- a/src/main/java/com/zcloud/controller/inspectAnnually/InspectAnnuallyController.java +++ b/src/main/java/com/zcloud/controller/inspectAnnually/InspectAnnuallyController.java @@ -10,16 +10,16 @@ import com.zcloud.service.operatingvehicles.OperatingVehiclesService; import com.zcloud.service.system.ImgFilesService; import com.zcloud.util.DateUtil; import com.zcloud.util.Jurisdiction; +import com.zcloud.util.ObjectExcelView; +import com.zcloud.util.Tools; import org.apache.commons.lang.StringUtils; 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.ResponseBody; +import org.springframework.web.servlet.ModelAndView; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; /** * 年检管理 @@ -228,5 +228,68 @@ public class InspectAnnuallyController extends BaseController { } + /**导出到excel + * @param + * @throws Exception + */ + @RequestMapping(value="/excel") +// // @RequiresPermissions("toExcel") + public ModelAndView exportExcel() throws Exception{ + ModelAndView mv = new ModelAndView(); + PageData pd = new PageData(); + pd = this.getPageData(); + String DATA_IDS = pd.getString("DATA_IDS"); + if(Tools.notEmpty(DATA_IDS)){ + String[] ArrayDATA_IDS = DATA_IDS.split(","); + pd.put("ArrayDATA_IDS",ArrayDATA_IDS); + } + Map dataMap = new HashMap(); + List titles = new ArrayList(); + titles.add("年检车辆"); //1 + titles.add("车架号"); //2 + //titles.add("车身编号"); //3 + titles.add("车辆类型"); //4 + titles.add("运营证号"); //5 + titles.add("归属部门"); //6 + titles.add("车主"); //7 + titles.add("车主电话"); //8 + titles.add("初登日期"); //9 + titles.add("发证日期"); //10 + titles.add("到期日期"); //11 + titles.add("车辆品牌"); //12 + titles.add("车辆型号"); //13 + titles.add("核定总质量"); //14 + titles.add("核定载质量"); //15 + //titles.add("容积"); //16 + dataMap.put("titles", titles); + List varOList = inspectAnnuallyService.listOut(pd); + List varList = new ArrayList(); + for(int i=0;i dataMap = new HashMap(); + List titles = new ArrayList(); + titles.add("车牌号"); //1 + titles.add("车架号"); //2 + //titles.add("车身编号"); //3 + titles.add("车辆类型"); //4 + titles.add("运营证号"); //5 + titles.add("归属部门"); //6 + titles.add("车主"); //7 + titles.add("车主电话"); //8 + titles.add("初登日期"); //9 + titles.add("发证日期"); //10 + titles.add("到期日期"); //11 + titles.add("车辆品牌"); //12 + titles.add("车辆型号"); //13 + titles.add("核定总质量"); //14 + titles.add("核定载质量"); //15 + //titles.add("容积"); //16 + dataMap.put("titles", titles); + List varOList = operatingVehiclesService.listOut(pd); + List varList = new ArrayList(); + for(int i=0;i map = new HashMap(); String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); - page.setPd(pd); - List userList = usersService.userSelectPersonTypelistPage(page);//列出用户列表 + //page.setPd(pd); + List userList = usersService.userSelectPersonTypelist(pd);//列出用户列表 map.put("userList", userList); - map.put("page", page); + //map.put("page", page); map.put("pd", pd); - map.put("result", errInfo); return map; } diff --git a/src/main/java/com/zcloud/mapper/datasource/inspectAnnually/InspectAnnuallyMapper.java b/src/main/java/com/zcloud/mapper/datasource/inspectAnnually/InspectAnnuallyMapper.java index 78f1a6c..f8eadcc 100644 --- a/src/main/java/com/zcloud/mapper/datasource/inspectAnnually/InspectAnnuallyMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/inspectAnnually/InspectAnnuallyMapper.java @@ -61,5 +61,7 @@ public interface InspectAnnuallyMapper { List annuallyList(Page page); + + List listOut(PageData pd); } diff --git a/src/main/java/com/zcloud/mapper/datasource/operatingvehicles/OperatingVehiclesMapper.java b/src/main/java/com/zcloud/mapper/datasource/operatingvehicles/OperatingVehiclesMapper.java index 0755e0f..d342cee 100644 --- a/src/main/java/com/zcloud/mapper/datasource/operatingvehicles/OperatingVehiclesMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/operatingvehicles/OperatingVehiclesMapper.java @@ -41,4 +41,6 @@ public interface OperatingVehiclesMapper { PageData findByfindByPlateNumber(PageData pd); void setScrapStatus(PageData pd); + + List listOut(PageData pd); } diff --git a/src/main/java/com/zcloud/mapper/datasource/system/UsersMapper.java b/src/main/java/com/zcloud/mapper/datasource/system/UsersMapper.java index 1d757d3..3ae43e1 100644 --- a/src/main/java/com/zcloud/mapper/datasource/system/UsersMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/system/UsersMapper.java @@ -272,7 +272,7 @@ public interface UsersMapper { List studentlist(PageData pd); - List userSelectPersonTypelistPage(Page page); + List userSelectPersonTypelistPage(PageData pd); /**从业人员列表 //userlistPage(Page page) * @param page @@ -293,4 +293,6 @@ public interface UsersMapper { * @param pd */ void editPractitioner(PageData pd); + + List userSelectPersonTypelist(PageData pd); } diff --git a/src/main/java/com/zcloud/service/inspectAnnually/InspectAnnuallyService.java b/src/main/java/com/zcloud/service/inspectAnnually/InspectAnnuallyService.java index 27a5698..373727a 100644 --- a/src/main/java/com/zcloud/service/inspectAnnually/InspectAnnuallyService.java +++ b/src/main/java/com/zcloud/service/inspectAnnually/InspectAnnuallyService.java @@ -61,5 +61,7 @@ public interface InspectAnnuallyService { List annuallyList(Page page); + + List listOut(PageData pd); } diff --git a/src/main/java/com/zcloud/service/inspectAnnually/impl/InspectAnnuallyServiceImpl.java b/src/main/java/com/zcloud/service/inspectAnnually/impl/InspectAnnuallyServiceImpl.java index 3664e3d..543eba4 100644 --- a/src/main/java/com/zcloud/service/inspectAnnually/impl/InspectAnnuallyServiceImpl.java +++ b/src/main/java/com/zcloud/service/inspectAnnually/impl/InspectAnnuallyServiceImpl.java @@ -87,6 +87,11 @@ public class InspectAnnuallyServiceImpl implements InspectAnnuallyService { return inspectAnnuallyMapper.annuallyList(page); } + @Override + public List listOut(PageData pd) { + return inspectAnnuallyMapper.listOut(pd); + } + } diff --git a/src/main/java/com/zcloud/service/operatingvehicles/OperatingVehiclesService.java b/src/main/java/com/zcloud/service/operatingvehicles/OperatingVehiclesService.java index adbc037..213a58c 100644 --- a/src/main/java/com/zcloud/service/operatingvehicles/OperatingVehiclesService.java +++ b/src/main/java/com/zcloud/service/operatingvehicles/OperatingVehiclesService.java @@ -41,4 +41,6 @@ public interface OperatingVehiclesService { PageData findByfindByPlateNumber(PageData pd); void setScrapStatus(PageData pd); + + List listOut(PageData pd); } diff --git a/src/main/java/com/zcloud/service/operatingvehicles/impl/OperatingVehiclesServiceImpl.java b/src/main/java/com/zcloud/service/operatingvehicles/impl/OperatingVehiclesServiceImpl.java index f4f7c02..340c82f 100644 --- a/src/main/java/com/zcloud/service/operatingvehicles/impl/OperatingVehiclesServiceImpl.java +++ b/src/main/java/com/zcloud/service/operatingvehicles/impl/OperatingVehiclesServiceImpl.java @@ -61,4 +61,9 @@ public class OperatingVehiclesServiceImpl implements OperatingVehiclesService { public void setScrapStatus(PageData pd) { operatingVehiclesMapper.setScrapStatus(pd); } + + @Override + public List listOut(PageData pd) { + return operatingVehiclesMapper.listOut(pd); + } } diff --git a/src/main/java/com/zcloud/service/system/UsersService.java b/src/main/java/com/zcloud/service/system/UsersService.java index 0cb0208..6b2b556 100644 --- a/src/main/java/com/zcloud/service/system/UsersService.java +++ b/src/main/java/com/zcloud/service/system/UsersService.java @@ -318,7 +318,7 @@ public interface UsersService { void setState(PageData request) throws Exception; - List userSelectPersonTypelistPage(Page page); + List userSelectPersonTypelistPage(PageData pageData); List studentlist(PageData pd) throws Exception; @@ -366,4 +366,6 @@ public interface UsersService { * @param pd */ void setPractitionerConfirm(PageData pd) throws Exception; + + List userSelectPersonTypelist(PageData pd); } diff --git a/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java b/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java index 7bd395f..2433d22 100644 --- a/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java +++ b/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java @@ -669,8 +669,8 @@ public class UsersServiceImpl implements UsersService { } @Override - public List userSelectPersonTypelistPage(Page page) { - return usersMapper.userSelectPersonTypelistPage(page); + public List userSelectPersonTypelistPage(PageData pd) { + return usersMapper.userSelectPersonTypelistPage(pd); } /** @@ -1328,4 +1328,9 @@ public class UsersServiceImpl implements UsersService { public void setPractitionerConfirm(PageData pd) throws Exception { usersMapper.setPractitionerReview(pd); } + + @Override + public List userSelectPersonTypelist(PageData pd) { + return usersMapper.userSelectPersonTypelist(pd); + } } diff --git a/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityAccidentInvestigationMapper.xml b/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityAccidentInvestigationMapper.xml index ae400f2..784c719 100644 --- a/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityAccidentInvestigationMapper.xml +++ b/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityAccidentInvestigationMapper.xml @@ -349,8 +349,8 @@ and f.ACCIDENTDATE = #{pd.ACCIDENTDATE} - ORDER BY OPERATTIME DESC - ORDER BY f.CREATETIME DESC + ORDER BY f.OPERATTIME DESC + @@ -222,4 +223,6 @@ AND f.CORPINFO_ID = #{pd.CORPINFO_ID} + + diff --git a/src/main/resources/mybatis/datasource/operatingvehicles/OperatingVehiclesMapper.xml b/src/main/resources/mybatis/datasource/operatingvehicles/OperatingVehiclesMapper.xml index b250e8f..1922030 100644 --- a/src/main/resources/mybatis/datasource/operatingvehicles/OperatingVehiclesMapper.xml +++ b/src/main/resources/mybatis/datasource/operatingvehicles/OperatingVehiclesMapper.xml @@ -553,5 +553,17 @@ where f.ISDELETE = '0' and f.CORPINFO_ID = #{corpId} + + diff --git a/src/main/resources/mybatis/datasource/system/UsersMapper.xml b/src/main/resources/mybatis/datasource/system/UsersMapper.xml index 98f525f..6b825da 100644 --- a/src/main/resources/mybatis/datasource/system/UsersMapper.xml +++ b/src/main/resources/mybatis/datasource/system/UsersMapper.xml @@ -1621,9 +1621,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order by d.LEVEL asc ,d.DEP_ORDER,d.DEPARTMENT_ID asc, u.SORT asc,u.LAST_LOGIN desc - - + select + u.USER_ID, u.USERNAME, u.PASSWORD, u.LAST_LOGIN, @@ -1644,6 +1644,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and d.DICTIONARIES_ID = '5ae743c76dbf496eb1b5101075b073d5' + +