Commit 8a6d8bc9 authored by Administrator's avatar Administrator

修改了groupList,conutyList,typeList,派出所申领表,交接单,出入库时间,出入库数

parent f73676d5
...@@ -330,38 +330,6 @@ public class UserApi { ...@@ -330,38 +330,6 @@ public class UserApi {
return yxjsonResponse.toJSONString(); return yxjsonResponse.toJSONString();
} }
/**
* 下载装箱单
*/
@RequestMapping("printPackingList")
// @RequiresPermissions("userInfo.add")//权限管理;
public byte[] printPackingList(@RequestParam("cyclesheetID") String taskID, HttpServletResponse response) {
// cyclesheetID ="20180802032";
response.setContentType("application/x-download");
response.setCharacterEncoding("UTF-8");
String dateTime = DateFormatUtils.format(new Date(), "yyyyMMddHH");
// //使用Servlet实现文件下载的时候,避免浏览器自动打开文件
String fout = null;
List<Map<String, Object>> countyInfoList = groupNoService.findCountyInfoList(taskID);
List<TaskEntity> taskEntities = taskService.findProductionTaskListEntityByID(Long.valueOf(taskID));
fout = exportExcel(countyInfoList, taskEntities.get(0).getCard_Type() + "", "p1", 6000, taskEntities.get(0).getCitycode(), dateTime, taskID);
String outFile = dateTime + taskEntities.get(0).getCitycode() + "二代身份证统计表";
try {
FileInputStream fis = new FileInputStream(new File(fout));
byte[] b = new byte[fis.available()];
fis.read(b);
fis.close();
response.addHeader("Content-Disposition", "attachment;filename=" + outFile + ".xls");
return b;
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
/** /**
* 通过任务单查询区县列表; * 通过任务单查询区县列表;
* *
...@@ -369,8 +337,8 @@ public class UserApi { ...@@ -369,8 +337,8 @@ public class UserApi {
*/ */
@RequestMapping("getCountyListByTaskListId") @RequestMapping("getCountyListByTaskListId")
// @RequiresPermissions("userInfo.add")//权限管理; // @RequiresPermissions("userInfo.add")//权限管理;
public String getCountyListInfoByTaskListID(@RequestParam("taskListID") String tasklistid, HttpServletResponse resp) { public String getCountyListInfoByTaskListID(@RequestParam("taskListID") String taskListId, HttpServletResponse resp) {
List<CountyListEntity> countyListEntity = countyListService.findCountyListByTaskListID(tasklistid); List<CountyListEntity> countyListEntity = countyListService.findCountyListByTaskListID(taskListId);
YXJSONResponse yxjsonResponse = new YXJSONResponse(); YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8"); resp.setCharacterEncoding("UTF-8");
yxjsonResponse.outPutSuccess(countyListEntity); yxjsonResponse.outPutSuccess(countyListEntity);
...@@ -522,8 +490,8 @@ public class UserApi { ...@@ -522,8 +490,8 @@ public class UserApi {
*/ */
@RequestMapping("getPoliceStationApplyReasonBySaveDate") @RequestMapping("getPoliceStationApplyReasonBySaveDate")
// @RequiresPermissions("userInfo.add")//权限管理; // @RequiresPermissions("userInfo.add")//权限管理;
public String getPoliceStationApplyReasonBySaveDate(@RequestParam("save_Date") String save_Date, HttpServletResponse resp) { public String getPoliceStationApplyReasonBySaveDate(@RequestParam("startDate") String startDate, @RequestParam("endDate") String endDate, HttpServletResponse resp) {
List <Map <String, Object>> policeStationApplyReasonEntity = policeStationApplyReasonService.findPoliceStationApplyReasonBySaveDate(save_Date); List <Map <String, Object>> policeStationApplyReasonEntity = policeStationApplyReasonService.findPoliceStationApplyReasonBySaveDate(startDate,endDate);
YXJSONResponse yxjsonResponse = new YXJSONResponse(); YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8"); resp.setCharacterEncoding("UTF-8");
yxjsonResponse.outPutSuccess(policeStationApplyReasonEntity); yxjsonResponse.outPutSuccess(policeStationApplyReasonEntity);
...@@ -566,6 +534,23 @@ public class UserApi { ...@@ -566,6 +534,23 @@ public class UserApi {
return yxjsonResponse.toJSONString(); return yxjsonResponse.toJSONString();
} }
/**
* 查询出入库数据;
*
* @return
*/
@RequestMapping("getStorageCountByTaskListId")
// @RequiresPermissions("userInfo.add")//权限管理;
public String getStorageCountByTaskListId(@RequestParam("taskListID") String taskListId, HttpServletResponse resp) {
List <CountyListEntity> countyListEntity=countyListService.findStorageCountByTaskListId(taskListId);
YXJSONResponse yxjsonResponse=new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
yxjsonResponse.outPutSuccess(countyListEntity);
Map map=new HashMap();
// map.put("MakeType",productionTaskListEntity);
return yxjsonResponse.toJSONString();
}
/** /**
* 查询卡基表; * 查询卡基表;
* *
...@@ -601,41 +586,55 @@ public class UserApi { ...@@ -601,41 +586,55 @@ public class UserApi {
} }
/** /**
* 对出库数进行更改 * 对出库数进行更改
* 更新出库数 *
* @return * @return
*/ */
@RequestMapping("reviseOutBoundCount") @RequestMapping("reviseBoundCount")
// @RequiresPermissions("userInfo.add")//权限管理; // @RequiresPermissions("userInfo.add")//权限管理;
public String reviseOutBoundCount(@RequestParam("county_List_Id") String county_List_Id, HttpServletResponse resp) { public String reviseBoundCount(@RequestParam("countyListId") String countyListId,@RequestParam("outStorageCount") String out_Storage_Count,@RequestParam("inStorageCount") String in_Storage_Count, HttpServletResponse resp) {
String map = "{\"county_List_Id\":\"20181016001\",\"Out_Storage_County\":\"52\",} "; int i=countyListService.reviseBoundCount(countyListId, out_Storage_Count, in_Storage_Count);
JSONObject jsonObject = JSONObject.fromObject(map);
CountyListEntity countyListEntity = (CountyListEntity) JSONObject.toBean(jsonObject, CountyListEntity.class);
YXJSONResponse yxjsonResponse = new YXJSONResponse(); YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8"); resp.setCharacterEncoding("UTF-8");
int i = countyListService.reviseOutBoundCount(countyListEntity); yxjsonResponse.outPutSuccess(i+"--更新成功--");
yxjsonResponse.outPutSuccess(i + "更新成功");
return yxjsonResponse.toJSONString(); return yxjsonResponse.toJSONString();
} }
/** /**
* 对入库数进行更改 * 更新入库时间
* 更新入库数 * 前端空值
* @return * @return
*/ */
@RequestMapping("reviseInBoundCount") @RequestMapping("updateInStorageDate")
// @RequiresPermissions("userInfo.add")//权限管理; // @RequiresPermissions("userInfo.add")//权限管理;
public String reviseInBoundCount(@RequestParam("county_List_Id") String county_List_Id, HttpServletResponse resp) { public String updateInStorageDate(@RequestParam("taskId") String taskId,@RequestParam("inStorageCount") String inStorageCount,@RequestParam("outStorageCount") String outStorageCount, HttpServletResponse resp) {
String map = "{\"county_List_Id\":\"20181016001\",\"In_Storage_County\":\"52\",} "; int i = taskService.updateStorageDate(taskId,inStorageCount,outStorageCount);
JSONObject jsonObject = JSONObject.fromObject(map);
CountyListEntity countyListEntity = (CountyListEntity) JSONObject.toBean(jsonObject, CountyListEntity.class);
YXJSONResponse yxjsonResponse = new YXJSONResponse(); YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8"); resp.setCharacterEncoding("UTF-8");
int i = countyListService.reviseInBoundCount(countyListEntity);
yxjsonResponse.outPutSuccess(i + "更新成功"); yxjsonResponse.outPutSuccess(i + "更新成功");
return yxjsonResponse.toJSONString(); return yxjsonResponse.toJSONString();
} }
// /**
// * 更新出库时间
// * @return
// */
// @RequestMapping("updateOutBoundDate")
//// @RequiresPermissions("userInfo.add")//权限管理;
// public String updateOutBoundDate(@RequestParam("id") String id, HttpServletResponse resp) {
// String map = "{\"id\":\"20181016001\",} ";
// JSONObject jsonObject = JSONObject.fromObject(map);
// Object outStorageCount = jsonObject.get("outStorageCount");
// Object putOutStorageDate = jsonObject.get("putOutStorageDate");
// TaskEntity taskEntity = (TaskEntity) putOutStorageDate;
// CountyListEntity countyListEntity = (CountyListEntity) outStorageCount;
// YXJSONResponse yxjsonResponse = new YXJSONResponse();
// resp.setCharacterEncoding("UTF-8");
// int i = taskService.updateOutBoundDate(taskEntity,countyListEntity);
// yxjsonResponse.outPutSuccess(i + "更新成功");
// return yxjsonResponse.toJSONString();
// }
/** /**
* 查询交接单; * 查询交接单;
* *
...@@ -643,8 +642,8 @@ public class UserApi { ...@@ -643,8 +642,8 @@ public class UserApi {
*/ */
@RequestMapping("getConnectList") @RequestMapping("getConnectList")
// @RequiresPermissions("userInfo.add")//权限管理; // @RequiresPermissions("userInfo.add")//权限管理;
public String getConnectList(@RequestParam("save_Date") String save_Date, HttpServletResponse resp) throws ParseException { public String getConnectList(@RequestParam("startDate") String startDate, @RequestParam("endDate") String endDate, HttpServletResponse resp) {
List<CountyListEntity> countyListEntity = countyListService.getConnectList(save_Date); List<CountyListEntity> countyListEntity = countyListService.getConnectList(startDate,endDate);
YXJSONResponse yxjsonResponse = new YXJSONResponse(); YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8"); resp.setCharacterEncoding("UTF-8");
yxjsonResponse.outPutSuccess(countyListEntity); yxjsonResponse.outPutSuccess(countyListEntity);
...@@ -653,20 +652,51 @@ public class UserApi { ...@@ -653,20 +652,51 @@ public class UserApi {
return yxjsonResponse.toJSONString(); return yxjsonResponse.toJSONString();
} }
/**
* 下载装箱单
*/
@RequestMapping("printPackingList")
// @RequiresPermissions("userInfo.add")//权限管理;
public byte[] printPackingList(@RequestParam("cyclesheetID") String taskID, HttpServletResponse response) {
// cyclesheetID ="20180802032";
response.setContentType("application/x-download");
response.setCharacterEncoding("UTF-8");
String dateTime = DateFormatUtils.format(new Date(), "yyyyMMddHH");
// //使用Servlet实现文件下载的时候,避免浏览器自动打开文件
String fout = null;
List<Map<String, Object>> countyInfoList = groupNoService.findCountyInfoList(taskID);
List<TaskEntity> taskEntities = taskService.findProductionTaskListEntityByID(Long.valueOf(taskID));
fout = exportExcel(countyInfoList, taskEntities.get(0).getCard_Type() + "", "p1", 6000, taskEntities.get(0).getCitycode(), dateTime, taskID);
String outFile = dateTime + taskEntities.get(0).getCitycode() + "二代身份证统计表";
try {
FileInputStream fis = new FileInputStream(new File(fout));
byte[] b = new byte[fis.available()];
fis.read(b);
fis.close();
response.addHeader("Content-Disposition", "attachment;filename=" + outFile + ".xls");
return b;
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
// /** // /**
// * 下载交接单 // * 下载交接单
// */ // */
// @RequestMapping("printConnectList") // @RequestMapping("printConnectList")
//// @RequiresPermissions("userInfo.add")//权限管理; //// @RequiresPermissions("userInfo.add")//权限管理;
// public byte[] printConnectList(@RequestParam("save_Date") String save_Date, HttpServletResponse response) { // public byte[] printConnectList(@RequestParam("startDate") String startDate, @RequestParam("endDate") String endDate, HttpServletResponse response) {
//// cyclesheetID ="20180802032"; //// cyclesheetID ="20180802032";
// response.setContentType("application/x-download"); // response.setContentType("application/x-download");
// response.setCharacterEncoding("UTF-8"); // response.setCharacterEncoding("UTF-8");
// String dateTime = DateFormatUtils.format(new Date(), "yyyyMMddHH"); // String dateTime = DateFormatUtils.format(new Date(), "yyyyMMddHH");
//// //使用Servlet实现文件下载的时候,避免浏览器自动打开文件 //// //使用Servlet实现文件下载的时候,避免浏览器自动打开文件
// String fout = null; // String fout = null;
// List <CountyListEntity> countyListEntity = countyListService.getConnectList(save_Date); // List <CountyListEntity> countyListEntity = countyListService.getConnectList(startDate,endDate);
// fout = connectListExcel(countyListEntity, countyListEntity.get(0).getOut_Storage_Count() + "", 6000,countyListEntity.get(0).getCounty_Code(), dateTime, save_Date); // fout = connectListExcel(countyListEntity, countyListEntity.get(0).getOut_Storage_Count() + "", 6000, countyListEntity.get(0).getCounty_Code(), dateTime, startDate, endDate);
// String outFile = dateTime + countyListEntity.get(0).getCounty_Code() + "二代身份证交接单"; // String outFile = dateTime + countyListEntity.get(0).getCounty_Code() + "二代身份证交接单";
// try { // try {
// FileInputStream fis = new FileInputStream(new File(fout)); // FileInputStream fis = new FileInputStream(new File(fout));
...@@ -684,64 +714,193 @@ public class UserApi { ...@@ -684,64 +714,193 @@ public class UserApi {
// } // }
// //
// /** // /**
// * 下载装箱 // * 下载交接
// * // *
// * @param countyListEntity 交接单信息 // * @param countyListEntity 交接单信息
// * @param typeName 制证类型 // * @param typeName 制证类型
// * @param sum 总数 // * @param sum 总数
// * @param county_code 区县代码 // * @param countyCode 区县代码
// * @param boxCount 盒数
// */ // */
// private String connectListExcel( List <CountyListEntity> countyListEntity, String typeName, int sum, String county_code, String boxCount, String dateTime, String save_date ) { // private String connectListExcel( List <CountyListEntity> countyListEntity, String typeName, int sum, String countyCode, String dateTime, String startDate ,String endDate) {
// if (typeName.contains("null")) {
// typeName = typeName.replace("null", "");
// }
// //第一步创建workbook
// HSSFWorkbook wb = new HSSFWorkbook();
// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
// HSSFSheet sheet = wb.createSheet("二代身份证交接单");
// sheet.setColumnWidth(0, 30 * 100);
// sheet.setColumnWidth(1, 30 * 70);
// sheet.setColumnWidth(2, 30 * 80);
// sheet.setColumnWidth(3, 30 * 50);
// sheet.setColumnWidth(4, 30 * 110);
//
// HSSFPrintSetup ps = sheet.getPrintSetup();
// ps.setLandscape(true); // 打印方向,true:横向,false:纵向
// ps.setPaperSize(HSSFPrintSetup.B5_PAPERSIZE); //纸张
// sheet.setColumnWidth(0, (int) 35.7 * 100);
// //第三步创建行row:添加表头0行
// HSSFRow row = sheet.createRow(0);
// HSSFCellStyle style = wb.createCellStyle();//样式
//
// style.setVerticalAlignment(HSSFCellStyle.ALIGN_LEFT); //设置垂直居中
// style.setAlignment(HSSFCellStyle.ALIGN_LEFT);
// style.setWrapText(true);//设置自动换行
//
// style.setBorderBottom(HSSFCellStyle.BORDER_THIN); //下边框
// style.setBorderLeft(HSSFCellStyle.BORDER_THIN);//左边框
// style.setBorderTop(HSSFCellStyle.BORDER_THIN);//上边框
// style.setBorderRight(HSSFCellStyle.BORDER_THIN);//右边框
//
// HSSFFont font = wb.createFont();
// font.setFontHeightInPoints((short) 12);
// style.setFont(font);
// HSSFCellStyle style2 = wb.createCellStyle(); //表头样式
//
// style2.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER); //设置垂直居中
// style2.setAlignment(HSSFCellStyle.ALIGN_CENTER);
//
// HSSFFont font2 = wb.createFont();
// font2.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);//粗体显示
// font2.setFontHeightInPoints((short) 14);
// style2.setFont(font2);
//
// row = sheet.createRow(0); //创建下标为0的单元格
// row.setHeightInPoints(Short.parseShort("20"));//设置行高
// HSSFCell cell = row.createCell(0); //设定值
// cell.setCellValue("二代身份证交接单");
// cell.setCellStyle(style2);
// for (int i = 0; i < 12; i++) {
// cell = row.createCell(i + 1);
// cell.setCellValue("");
// cell.setCellStyle(style2);
// }
// CellRangeAddress callRangeAddress = new CellRangeAddress(0, 0, 0, 12);//起始行,结束行,起始列,结束列
// sheet.addMergedRegion(callRangeAddress);
//
// row = sheet.createRow(1);
// row.setHeightInPoints(Short.parseShort("16"));//设置行高
//
// cell = row.createCell(0);
// cell.setCellValue("区县"); //设定值
// cell.setCellStyle(style); //内容居中
//
// cell = row.createCell(1); //第二个单元格
// cell.setCellValue("普通证");
// cell.setCellStyle(style);
//
// cell = row.createCell(2); //第三个单元格
// cell.setCellValue("快证普");
// cell.setCellStyle(style);
//
// cell = row.createCell(3); //第四个单元格
// cell.setCellValue("KS普");
// cell.setCellStyle(style);
//
// cell = row.createCell(4); //第五个单元格
// cell.setCellValue("异地KS普");
// cell.setCellStyle(style);
//
// cell = row.createCell(5); //第六个单元格
// cell.setCellValue("异地普");
// cell.setCellStyle(style);
//
// cell = row.createCell(6); //第七个单元格
// cell.setCellValue("全国证");
// cell.setCellStyle(style);
//
// cell = row.createCell(7); //第八个单元格
// cell.setCellValue("军人证");
// cell.setCellStyle(style);
//
// cell = row.createCell(8); //第九个单元格
// cell.setCellValue("港澳");
// cell.setCellStyle(style);
//
// cell = row.createCell(9); //第十个单元格
// cell.setCellValue("台湾");
// cell.setCellStyle(style);
//
// cell = row.createCell(10); //第十一个单元格
// cell.setCellValue("小计");
// cell.setCellStyle(style);
//
// cell = row.createCell(11); //第十二个单元格
// cell.setCellValue("盒数");
// cell.setCellStyle(style);
//
// row = sheet.createRow(2);//i+2行之后开始创建
// row.setHeightInPoints(Short.parseShort("16"));//设置行高
// //创建单元格并且添加数据
// cell = row.createCell(0);
// cell.setCellValue(countyCode);
// cell.setCellStyle(style);
// for (int i = 0; i < 12; i++) {
// cell = row.createCell(i + 1);
// cell.setCellValue("");
// cell.setCellStyle(style);
// }
//
// //第五步插入数据
// int num = 0;
// for (int i = 0; i < countyListEntity.size(); i++) {
// Map<String, Object> map =(Map <String, Object>) countyListEntity.get(i);
// //创建行
// row = sheet.createRow(i + 3);//i+2行之后开始创建
// row.setHeightInPoints(Short.parseShort("16"));//设置行高
// //创建单元格并且添加数据
// cell = row.createCell(0);
// cell.setCellValue((String) map.get("COUNTYNAME"));
// cell.setCellStyle(style);
//
// cell = row.createCell(1);
// cell.setCellValue(map.get("DOWNLOAD").toString().equals("0") ? "" : map.get("DOWNLOAD").toString());
// cell.setCellStyle(style);
//
// cell = row.createCell(2);
// cell.setCellValue("");
// cell.setCellStyle(style);
//
// cell = row.createCell(3);
// cell.setCellValue(((Integer.parseInt(map.get("DOWNLOAD").toString()) % 250 == 0 ? Integer.parseInt(map.get("DOWNLOAD").toString()) / 250 : Integer.parseInt(map.get("DOWNLOAD").toString()) / 250 + 1)) + "");
// num += ((Integer.parseInt(map.get("DOWNLOAD").toString()) % 250 == 0 ? Integer.parseInt(map.get("DOWNLOAD").toString()) / 250 : Integer.parseInt(map.get("DOWNLOAD").toString()) / 250 + 1));
// cell.setCellStyle(style);
//
// cell = row.createCell(4);
// cell.setCellValue("");
// cell.setCellStyle(style);
//
// cell = row.createCell(5);
// cell.setCellValue("");
// cell.setCellStyle(style);
// //
// cell = row.createCell(6);
// cell.setCellValue("");
// cell.setCellStyle(style);
//
// cell = row.createCell(7);
// cell.setCellValue("");
// cell.setCellStyle(style);
//
// cell = row.createCell(8);
// cell.setCellValue("");
// cell.setCellStyle(style);
//
// cell = row.createCell(9);
// cell.setCellValue("");
// cell.setCellStyle(style);
//
// cell = row.createCell(10);
// cell.setCellValue("");
// cell.setCellStyle(style);
//
// cell = row.createCell(11);
// cell.setCellValue("");
// cell.setCellStyle(style);
//
// }
// } // }
/**
* 更新入库时间
* 前端空值
* @return
*/
@RequestMapping("updateInStorageDate")
// @RequiresPermissions("userInfo.add")//权限管理;
public String updateInStorageDate(@RequestParam("id") String id, HttpServletResponse resp) {
String map = "{\"id\":\"20181016001\",} ";
JSONObject jsonObject = JSONObject.fromObject(map);
Object inStorageCount = jsonObject.get("inStorageCount");
Object inStorageDate = jsonObject.get("inStorageDate");
TaskEntity taskEntity = (TaskEntity) inStorageDate;
CountyListEntity countyListEntity = (CountyListEntity) inStorageCount;
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
int i = taskService.updateInStorageDate(taskEntity,countyListEntity);
yxjsonResponse.outPutSuccess(i + "更新成功");
return yxjsonResponse.toJSONString();
}
/**
* 更新出库时间
* @return
*/
@RequestMapping("updateOutBoundDate")
// @RequiresPermissions("userInfo.add")//权限管理;
public String updateOutBoundDate(@RequestParam("id") String id, HttpServletResponse resp) {
String map = "{\"id\":\"20181016001\",} ";
JSONObject jsonObject = JSONObject.fromObject(map);
Object outStorageCount = jsonObject.get("outStorageCount");
Object putOutStorageDate = jsonObject.get("putOutStorageDate");
TaskEntity taskEntity = (TaskEntity) putOutStorageDate;
CountyListEntity countyListEntity = (CountyListEntity) outStorageCount;
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
int i = taskService.updateOutBoundDate(taskEntity,countyListEntity);
yxjsonResponse.outPutSuccess(i + "更新成功");
return yxjsonResponse.toJSONString();
}
/** /**
* 下载装箱单 * 下载装箱单
* *
...@@ -853,7 +1012,6 @@ public class UserApi { ...@@ -853,7 +1012,6 @@ public class UserApi {
cell.setCellValue((String) map.get("COUNTYNAME")); cell.setCellValue((String) map.get("COUNTYNAME"));
cell.setCellStyle(style); cell.setCellStyle(style);
cell = row.createCell(1); cell = row.createCell(1);
cell.setCellValue(map.get("DOWNLOAD").toString().equals("0") ? "" : map.get("DOWNLOAD").toString()); cell.setCellValue(map.get("DOWNLOAD").toString().equals("0") ? "" : map.get("DOWNLOAD").toString());
cell.setCellStyle(style); cell.setCellStyle(style);
cell = row.createCell(2); cell = row.createCell(2);
......
...@@ -2,6 +2,7 @@ package com.yxproject.start.mapper; ...@@ -2,6 +2,7 @@ package com.yxproject.start.mapper;
import com.yxproject.start.entity.CountyListEntity; import com.yxproject.start.entity.CountyListEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -13,12 +14,12 @@ import java.util.Map; ...@@ -13,12 +14,12 @@ import java.util.Map;
@Mapper @Mapper
public interface CountyListMapper { public interface CountyListMapper {
public List<CountyListEntity> findCountyListByTaskListID(String taskListId);
public List<CountyListEntity> findCountyListByTaskListID(String tasklistID);
public List<CountyListEntity> findCountyListByTaskStateId(String taskStateId); public List<CountyListEntity> findCountyListByTaskStateId(String taskStateId);
public List<CountyListEntity> findCountyListByCardType(String cardType); public List<CountyListEntity> findCountyListByCardType(String cardType);
public int updateBoundCount(CountyListEntity countyListEntity); public int updateBoundCount(@Param("county_List_Id") String county_List_Id,@Param("out_Storage_Count") String out_Storage_Count,@Param("in_Storage_Count") String in_Storage_Count);
public List<CountyListEntity> getConnectList(String save_Date); public List<CountyListEntity> getConnectList( @Param("startDate")String startDate , @Param("endDate") String endDate);
public List<CountyListEntity> findStorageCountByTaskListId(String taskListId);
// public List<Map<String, Object>> PrintCountyListXML(); // public List<Map<String, Object>> PrintCountyListXML();
} }
...@@ -2,6 +2,7 @@ package com.yxproject.start.mapper; ...@@ -2,6 +2,7 @@ package com.yxproject.start.mapper;
import com.yxproject.start.entity.PoliceStationApplyReasonEntity; import com.yxproject.start.entity.PoliceStationApplyReasonEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -15,7 +16,7 @@ public interface PoliceStationApplyReasonMapper { ...@@ -15,7 +16,7 @@ public interface PoliceStationApplyReasonMapper {
public int updatePoliceStationApplyReasonEntity(PoliceStationApplyReasonEntity policeStationApplyReasonEntity); public int updatePoliceStationApplyReasonEntity(PoliceStationApplyReasonEntity policeStationApplyReasonEntity);
public List<Map<String,Object>> findNormalApplyReasonByCyclesheetID(String cyclesheetid); public List<Map<String,Object>> findNormalApplyReasonByCyclesheetID(String cyclesheetid);
public List<Map<String,Object>> findSpecialApplyReasonByCyclesheetID(String cyclesheetid); public List<Map<String,Object>> findSpecialApplyReasonByCyclesheetID(String cyclesheetid);
public List<Map<String,Object>> findPoliceStationApplyReasonBySaveDate(String save_Date); public List<Map<String,Object>> findPoliceStationApplyReasonBySaveDate( @Param("startDate") String startDate,@Param("endDate") String endDate);
public List<Map<String,Object>> findPoliceStationApplyReasonByCardType(String cardType); public List<Map<String,Object>> findPoliceStationApplyReasonByCardType(String cardType);
public List<Map<String,Object>> findPoliceStationApplyReasonByCity(String city); public List<Map<String,Object>> findPoliceStationApplyReasonByCity(String city);
public List<Map<String,Object>> findPoliceStationApplyReasonByCounty(String county); public List<Map<String,Object>> findPoliceStationApplyReasonByCounty(String county);
......
...@@ -2,6 +2,7 @@ package com.yxproject.start.mapper; ...@@ -2,6 +2,7 @@ package com.yxproject.start.mapper;
import com.yxproject.start.entity.TaskEntity; import com.yxproject.start.entity.TaskEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -21,4 +22,6 @@ public interface TaskMapper { ...@@ -21,4 +22,6 @@ public interface TaskMapper {
public List<Map<String,Object>> findTypeListByTaskStateId(String taskStateId); public List<Map<String,Object>> findTypeListByTaskStateId(String taskStateId);
public List<Map<String,Object>> findCityListByTaskStateId(String taskStateId); public List<Map<String,Object>> findCityListByTaskStateId(String taskStateId);
public List<Map<String,Object>> findCityListByCardType(String cardType); public List<Map<String,Object>> findCityListByCardType(String cardType);
public int updateOutStorageDate( @Param("taskId")String taskId, @Param("inStorageCount")String inStorageCount, @Param("outStorageCount")String outStorageCount);
public int updateInStorageDate(String taskId,String inStorageCount,String outStorageCount);
} }
...@@ -4,13 +4,14 @@ import com.yxproject.start.entity.CountyListEntity; ...@@ -4,13 +4,14 @@ import com.yxproject.start.entity.CountyListEntity;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
public interface CountyListService { public interface CountyListService {
public List<CountyListEntity> findCountyListByTaskListID(String tasklistID); public List<CountyListEntity> findCountyListByTaskListID(String taskListId);
public List<CountyListEntity> findCountyListByTaskStateId(String taskStateId); public List<CountyListEntity> findCountyListByTaskStateId(String taskStateId);
public int reviseOutBoundCount(CountyListEntity countyListEntity); public List<CountyListEntity> getConnectList(String startDate,String endDate);
public int reviseInBoundCount(CountyListEntity countyListEntity);
public List<CountyListEntity> getConnectList(String save_Date);
public List<CountyListEntity> findCountyListByCardType(String cardType); public List<CountyListEntity> findCountyListByCardType(String cardType);
public List<CountyListEntity> findStorageCountByTaskListId(String taskListId);
public int reviseBoundCount(String county_List_Id, String out_Storage_Count, String in_Storage_Count);
} }
...@@ -8,7 +8,7 @@ import java.util.Map; ...@@ -8,7 +8,7 @@ import java.util.Map;
*/ */
public interface PoliceStationApplyReasonService { public interface PoliceStationApplyReasonService {
public int savePoliceStationApplyReasonEntity(String cyclesheetID); public int savePoliceStationApplyReasonEntity(String cyclesheetID);
public List<Map<String,Object>> findPoliceStationApplyReasonBySaveDate(String save_Date); public List<Map<String,Object>> findPoliceStationApplyReasonBySaveDate(String startDate,String endDate);
public List<Map<String,Object>> findPoliceStationApplyReasonByCardType(String cardType); public List<Map<String,Object>> findPoliceStationApplyReasonByCardType(String cardType);
public List<Map<String,Object>> findPoliceStationApplyReasonByCity(String cityCode); public List<Map<String,Object>> findPoliceStationApplyReasonByCity(String cityCode);
} }
...@@ -28,9 +28,7 @@ public interface TaskService { ...@@ -28,9 +28,7 @@ public interface TaskService {
public int addExceptionState(TaskEntity state); public int addExceptionState(TaskEntity state);
public int updateOutBoundDate(TaskEntity taskEntity, CountyListEntity countyListEntity); public int updateStorageDate(String taskId,String inStorageCount,String outStorageCount);
public int updateInStorageDate(TaskEntity taskEntity, CountyListEntity countyListEntity );
public List<Map<String,Object>> findTypeListByTaskStateId( String taskStateId); public List<Map<String,Object>> findTypeListByTaskStateId( String taskStateId);
......
...@@ -8,6 +8,7 @@ import org.springframework.stereotype.Service; ...@@ -8,6 +8,7 @@ import org.springframework.stereotype.Service;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* Created by liuxinben on 2018/11/6.13:42 * Created by liuxinben on 2018/11/6.13:42
...@@ -19,8 +20,8 @@ public class CountyListServiceImpl implements CountyListService { ...@@ -19,8 +20,8 @@ public class CountyListServiceImpl implements CountyListService {
public CountyListMapper countyListMapper; public CountyListMapper countyListMapper;
@Override @Override
public List<CountyListEntity> findCountyListByTaskListID(String tasklistid) { public List<CountyListEntity> findCountyListByTaskListID(String taskListId) {
List<CountyListEntity> byTaskListID = countyListMapper.findCountyListByTaskListID(tasklistid); List<CountyListEntity> byTaskListID = countyListMapper.findCountyListByTaskListID(taskListId);
return byTaskListID; return byTaskListID;
} }
...@@ -37,20 +38,27 @@ public class CountyListServiceImpl implements CountyListService { ...@@ -37,20 +38,27 @@ public class CountyListServiceImpl implements CountyListService {
} }
@Override @Override
public int reviseOutBoundCount(CountyListEntity countyListEntity) { public int reviseBoundCount(String county_List_Id, String out_Storage_Count, String in_Storage_Count) {
countyListEntity.setOut_Storage_Count(countyListEntity.getOut_Storage_Count()); int i= 0;
return countyListMapper.updateBoundCount(countyListEntity); if(out_Storage_Count.equals(0)&&!in_Storage_Count.equals(0)){
i=countyListMapper.updateBoundCount(county_List_Id, out_Storage_Count, in_Storage_Count);
}
if(!out_Storage_Count.equals(0)&&in_Storage_Count.equals(0)){
i=countyListMapper.updateBoundCount(county_List_Id, out_Storage_Count, in_Storage_Count);
}
if(!out_Storage_Count.equals(0)&&!in_Storage_Count.equals(0)){
i=countyListMapper.updateBoundCount(county_List_Id, out_Storage_Count, in_Storage_Count);
}
return i;
} }
@Override @Override
public int reviseInBoundCount(CountyListEntity countyListEntity) { public List<CountyListEntity> getConnectList(String startDate,String endDate) {
countyListEntity.setIn_Storage_Count(countyListEntity.getIn_Storage_Count()); return countyListMapper.getConnectList(startDate,endDate);
return countyListMapper.updateBoundCount(countyListEntity);
} }
@Override @Override
public List<CountyListEntity> getConnectList(String save_Date) { public List<CountyListEntity> findStorageCountByTaskListId(String taskListId){
return countyListMapper.getConnectList(save_Date); return countyListMapper.findStorageCountByTaskListId(taskListId);
} }
......
...@@ -54,8 +54,8 @@ public class PoliceStationApplyReasonServiceImpl implements PoliceStationApplyRe ...@@ -54,8 +54,8 @@ public class PoliceStationApplyReasonServiceImpl implements PoliceStationApplyRe
* @return * @return
*/ */
@Override @Override
public List <Map <String, Object>> findPoliceStationApplyReasonBySaveDate( String save_Date ) { public List <Map <String, Object>> findPoliceStationApplyReasonBySaveDate(String startDate,String endDate) {
List <Map <String, Object>> SaveData =policeStationApplyReasonMapper.findPoliceStationApplyReasonBySaveDate(save_Date); List <Map <String, Object>> SaveData =policeStationApplyReasonMapper.findPoliceStationApplyReasonBySaveDate(startDate,endDate);
return SaveData; return SaveData;
} }
......
...@@ -433,45 +433,23 @@ public class TaskServiceImpl implements TaskService { ...@@ -433,45 +433,23 @@ public class TaskServiceImpl implements TaskService {
return i; return i;
} }
/**
* 更新出库时间
* @param
* @param countyListEntity
* @return
*/
@Override
public int updateOutBoundDate(TaskEntity taskEntity, CountyListEntity countyListEntity) {
int i=0;
i= taskMapper.totalNum(i);
if (countyListEntity.getOut_Storage_Count()==i){
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
taskEntity.setOut_Storage_Date(new Date());
return taskMapper.updateTaskEntity(taskEntity);
}
else{
return 0;
}
}
/** /**
* 更新入库时间 * 更新入库时间
* @param * @param
* @return * @return
*/ */
@Override @Override
public int updateInStorageDate(TaskEntity taskEntity, CountyListEntity countyListEntity ) { public int updateStorageDate(String taskId,String inStorageCount,String outStorageCount ) {
int i=0; int i=0;
i= taskMapper.totalNum(i); i= taskMapper.totalNum(i);
if (countyListEntity.getIn_Storage_Count()==i){ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss"); if (inStorageCount.equals(i)){
taskEntity.setIn_Storage_Date(new Date()); return taskMapper.updateInStorageDate(taskId,inStorageCount,outStorageCount);
return taskMapper.updateTaskEntity(taskEntity);
} }
else{ if(outStorageCount.equals(i)){
return 0; return taskMapper.updateOutStorageDate(taskId,inStorageCount,outStorageCount);
} }
return 0;
} }
/** /**
......
...@@ -26,12 +26,25 @@ ...@@ -26,12 +26,25 @@
SELECT * FROM COUNTY_LIST left join TASK on COUNTY_LIST.TASK_ID = TASK.TASK_ID left join CARD_TYPE_DIC on TASK.CARD_TYPE = CARD_TYPE_DIC.CARD_TYPE_ID where CARD_TYPE_DIC.CARD_TYPE=#{card_Type} SELECT * FROM COUNTY_LIST left join TASK on COUNTY_LIST.TASK_ID = TASK.TASK_ID left join CARD_TYPE_DIC on TASK.CARD_TYPE = CARD_TYPE_DIC.CARD_TYPE_ID where CARD_TYPE_DIC.CARD_TYPE=#{card_Type}
</select> </select>
<update id="updateBoundCount" parameterType="com.yxproject.start.entity.CountyListEntity" > <update id="updateBoundCount" parameterType="String" >
update COUNTY_LIST SET OUT_STORAGE_COUNT =#{out_Storage_Count},IN_STORAGE_COUNT =#{in_Storage_Count} where COUNTY_LIST_ID =#{county_List_Id} update COUNTY_LIST SET OUT_STORAGE_COUNT =#{out_Storage_Count},IN_STORAGE_COUNT =#{in_Storage_Count} where COUNTY_LIST_ID =#{county_List_Id}
</update> </update>
<select id="getConnectList" resultType="Map" parameterType="String"> <select id="getConnectList" resultType="java.util.HashMap" parameterType="String">
SELECT COUNTY_DIC.COUNTYNAME,CARD_TYPE_DIC.CARD_TYPE,SUM(COUNTY_LIST.OUT_STORAGE_COUNT),floor(SUM(COUNTY_LIST.OUT_STORAGE_COUNT)/250)+1 FROM COUNTY_LIST LEFT JOIN (SELECT COUNTY_CODE,COUNTYNAME FROM COUNTY_DIC GROUP BY COUNTY_CODE,COUNTYNAME ) COUNTY_DIC ON COUNTY_LIST.COUNTY_CODE = COUNTY_DIC.COUNTY_CODE LEFT JOIN (SELECT TASK_ID,CARD_TYPE FROM TASK GROUP BY TASK_ID,CARD_TYPE) TASK ON COUNTY_LIST.TASK_ID = TASK.TASK_ID LEFT JOIN(SELECT CARD_TYPE_ID,CARD_TYPE FROM CARD_TYPE_DIC GROUP BY CARD_TYPE_ID,CARD_TYPE ) CARD_TYPE_DIC ON CARD_TYPE_DIC.CARD_TYPE_ID = TASK.CARD_TYPE WHERE TO_CHAR(SAVE_DATE,'yyyyMMdd') = #{save_Date} GROUP BY COUNTY_DIC.COUNTYNAME,CARD_TYPE_DIC.CARD_TYPE SELECT COUNTY_DIC.COUNTYNAME,CARD_TYPE_DIC.CARD_TYPE,SUM(COUNTY_LIST.OUT_STORAGE_COUNT),floor(SUM(COUNTY_LIST.OUT_STORAGE_COUNT)/250)+1 FROM COUNTY_LIST
LEFT JOIN (SELECT COUNTY_CODE,COUNTYNAME FROM COUNTY_DIC GROUP BY COUNTY_CODE,COUNTYNAME ) COUNTY_DIC ON COUNTY_LIST.COUNTY_CODE = COUNTY_DIC.COUNTY_CODE
LEFT JOIN (SELECT TASK_ID,CARD_TYPE FROM TASK GROUP BY TASK_ID,CARD_TYPE) TASK ON COUNTY_LIST.TASK_ID = TASK.TASK_ID
LEFT JOIN(SELECT CARD_TYPE_ID,CARD_TYPE FROM CARD_TYPE_DIC GROUP BY CARD_TYPE_ID,CARD_TYPE ) CARD_TYPE_DIC ON CARD_TYPE_DIC.CARD_TYPE_ID = TASK.CARD_TYPE
WHERE substr(TO_CHAR(SAVE_DATE,'yyyyMMdd'),0,8) >= #{startDate}
AND #{endDate} >= substr(TO_CHAR(SAVE_DATE,'yyyyMMdd'),0,8)
GROUP BY COUNTY_DIC.COUNTYNAME,CARD_TYPE_DIC.CARD_TYPE
</select>
<select id="findStorageCountByTaskListId" resultType="java.util.HashMap" parameterType="String">
SELECT TASK_ID,FINISH_COUNT,IN_STORAGE_COUNT,OUT_STORAGE_COUNT,CITY_DIC.CITYNAME||' '||COUNTY_DIC.COUNTYNAME,COUNTY_DIC.COUNTY_CODE FROM COUNTY_LIST
LEFT JOIN COUNTY_DIC ON COUNTY_LIST.COUNTY_CODE = COUNTY_DIC.COUNTY_CODE
LEFT JOIN CITY_DIC ON substr(CITY_DIC.CITYCODE,1,4) = substr(COUNTY_LIST.COUNTY_CODE,1,4)
WHERE TASK_ID=#{task_Id}
</select> </select>
<!--<select id="PrintCountyListXML" resultType="com.yxproject.start.entity.CountyListEntity" parameterType="String">--> <!--<select id="PrintCountyListXML" resultType="com.yxproject.start.entity.CountyListEntity" parameterType="String">-->
......
...@@ -33,24 +33,37 @@ ...@@ -33,24 +33,37 @@
SELECT * FROM TABLE(find_special_apply_reason_list.get_apply_reason_list(#{cyclesheetid})) SELECT * FROM TABLE(find_special_apply_reason_list.get_apply_reason_list(#{cyclesheetid}))
</select> </select>
<select id="findPoliceStationApplyReasonBySaveDate" resultType="Map" parameterType="String"> <select id="findPoliceStationApplyReasonBySaveDate" resultType="java.util.HashMap" parameterType="String">
SELECT * FROM POLICE_STATION_APPLY_REASON where TO_CHAR(SAVE_DATE,'yyyyMMdd') = #{save_Date} SELECT * FROM POLICE_STATION_APPLY_REASON WHERE substr(TO_CHAR(SAVE_DATE,'yyyyMMdd'),0,8) >= #{startDate}
AND #{endDate} >= substr(TO_CHAR(SAVE_DATE,'yyyyMMdd'),0,8)
</select> </select>
<select id="findPoliceStationApplyReasonByCardType" resultType="java.util.HashMap" parameterType="com.yxproject.start.entity.PoliceStationApplyReasonEntity"> <select id="findPoliceStationApplyReasonByCardType" resultType="java.util.HashMap" parameterType="String">
SELECT * FROM POLICE_STATION_APPLY_REASON left join TASK on POLICE_STATION_APPLY_REASON.TASK_ID = TASK.TASK_ID where CARD_TYPE=#{card_Type} SELECT * FROM POLICE_STATION_APPLY_REASON left join TASK on POLICE_STATION_APPLY_REASON.TASK_ID = TASK.TASK_ID where CARD_TYPE=#{card_Type}
</select> </select>
<select id="findPoliceStationApplyReasonByCity" resultType="java.util.HashMap" parameterType="com.yxproject.start.entity.PoliceStationApplyReasonEntity"> <select id="findPoliceStationApplyReasonByCity" resultType="java.util.HashMap" parameterType="String">
select POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,GAJG_DM.GAJG_MC,COUNTY_DIC.COUNTYNAME,CITY_DIC.CITYNAME from POLICE_STATION_APPLY_REASON left join GAJG_DM on GAJG_DM.GAJG_DM = POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,0,5) left join CITY_DIC on CITY_DIC.CITYCODE = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,0,3) where CITYCODE=#{citycode} select POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,GAJG_DM.GAJG_MC,COUNTY_DIC.COUNTYNAME,CITY_DIC.CITYNAME from POLICE_STATION_APPLY_REASON
left join GAJG_DM on GAJG_DM.GAJG_DM = POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE
left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,1,6)
left join CITY_DIC on substr(CITY_DIC.CITYCODE,1,4) = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,1,4)
where substr(CITY_DIC.CITYCODE,1,4)=#{citycode}
</select> </select>
<select id="findPoliceStationApplyReasonByCounty" resultType="java.util.HashMap" parameterType="com.yxproject.start.entity.PoliceStationApplyReasonEntity"> <select id="findPoliceStationApplyReasonByCounty" resultType="java.util.HashMap" parameterType="String">
select POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,GAJG_DM.GAJG_MC,COUNTY_DIC.COUNTYNAME,CITY_DIC.CITYNAME from POLICE_STATION_APPLY_REASON left join GAJG_DM on GAJG_DM.GAJG_DM = POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,0,5) left join CITY_DIC on CITY_DIC.CITYCODE = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,0,3) where COUNTY_CODE=#{county_Code} select POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,GAJG_DM.GAJG_MC,COUNTY_DIC.COUNTYNAME,CITY_DIC.CITYNAME from POLICE_STATION_APPLY_REASON
left join GAJG_DM on GAJG_DM.GAJG_DM = POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE
left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,1,6)
left join CITY_DIC on substr(CITY_DIC.CITYCODE,1,4) = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,1,4)
where COUNTY_CODE=#{county_Code}
</select> </select>
<select id="findPoliceStationApplyReasonByPoliceStation" resultType="java.util.HashMap" parameterType="com.yxproject.start.entity.PoliceStationApplyReasonEntity"> <select id="findPoliceStationApplyReasonByPoliceStation" resultType="java.util.HashMap" parameterType="String">
select POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,GAJG_DM.GAJG_MC,COUNTY_DIC.COUNTYNAME,CITY_DIC.CITYNAME from POLICE_STATION_APPLY_REASON left join GAJG_DM on GAJG_DM.GAJG_DM = POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,0,5) left join CITY_DIC on CITY_DIC.CITYCODE = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,0,3) where POLICE_STATION_CODE=#{police_Station_Code} select POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,GAJG_DM.GAJG_MC,COUNTY_DIC.COUNTYNAME,CITY_DIC.CITYNAME from POLICE_STATION_APPLY_REASON
left join GAJG_DM on GAJG_DM.GAJG_DM = POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE
left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,1,6)
left join CITY_DIC on substr(CITY_DIC.CITYCODE,1,4) = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,1,4)
where POLICE_STATION_CODE=#{police_Station_Code}
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -69,23 +69,42 @@ ...@@ -69,23 +69,42 @@
</select> </select>
<update id="replaceExceptionInformation" parameterType="com.yxproject.start.entity.TaskEntity" > <update id="replaceExceptionInformation" parameterType="com.yxproject.start.entity.TaskEntity" >
update TASK SET exception_Information = NULL,IS_EXCEPTION =#{is_Exception} where TASK_ID =#{task_Id} update TASK set exception_Information = NULL and IS_EXCEPTION =#{is_Exception} where TASK_ID =#{task_Id}
</update> </update>
<select id="totalNum" resultType="Integer"> <select id="totalNum" resultType="Integer">
select nvl(SUM(VAILD_COUNT),0) FROM GROUP_NO where TASK_ID =#{task_Id} select nvl(SUM(VAILD_COUNT),0) FROM GROUP_NO
</select> </select>
<update id="updateOutStorageDate" parameterType="String">
update TASK SET OUT_STORAGE_DATE IS SYSDATE where TASK_ID =#{task_Id}
</update>
<update id="updateInStorageDate" parameterType="String">
update TASK SET IN_STORAGE_DATE =#{in_Storage_Date} where TASK_ID =#{task_Id}
</update>
<select id="findTypeListByTaskStateId" resultType="java.util.HashMap"> <select id="findTypeListByTaskStateId" resultType="java.util.HashMap">
SELECT TASK.CARD_TYPE,count(CARD_TYPE_ID),CARD_TYPE_DIC.CARD_TYPE FROM TASK left join (SELECT CARD_TYPE,count(CARD_TYPE_ID),CARD_TYPE_ID FROM CARD_TYPE_DIC GROUP BY CARD_TYPE,CARD_TYPE_ID) CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = TASK.CARD_TYPE where TASK_STATE_ID=#{task_State_Id} GROUP BY CARD_TYPE_DIC.CARD_TYPE,TASK.CARD_TYPE SELECT TASK.CARD_TYPE,count(CARD_TYPE_ID),CARD_TYPE_DIC.CARD_TYPE FROM TASK
left join (SELECT CARD_TYPE,count(CARD_TYPE_ID),CARD_TYPE_ID FROM CARD_TYPE_DIC GROUP BY CARD_TYPE,CARD_TYPE_ID) CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = TASK.CARD_TYPE
where TASK_STATE_ID=#{task_State_Id}
GROUP BY CARD_TYPE_DIC.CARD_TYPE,TASK.CARD_TYPE
</select> </select>
<select id="findCityListByCardType" resultType="java.util.HashMap"> <select id="findCityListByCardType" resultType="java.util.HashMap">
select CARD_TYPE,TASK.CITYCODE,CITYNAME,sum(VAILD_COUNT),sum(INVALID_COUNT),COUNT(GROUP_NO),GROUP_NO,TASK.TASK_ID,OLD_CARD_TYPE,SUBMIT_DATE,ISSUED_DATE,PRINT_STATE,DOWNLOAD_DATE,PRINT_OUT_DATE,POSITION_DATE,OUT_WORKSHOP_DATE,QUALITY_PEOPLE_NAME,QUALITY_TEST_DATE,EXCEPTION_INFORMATION,OUT_STORAGE_DATE,IN_STORAGE_DATE,TASK_STATE_ID,IS_EXCEPTION,PRINTER_ID from TASK left join (select sum(VAILD_COUNT),sum(INVALID_COUNT),COUNT(GROUP_NO),TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VAILD_COUNT,INVALID_COUNT from GROUP_NO group by TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VAILD_COUNT,INVALID_COUNT ) GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID left join (SELECT CITYCODE,CITYNAME FROM CITY_DIC) CITY_DIC on CITY_DIC.CITYCODE = TASK.CITYCODE where CARD_TYPE=#{card_Type} GROUP BY CARD_TYPE,TASK.CITYCODE,CITYNAME,GROUP_NO,TASK.TASK_ID,OLD_CARD_TYPE,SUBMIT_DATE,ISSUED_DATE,PRINT_STATE,DOWNLOAD_DATE,PRINT_OUT_DATE,POSITION_DATE,OUT_WORKSHOP_DATE,QUALITY_PEOPLE_NAME,QUALITY_TEST_DATE,EXCEPTION_INFORMATION,OUT_STORAGE_DATE,IN_STORAGE_DATE,TASK_STATE_ID,IS_EXCEPTION,PRINTER_ID select CARD_TYPE,TASK.CITYCODE,CITYNAME,sum(VAILD_COUNT),sum(INVALID_COUNT),COUNT(GROUP_NO),GROUP_NO,TASK.TASK_ID,OLD_CARD_TYPE,SUBMIT_DATE,ISSUED_DATE,PRINT_STATE,DOWNLOAD_DATE,PRINT_OUT_DATE,POSITION_DATE,OUT_WORKSHOP_DATE,QUALITY_PEOPLE_NAME,QUALITY_TEST_DATE,EXCEPTION_INFORMATION,OUT_STORAGE_DATE,IN_STORAGE_DATE,TASK_STATE_ID,IS_EXCEPTION,PRINTER_ID from TASK
left join (select sum(VAILD_COUNT),sum(INVALID_COUNT),COUNT(GROUP_NO),TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VAILD_COUNT,INVALID_COUNT from GROUP_NO group by TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VAILD_COUNT,INVALID_COUNT ) GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID
left join (SELECT CITYCODE,CITYNAME FROM CITY_DIC) CITY_DIC on CITY_DIC.CITYCODE = TASK.CITYCODE
where CARD_TYPE=#{card_Type}
GROUP BY CARD_TYPE,TASK.CITYCODE,CITYNAME,GROUP_NO,TASK.TASK_ID,OLD_CARD_TYPE,SUBMIT_DATE,ISSUED_DATE,PRINT_STATE,DOWNLOAD_DATE,PRINT_OUT_DATE,POSITION_DATE,OUT_WORKSHOP_DATE,QUALITY_PEOPLE_NAME,QUALITY_TEST_DATE,EXCEPTION_INFORMATION,OUT_STORAGE_DATE,IN_STORAGE_DATE,TASK_STATE_ID,IS_EXCEPTION,PRINTER_ID
</select> </select>
<select id="findCityListByTaskStateId" resultType="java.util.HashMap"> <select id="findCityListByTaskStateId" resultType="java.util.HashMap">
select CARD_TYPE,TASK.CITYCODE,CITYNAME,sum(VAILD_COUNT),sum(INVALID_COUNT),COUNT(GROUP_NO),GROUP_NO,TASK.TASK_ID,OLD_CARD_TYPE,SUBMIT_DATE,ISSUED_DATE,PRINT_STATE,DOWNLOAD_DATE,PRINT_OUT_DATE,POSITION_DATE,OUT_WORKSHOP_DATE,QUALITY_PEOPLE_NAME,QUALITY_TEST_DATE,EXCEPTION_INFORMATION,OUT_STORAGE_DATE,IN_STORAGE_DATE,TASK_STATE_ID,IS_EXCEPTION,PRINTER_ID from TASK left join (select sum(VAILD_COUNT),sum(INVALID_COUNT),COUNT(GROUP_NO),TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VAILD_COUNT,INVALID_COUNT from GROUP_NO group by TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VAILD_COUNT,INVALID_COUNT ) GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID left join (SELECT CITYCODE,CITYNAME FROM CITY_DIC) CITY_DIC on CITY_DIC.CITYCODE = TASK.CITYCODE where TASK_STATE_ID=#{task_State_Id} GROUP BY CARD_TYPE,TASK.CITYCODE,CITYNAME,GROUP_NO,TASK.TASK_ID,OLD_CARD_TYPE,SUBMIT_DATE,ISSUED_DATE,PRINT_STATE,DOWNLOAD_DATE,PRINT_OUT_DATE,POSITION_DATE,OUT_WORKSHOP_DATE,QUALITY_PEOPLE_NAME,QUALITY_TEST_DATE,EXCEPTION_INFORMATION,OUT_STORAGE_DATE,IN_STORAGE_DATE,TASK_STATE_ID,IS_EXCEPTION,PRINTER_ID select CARD_TYPE,TASK.CITYCODE,CITYNAME,sum(VAILD_COUNT),sum(INVALID_COUNT),COUNT(GROUP_NO),GROUP_NO,TASK.TASK_ID,OLD_CARD_TYPE,SUBMIT_DATE,ISSUED_DATE,PRINT_STATE,DOWNLOAD_DATE,PRINT_OUT_DATE,POSITION_DATE,OUT_WORKSHOP_DATE,QUALITY_PEOPLE_NAME,QUALITY_TEST_DATE,EXCEPTION_INFORMATION,OUT_STORAGE_DATE,IN_STORAGE_DATE,TASK_STATE_ID,IS_EXCEPTION,PRINTER_ID from TASK
left join (select sum(VAILD_COUNT),sum(INVALID_COUNT),COUNT(GROUP_NO),TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VAILD_COUNT,INVALID_COUNT from GROUP_NO group by TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VAILD_COUNT,INVALID_COUNT ) GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID
left join (SELECT CITYCODE,CITYNAME FROM CITY_DIC) CITY_DIC on CITY_DIC.CITYCODE = TASK.CITYCODE
where TASK_STATE_ID=#{task_State_Id}
GROUP BY CARD_TYPE,TASK.CITYCODE,CITYNAME,GROUP_NO,TASK.TASK_ID,OLD_CARD_TYPE,SUBMIT_DATE,ISSUED_DATE,PRINT_STATE,DOWNLOAD_DATE,PRINT_OUT_DATE,POSITION_DATE,OUT_WORKSHOP_DATE,QUALITY_PEOPLE_NAME,QUALITY_TEST_DATE,EXCEPTION_INFORMATION,OUT_STORAGE_DATE,IN_STORAGE_DATE,TASK_STATE_ID,IS_EXCEPTION,PRINTER_ID
</select> </select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment