Commit 77a372e3 authored by Administrator's avatar Administrator

添加查询区县列表

添加下载装箱单
parent 5ff0201b
...@@ -51,22 +51,22 @@ public class ShiroApi { ...@@ -51,22 +51,22 @@ public class ShiroApi {
@Autowired @Autowired
private FailedinfoService failedinfoService; private FailedinfoService failedinfoService;
@RequestMapping(value={"/","/index"}) @RequestMapping(value = {"/", "/index"})
public String index(Map<String,Object> map){ public String index(Map<String, Object> map) {
System.out.println("HomeController.index()"); System.out.println("HomeController.index()");
//获取到用户信息; //获取到用户信息;
Subject subject = SecurityUtils.getSubject(); Subject subject = SecurityUtils.getSubject();
UserInfo ui = (UserInfo) subject.getPrincipal(); UserInfo ui = (UserInfo) subject.getPrincipal();
map.put("userInfo",ui); map.put("userInfo", ui);
return "/index"; return "/index";
} }
@RequestMapping("/welcome") @RequestMapping("/welcome")
public String welcome(Map<String,Object> map){ public String welcome(Map<String, Object> map) {
//获取到用户信息; //获取到用户信息;
Subject subject = SecurityUtils.getSubject(); Subject subject = SecurityUtils.getSubject();
UserInfo ui = (UserInfo) subject.getPrincipal(); UserInfo ui = (UserInfo) subject.getPrincipal();
map.put("userInfo",ui); map.put("userInfo", ui);
return "/welcome"; return "/welcome";
} }
...@@ -85,9 +85,9 @@ public class ShiroApi { ...@@ -85,9 +85,9 @@ public class ShiroApi {
msg = "密码不正确!"; msg = "密码不正确!";
} else if ("kaptchaValidateFailed".equals(exception)) { } else if ("kaptchaValidateFailed".equals(exception)) {
msg = "验证码错误!"; msg = "验证码错误!";
} else if(AuthenticationException.class.getName().equals(exception)){ } else if (AuthenticationException.class.getName().equals(exception)) {
msg = "用户名密码不能为空!"; msg = "用户名密码不能为空!";
}else{ } else {
msg = exception; msg = exception;
} }
} }
...@@ -99,109 +99,120 @@ public class ShiroApi { ...@@ -99,109 +99,120 @@ public class ShiroApi {
/** /**
* 角色添加; * 角色添加;
*
* @return * @return
*/ */
@RequestMapping("/roleAdd") @RequestMapping("/roleAdd")
@RequiresPermissions("role.add")//权限管理; @RequiresPermissions("role.add")//权限管理;
public String roleAdd(Map<String,Object> map){ public String roleAdd(Map<String, Object> map) {
Subject subject = SecurityUtils.getSubject(); Subject subject = SecurityUtils.getSubject();
UserInfo ui = (UserInfo) subject.getPrincipal(); UserInfo ui = (UserInfo) subject.getPrincipal();
map.put("userInfo",ui); map.put("userInfo", ui);
return "roleAdd"; return "roleAdd";
} }
/** /**
* 权限添加; * 权限添加;
*
* @return * @return
*/ */
@RequestMapping("/permissionAdd") @RequestMapping("/permissionAdd")
@RequiresPermissions("permission.add")//权限管理; @RequiresPermissions("permission.add")//权限管理;
public String permissionAdd(Map<String,Object> map){ public String permissionAdd(Map<String, Object> map) {
List<SysPermission> permissionList = sysPermissionService.getAllActivePermission(); List<SysPermission> permissionList = sysPermissionService.getAllActivePermission();
map.put("permissionList",permissionList); map.put("permissionList", permissionList);
return "permissionAdd"; return "permissionAdd";
} }
/** /**
* 用户添加; * 用户添加;
*
* @return * @return
*/ */
@RequestMapping("/userAdd") @RequestMapping("/userAdd")
@RequiresPermissions("userInfo.add")//权限管理; @RequiresPermissions("userInfo.add")//权限管理;
public String userInfoAdd(Map<String,Object> map){ public String userInfoAdd(Map<String, Object> map) {
List<SysRole> list = sysRoleService.getAllActiveRoleInfo(); List<SysRole> list = sysRoleService.getAllActiveRoleInfo();
map.put("activeRoleList",list); map.put("activeRoleList", list);
return "userInfoAdd"; return "userInfoAdd";
} }
/** /**
* 用户查询. * 用户查询.
*
* @return * @return
*/ */
@RequestMapping("/userList") @RequestMapping("/userList")
@RequiresPermissions("userInfo.view")//权限管理; @RequiresPermissions("userInfo.view")//权限管理;
public String userInfo(Map<String,Object> map){ public String userInfo(Map<String, Object> map) {
List<UserInfo> list = userInfoService.getAllUserInfo(); List<UserInfo> list = userInfoService.getAllUserInfo();
map.put("userInfoList",list); map.put("userInfoList", list);
return "userInfo"; return "userInfo";
} }
/** /**
* 角色查询. * 角色查询.
*
* @return * @return
*/ */
@RequestMapping("/roleList") @RequestMapping("/roleList")
@RequiresPermissions("userInfo.view")//权限管理; @RequiresPermissions("userInfo.view")//权限管理;
public String roleList(Map<String,Object> map){ public String roleList(Map<String, Object> map) {
List<SysRole> list = sysRoleService.getAllRoleInfo(); List<SysRole> list = sysRoleService.getAllRoleInfo();
map.put("roleInfoList",list); map.put("roleInfoList", list);
return "roleInfo"; return "roleInfo";
} }
/** /**
* 权限查询. * 权限查询.
*
* @return * @return
*/ */
@RequestMapping("/permissionList") @RequestMapping("/permissionList")
@RequiresPermissions("userInfo.view")//权限管理; @RequiresPermissions("userInfo.view")//权限管理;
public String permissionList(Map<String,Object> map){ public String permissionList(Map<String, Object> map) {
List<SysPermission> list = sysPermissionService.getAllPermission(); List<SysPermission> list = sysPermissionService.getAllPermission();
map.put("permissionList",list); map.put("permissionList", list);
return "permissionInfo"; return "permissionInfo";
} }
/** /**
* 修改用户. * 修改用户.
*
* @return * @return
*/ */
@RequestMapping("/updateUserInfo") @RequestMapping("/updateUserInfo")
public String updateUserInfo(@RequestParam("userId") String userId, Map<String,Object> map){ public String updateUserInfo(@RequestParam("userId") String userId, Map<String, Object> map) {
UserInfo userInfo = userInfoService.getUserInfoByUserId(Integer.parseInt(userId)); UserInfo userInfo = userInfoService.getUserInfoByUserId(Integer.parseInt(userId));
List<SysRole> roleList = sysRoleService.getAllRoleInfo(); List<SysRole> roleList = sysRoleService.getAllRoleInfo();
map.put("userInfo",userInfo); map.put("userInfo", userInfo);
map.put("roleList",roleList); map.put("roleList", roleList);
return "updateUserInfo"; return "updateUserInfo";
} }
/** /**
* 修改角色 * 修改角色
*
* @return * @return
*/ */
@RequestMapping("/updateRoleInfo") @RequestMapping("/updateRoleInfo")
public String updateRoleInfo(@RequestParam("roleId") String roleId, Map<String,Object> map){ public String updateRoleInfo(@RequestParam("roleId") String roleId, Map<String, Object> map) {
SysRole sysRole = sysRoleService.getRoleByRoleId(Integer.parseInt(roleId)); SysRole sysRole = sysRoleService.getRoleByRoleId(Integer.parseInt(roleId));
List<SysPermission> permissionList = sysPermissionService.getAllActivePermission(); List<SysPermission> permissionList = sysPermissionService.getAllActivePermission();
map.put("sysRole",sysRole); map.put("sysRole", sysRole);
map.put("permissionList",permissionList); map.put("permissionList", permissionList);
return "updateRoleInfo"; return "updateRoleInfo";
} }
/** /**
* 查询任务单; * 查询任务单;
*
* @return * @return
*/ */
@RequestMapping(value = "/getProductionTaskListByID",method = RequestMethod.GET) @RequestMapping(value = "/getProductionTaskListByID", method = RequestMethod.GET)
@RequiresPermissions("userInfo.del")//权限管理; @RequiresPermissions("userInfo.del")//权限管理;
@ResponseBody @ResponseBody
public String getProductionTaskListByID(@RequestParam("id") String id,@Context HttpServletResponse resp){ public String getProductionTaskListByID(@RequestParam("id") String id, @Context HttpServletResponse resp) {
List<ProductionTaskListEntity> productionTaskListEntity = productionTaskListService.findProductionTaskListEntityByID(id); List<ProductionTaskListEntity> productionTaskListEntity = productionTaskListService.findProductionTaskListEntityByID(id);
YXJSONResponse yxjsonResponse = new YXJSONResponse(); YXJSONResponse yxjsonResponse = new YXJSONResponse();
...@@ -214,52 +225,55 @@ public class ShiroApi { ...@@ -214,52 +225,55 @@ public class ShiroApi {
/** /**
* 更新任务单; * 更新任务单;
*
* @return * @return
*/ */
@RequestMapping(value = "/updateProductionTask",method = RequestMethod.GET) @RequestMapping(value = "/updateProductionTask", method = RequestMethod.GET)
@RequiresPermissions("userInfo.add")//权限管理; @RequiresPermissions("userInfo.add")//权限管理;
@ResponseBody @ResponseBody
public String updateProductionTask(@RequestParam("id") String id,@Context HttpServletResponse resp){ public String updateProductionTask(@RequestParam("id") String id, @Context HttpServletResponse resp) {
String map ="{\"production_Task_List_Id\":\"20181016001\",\"make_Type\":8,\"old_Make_Type\":8,} "; String map = "{\"production_Task_List_Id\":\"20181016001\",\"make_Type\":8,\"old_Make_Type\":8,} ";
JSONObject jsonObject = JSONObject.fromObject(map); JSONObject jsonObject = JSONObject.fromObject(map);
ProductionTaskListEntity productionTaskListEntity = (ProductionTaskListEntity)jsonObject.toBean(jsonObject, ProductionTaskListEntity.class); ProductionTaskListEntity productionTaskListEntity = (ProductionTaskListEntity) jsonObject.toBean(jsonObject, ProductionTaskListEntity.class);
YXJSONResponse yxjsonResponse = new YXJSONResponse(); YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8"); resp.setCharacterEncoding("UTF-8");
int i = productionTaskListService.updateProductionTask(productionTaskListEntity); int i = productionTaskListService.updateProductionTask(productionTaskListEntity);
yxjsonResponse.outPutSuccess(i+"更新成功"); yxjsonResponse.outPutSuccess(i + "更新成功");
return yxjsonResponse.toJSONString(); return yxjsonResponse.toJSONString();
} }
/** /**
* 保存任务单; * 保存任务单;
*
* @return * @return
*/ */
@RequestMapping(value = "/addProductionTaskList",method = RequestMethod.GET) @RequestMapping(value = "/addProductionTaskList", method = RequestMethod.GET)
@RequiresPermissions("userInfo.add")//权限管理; @RequiresPermissions("userInfo.add")//权限管理;
@ResponseBody @ResponseBody
public String addProductionTaskList(@RequestParam("id") String id,@Context HttpServletResponse resp){ public String addProductionTaskList(@RequestParam("id") String id, @Context HttpServletResponse resp) {
String map ="{\"productionTaskListId\":\"20181016001\",\"makeType\":4,\"oldMakeType\":7}"; String map = "{\"productionTaskListId\":\"20181016001\",\"makeType\":4,\"oldMakeType\":7}";
JSONObject jsonObject = JSONObject.fromObject(map); JSONObject jsonObject = JSONObject.fromObject(map);
Object productionTaskList = jsonObject.get("productionTaskList"); Object productionTaskList = jsonObject.get("productionTaskList");
Object groupInfoList = jsonObject.get("groupInfoList"); Object groupInfoList = jsonObject.get("groupInfoList");
List<GroupinfoEntity> groupinfoEntities = (List<GroupinfoEntity>)groupInfoList; List<GroupinfoEntity> groupinfoEntities = (List<GroupinfoEntity>) groupInfoList;
ProductionTaskListEntity productionTaskListEntity = (ProductionTaskListEntity)productionTaskList; ProductionTaskListEntity productionTaskListEntity = (ProductionTaskListEntity) productionTaskList;
YXJSONResponse yxjsonResponse = new YXJSONResponse(); YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8"); resp.setCharacterEncoding("UTF-8");
int i = productionTaskListService.addProductionTaskListEntity(productionTaskListEntity,groupinfoEntities); int i = productionTaskListService.addProductionTaskListEntity(productionTaskListEntity, groupinfoEntities);
yxjsonResponse.outPutSuccess(i+"添加成功"); yxjsonResponse.outPutSuccess(i + "添加成功");
return yxjsonResponse.toJSONString(); return yxjsonResponse.toJSONString();
} }
/** /**
* 查询证件信息; * 查询证件信息;
*
* @return * @return
*/ */
@RequestMapping(value = "/findCardInfoByCardIDOrAcceptNo",method = RequestMethod.GET) @RequestMapping(value = "/findCardInfoByCardIDOrAcceptNo", method = RequestMethod.GET)
@RequiresPermissions("userInfo.add")//权限管理; @RequiresPermissions("userInfo.add")//权限管理;
@ResponseBody @ResponseBody
public String findCardInfoByCardIDOrAcceptNo(@RequestParam("id") String id,@Context HttpServletResponse resp){ public String findCardInfoByCardIDOrAcceptNo(@RequestParam("id") String id, @Context HttpServletResponse resp) {
YXJSONResponse yxjsonResponse = new YXJSONResponse(); YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8"); resp.setCharacterEncoding("UTF-8");
...@@ -270,69 +284,70 @@ public class ShiroApi { ...@@ -270,69 +284,70 @@ public class ShiroApi {
/** /**
* 添加快证任务单; * 添加快证任务单;
*
* @return * @return
*/ */
@RequestMapping(value = "/addQuickCyclesheetInfo",method = RequestMethod.GET) @RequestMapping(value = "/addQuickCyclesheetInfo", method = RequestMethod.GET)
@RequiresPermissions("userInfo.add")//权限管理; @RequiresPermissions("userInfo.add")//权限管理;
@ResponseBody @ResponseBody
public String addQuickCyclesheetInfo(@RequestParam("id") String id,@Context HttpServletResponse resp){ public String addQuickCyclesheetInfo(@RequestParam("id") String id, @Context HttpServletResponse resp) {
YXJSONResponse yxjsonResponse = new YXJSONResponse(); YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8"); resp.setCharacterEncoding("UTF-8");
int i = productionTaskListService.addQuickCyclesheetInfo(id); int i = productionTaskListService.addQuickCyclesheetInfo(id);
yxjsonResponse.outPutSuccess(i+"添加成功"); yxjsonResponse.outPutSuccess(i + "添加成功");
return yxjsonResponse.toJSONString(); return yxjsonResponse.toJSONString();
} }
/** /**
* 修改权限 * 修改权限
*
* @return * @return
*/ */
@RequestMapping("/updatePermission") @RequestMapping("/updatePermission")
public String updatePermission(@RequestParam("permissionId") String permissionId, Map<String,Object> map){ public String updatePermission(@RequestParam("permissionId") String permissionId, Map<String, Object> map) {
SysPermission sysPermission = sysPermissionService.getPermissionByPId(Integer.parseInt(permissionId)); SysPermission sysPermission = sysPermissionService.getPermissionByPId(Integer.parseInt(permissionId));
String parentName = sysPermissionService.getParentNameByParentId(sysPermission.getParent_id()); String parentName = sysPermissionService.getParentNameByParentId(sysPermission.getParent_id());
List<SysPermission> permissionList = sysPermissionService.getAllActivePermission(); List<SysPermission> permissionList = sysPermissionService.getAllActivePermission();
map.put("sysPermission",sysPermission); map.put("sysPermission", sysPermission);
map.put("parentName",parentName); map.put("parentName", parentName);
map.put("permissionList",permissionList); map.put("permissionList", permissionList);
return "updatePermission"; return "updatePermission";
} }
/** /**
* 保存派出所照片质量详情; * 保存派出所照片质量详情;
*
* @return * @return
*/ */
@RequestMapping(value = "/savePoliceStationVailedInfoEntity",method = RequestMethod.GET) @RequestMapping(value = "/savePoliceStationVailedInfoEntity", method = RequestMethod.GET)
@RequiresPermissions("userInfo.add")//权限管理; @RequiresPermissions("userInfo.add")//权限管理;
@ResponseBody @ResponseBody
public String savePoliceStationVailedInfoEntity(@RequestParam("id") String id,@Context HttpServletResponse resp){ public String savePoliceStationVailedInfoEntity(@RequestParam("id") String id, @Context HttpServletResponse resp) {
String map ="[{\"cyclesheetid\":\"20181016001\",\"invalid_Count\":1,\"police_Station_Code\":\"41108201\",\"police_Station_Vailed_Info_Id\":\"1\",\"sava_Date\":\"20181025\",\"vailed_Count\":1}]"; String map = "[{\"cyclesheetid\":\"20181016001\",\"invalid_Count\":1,\"police_Station_Code\":\"41108201\",\"police_Station_Vailed_Info_Id\":\"1\",\"sava_Date\":\"20181025\",\"vailed_Count\":1}]";
JSONArray jsonArray = JSONArray.fromObject(map); JSONArray jsonArray = JSONArray.fromObject(map);
List<PoliceStationVailedInfoEntity> policeStationVailedInfoEntities = new ArrayList<>(); List<PoliceStationVailedInfoEntity> policeStationVailedInfoEntities = new ArrayList<>();
for (Object object: jsonArray) { for (Object object : jsonArray) {
PoliceStationVailedInfoEntity o = (PoliceStationVailedInfoEntity)JSONObject.toBean((JSONObject) object, PoliceStationVailedInfoEntity.class); PoliceStationVailedInfoEntity o = (PoliceStationVailedInfoEntity) JSONObject.toBean((JSONObject) object, PoliceStationVailedInfoEntity.class);
policeStationVailedInfoEntities.add(o); policeStationVailedInfoEntities.add(o);
} }
YXJSONResponse yxjsonResponse = new YXJSONResponse(); YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8"); resp.setCharacterEncoding("UTF-8");
int i = productionTaskListService.savePoliceStationVailedInfoEntity(policeStationVailedInfoEntities); int i = productionTaskListService.savePoliceStationVailedInfoEntity(policeStationVailedInfoEntities);
yxjsonResponse.outPutSuccess(i+"添加成功"); yxjsonResponse.outPutSuccess(i + "添加成功");
return yxjsonResponse.toJSONString(); return yxjsonResponse.toJSONString();
} }
/** /**
* test * test
*
* @return * @return
*/ */
@RequestMapping("/test") @RequestMapping("/test")
@RequiresPermissions("userInfo.add")//权限管理; @RequiresPermissions("userInfo.add")//权限管理;
@ResponseBody @ResponseBody
public String test(@RequestParam("id") String permissionId,@Context HttpServletResponse resp){ public String test(@RequestParam("id") String permissionId, @Context HttpServletResponse resp) {
YXJSONResponse yxjsonResponse = new YXJSONResponse(); YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8"); resp.setCharacterEncoding("UTF-8");
List<PoliceStationVailedInfoEntity> policeStationVailedInfoEntities = productionTaskListService.find(permissionId); List<PoliceStationVailedInfoEntity> policeStationVailedInfoEntities = productionTaskListService.find(permissionId);
...@@ -342,6 +357,4 @@ public class ShiroApi { ...@@ -342,6 +357,4 @@ public class ShiroApi {
} }
} }
...@@ -6,6 +6,9 @@ import com.yxproject.start.utils.Md5Utils; ...@@ -6,6 +6,9 @@ import com.yxproject.start.utils.Md5Utils;
import com.yxproject.start.utils.YXJSONResponse; import com.yxproject.start.utils.YXJSONResponse;
import net.sf.json.JSONArray; import net.sf.json.JSONArray;
import net.sf.json.JSONObject; import net.sf.json.JSONObject;
import org.apache.commons.lang.time.DateFormatUtils;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.IncorrectCredentialsException; import org.apache.shiro.authc.IncorrectCredentialsException;
import org.apache.shiro.authc.UnknownAccountException; import org.apache.shiro.authc.UnknownAccountException;
...@@ -21,6 +24,8 @@ import javax.servlet.http.HttpServletResponse; ...@@ -21,6 +24,8 @@ import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.*; import javax.ws.rs.*;
import javax.ws.rs.core.Context; import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import java.io.*;
import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
...@@ -45,6 +50,8 @@ public class UserInfoApi { ...@@ -45,6 +50,8 @@ public class UserInfoApi {
@Autowired @Autowired
private FailedinfoService failedinfoService; private FailedinfoService failedinfoService;
@Autowired
private GroupinfoService groupinfoService;
@GET @GET
@Path("login") @Path("login")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
...@@ -464,6 +471,770 @@ public class UserInfoApi { ...@@ -464,6 +471,770 @@ public class UserInfoApi {
return yxjsonResponse.toJSONString(); return yxjsonResponse.toJSONString();
} }
/**
* 查询区县列表详情;
* @return
*/
@GET
@Path("findProdCountyList")
@Produces(MediaType.APPLICATION_JSON)
@RequiresPermissions("userInfo.add")//权限管理;
public String findProdCountyList(@RequestParam("cyclesheetID") String cyclesheetID, @Context HttpServletResponse resp){
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
List<Map<String, Object>> countyInfoList = groupinfoService.findCountyInfoList(cyclesheetID);
yxjsonResponse.outPutSuccess(countyInfoList);
return yxjsonResponse.toJSONString();
}
/**
* 打印装箱单
*/
@GET
@Path("printPackingList")
@Produces(MediaType.APPLICATION_OCTET_STREAM)
@Consumes(MediaType.APPLICATION_JSON)
// @RequiresPermissions("userInfo.add")//权限管理;
public byte[] printPackingList(@QueryParam("cyclesheetID") String cyclesheetID, @Context 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 = groupinfoService.findCountyInfoList(cyclesheetID);
List<ProductionTaskListEntity> productionTaskListEntityList = productionTaskListService.findProductionTaskListEntityByID(cyclesheetID);
fout = exportExcel(countyInfoList, productionTaskListEntityList.get(0).getMake_Type()+"", productionTaskListEntityList.get(0).getWorkshop(), 6000, productionTaskListEntityList.get(0).getCitycode() ,dateTime,cyclesheetID);
String outFile = dateTime + productionTaskListEntityList.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;
}
/**
* 下载装箱单
*
* @param countyInfoList 装箱单信息
* @param typeName 制证类型
* @param workShop 制证车间
* @param sum 总数
* @param cityName 地市
*/
private String exportExcel(List<Map<String, Object>> countyInfoList, String typeName, String workShop, int sum, String cityName,String permanentPositionDate ,String cyclesheetid) {
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, (int) 30 * 100);
sheet.setColumnWidth(1, (int) 30 * 70);
sheet.setColumnWidth(2, (int) 30 * 80);
sheet.setColumnWidth(3, (int) 30 * 50);
sheet.setColumnWidth(4, (int) 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 < 4; i++) {
cell = row.createCell(i + 1);
cell.setCellValue("");
cell.setCellStyle(style2);
}
CellRangeAddress callRangeAddress = new CellRangeAddress(0, 0, 0, 4);//起始行,结束行,起始列,结束列
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("盒数");
cell.setCellStyle(style);
cell = row.createCell(4); //第五个单元格
cell.setCellValue("入库日期");
cell.setCellStyle(style);
row = sheet.createRow(2);//i+2行之后开始创建
row.setHeightInPoints(Short.parseShort("16"));//设置行高
//创建单元格并且添加数据
cell = row.createCell(0);
cell.setCellValue(cityName);
cell.setCellStyle(style);
for (int i = 0; i < 4; i++) {
cell = row.createCell(i + 1);
cell.setCellValue("");
cell.setCellStyle(style);
}
//第五步插入数据
int num = 0;
for (int i = 0; i < countyInfoList.size(); i++) {
Map<String, Object> map = countyInfoList.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);
} }
if (countyInfoList.size() < 16) {
for (int i = 0; i <= 16 - countyInfoList.size(); i++) {
//创建行
row = sheet.createRow(countyInfoList.size() + 3 + i);// 行之后开始创建
row.setHeightInPoints(Short.parseShort("16"));//设置行高
//创建单元格并且添加数据
for (int j = 0; j < 5; j++) {
cell = row.createCell(j);
cell.setCellValue("");
cell.setCellStyle(style);
}
}
row = sheet.createRow(18);
row.setHeightInPoints(Short.parseShort("16"));//设置行高
//创建单元格并且添加数据
cell = row.createCell(0);
cell.setCellValue("合计");
cell.setCellStyle(style);
cell = row.createCell(1);
cell.setCellValue(sum);
cell.setCellStyle(style);
cell = row.createCell(2);
cell.setCellValue("制证车间");
cell.setCellStyle(style);
if ("p1".equals(workShop) || "p3".equals(workShop)) {
cell = row.createCell(2);
cell.setCellValue(" 平 一 ");
cell.setCellStyle(style2);
} else {
cell = row.createCell(2);
cell.setCellValue("平二");
cell.setCellStyle(style2);
}
cell = row.createCell(3);
cell.setCellValue(num);
cell.setCellStyle(style);
cell = row.createCell(4);
cell.setCellValue(permanentPositionDate);
cell.setCellStyle(style);
row = sheet.createRow(19);
row.setHeightInPoints(Short.parseShort("16"));//设置行高
//创建单元格并且添加数据
cell = row.createCell(0);
cell.setCellValue("类型");
cell.setCellStyle(style);
cell = row.createCell(1);
cell.setCellValue(typeName);
cell.setCellStyle(style);
for (int j = 0; j < 3; j++) {
cell = row.createCell(j + 2);
cell.setCellValue("");
cell.setCellStyle(style);
}
CellRangeAddress callRangeNum1 = new CellRangeAddress(19, 19, 1, 4);//起始行,结束行,起始列,结束列
sheet.addMergedRegion(callRangeNum1);
row = sheet.createRow(20);
row.setHeightInPoints(Short.parseShort("32"));//设置行高
//创建单元格并且添加数据
cell = row.createCell(0);
cell.setCellValue("循环单");
cell.setCellStyle(style);
cell = row.createCell(1);
cell.setCellValue(cyclesheetid);
cell.setCellStyle(style);
for (int j = 0; j < 3; j++) {
cell = row.createCell(j + 2);
cell.setCellValue("");
cell.setCellStyle(style);
}
CellRangeAddress callRangeNum = new CellRangeAddress(20, 20, 1, 4);//起始行,结束行,起始列,结束列
sheet.addMergedRegion(callRangeNum);
row = sheet.createRow(21);
row.setHeightInPoints(Short.parseShort("16"));//设置行高
//创建单元格并且添加数据
cell = row.createCell(0);
cell.setCellValue("出库日期");
cell.setCellStyle(style);
cell = row.createCell(1);
cell.setCellValue("20 年 月 日");
cell.setCellStyle(style);
cell = row.createCell(2);
cell.setCellValue("");
cell.setCellStyle(style);
cell = row.createCell(3);
cell.setCellValue("");
cell.setCellStyle(style);
cell = row.createCell(4);
cell.setCellValue("");
cell.setCellStyle(style);
CellRangeAddress callRangedate = new CellRangeAddress(21, 21, 1, 4);//起始行,结束行,起始列,结束列
sheet.addMergedRegion(callRangedate);
}
if (countyInfoList.size() >= 16) {
row = sheet.createRow(countyInfoList.size() + 3);
row.setHeightInPoints(Short.parseShort("16"));//设置行高
//创建单元格并且添加数据
cell = row.createCell(0);
cell.setCellValue("合计");
cell.setCellStyle(style);
cell = row.createCell(1);
cell.setCellValue(sum);
cell.setCellStyle(style);
cell = row.createCell(2);
cell.setCellValue("制证车间");
cell.setCellStyle(style);
if ("p1".equals(workShop) || "p3".equals(workShop)) {
cell = row.createCell(2);
cell.setCellValue("平一");
cell.setCellStyle(style);
} else {
cell = row.createCell(2);
cell.setCellValue("平二");
cell.setCellStyle(style);
}
cell = row.createCell(3);
cell.setCellValue(num);
cell.setCellStyle(style);
cell = row.createCell(4);
cell.setCellValue(permanentPositionDate);
cell.setCellStyle(style);
row = sheet.createRow(countyInfoList.size() + 4);
row.setHeightInPoints(Short.parseShort("16"));//设置行高
//创建单元格并且添加数据
cell = row.createCell(0);
cell.setCellValue("类型");
cell.setCellStyle(style);
cell = row.createCell(1);
cell.setCellValue(typeName);
cell.setCellStyle(style);
for (int j = 0; j < 3; j++) {
cell = row.createCell(j + 2);
cell.setCellValue("");
cell.setCellStyle(style);
}
row = sheet.createRow(countyInfoList.size() + 5);
row.setHeightInPoints(Short.parseShort("32"));//设置行高
cell = row.createCell(0);
cell.setCellValue("循环单");
cell.setCellStyle(style);
cell = row.createCell(1);
cell.setCellValue(cyclesheetid);
cell.setCellStyle(style);
for (int j = 0; j < 3; j++) {
cell = row.createCell(j + 2);
cell.setCellValue("");
cell.setCellStyle(style);
}
CellRangeAddress callRangeNum = new CellRangeAddress(countyInfoList.size() + 5, countyInfoList.size() + 5, 1, 4);//起始行,结束行,起始列,结束列
sheet.addMergedRegion(callRangeNum);
row = sheet.createRow(countyInfoList.size() + 6);
row.setHeightInPoints(Short.parseShort("16"));//设置行高
//创建单元格并且添加数据
cell = row.createCell(0);
cell.setCellValue("出库日期");
cell.setCellStyle(style);
cell = row.createCell(1);
cell.setCellValue("20 年 月 日");
cell.setCellStyle(style);
for (int j = 0; j < 3; j++) {
cell = row.createCell(j + 2);
cell.setCellValue("");
cell.setCellStyle(style);
}
CellRangeAddress callRangedate = new CellRangeAddress(countyInfoList.size() + 6, countyInfoList.size() + 6, 1, 4);//起始行,结束行,起始列,结束列
sheet.addMergedRegion(callRangedate);
}
//创建分单
//创建辖区合单
HSSFSheet mergeSheet = wb.createSheet("辖区合单");
mergeSheet.setColumnWidth(0, (int) 30 * 115);
mergeSheet.setColumnWidth(1, (int) 30 * 70);
mergeSheet.setColumnWidth(2, (int) 30 * 80);
mergeSheet.setColumnWidth(3, (int) 30 * 50);
mergeSheet.setColumnWidth(4, (int) 30 * 110);
HSSFPrintSetup ps1 = mergeSheet.getPrintSetup();
ps1.setLandscape(true); // 打印方向,true:横向,false:纵向
ps1.setPaperSize(HSSFPrintSetup.B5_PAPERSIZE); //纸张
//计算合单的行数
int lineNum = 0;
//计算合单的总数
int mergeSum = 0;
//计算合单的盒数
int boxNum = 0;
for (int a = 0; a < countyInfoList.size(); a++) {
Map<String, Object> map = countyInfoList.get(a);
//第二步创建sheet
if (map.get("countyName").toString().contains("区")) {
//第三步创建行row:添加表头0行
row = mergeSheet.createRow(0);
row.setHeightInPoints(Short.parseShort("20"));//设置行高
cell = row.createCell(0); //第一个单元格
cell.setCellValue("二代身份证统计表"); //设定值
cell.setCellStyle(style2);
for (int j = 0; j < 4; j++) {
cell = row.createCell(j + 1);
cell.setCellValue("");
cell.setCellStyle(style2);
}
CellRangeAddress callRange = new CellRangeAddress(0, 0, 0, 4);//起始行,结束行,起始列,结束列
mergeSheet.addMergedRegion(callRange);
row = mergeSheet.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("盒数");
cell.setCellStyle(style);
cell = row.createCell(4); //第五个单元格
cell.setCellValue("入库日期");
cell.setCellStyle(style);
//第五步插入数据
//创建行
row = mergeSheet.createRow(2);
row.setHeightInPoints(Short.parseShort("16"));//设置行高
//创建单元格并且添加数据
cell = row.createCell(0);
cell.setCellValue(cityName);
cell.setCellStyle(style);
for (int j = 0; j < 4; j++) {
cell = row.createCell(j + 1);
cell.setCellValue("");
cell.setCellStyle(style);
}
row = mergeSheet.createRow(lineNum + 3);
row.setHeightInPoints(Short.parseShort("16"));//设置行高
//创建单元格并且添加数据
cell = row.createCell(0);
cell.setCellValue(map.get("countyName").toString());
cell.setCellStyle(style);
cell = row.createCell(1);
cell.setCellValue(map.get("download") + "");
mergeSum += Integer.valueOf(map.get("download") + "");
cell.setCellStyle(style);
cell = row.createCell(2);
cell.setCellValue("");
cell.setCellStyle(style);
cell = row.createCell(3);
cell.setCellStyle(style);
cell.setCellValue(((Integer.parseInt(map.get("download") + "") % 250==0?Integer.parseInt(map.get("download") + "") / 250:Integer.parseInt(map.get("download") + "") / 250+1)) + "");
boxNum += ((Integer.parseInt(map.get("download") + "") % 250==0?Integer.parseInt(map.get("download") + "") / 250:Integer.parseInt(map.get("download") + "") / 250+1));
cell = row.createCell(4);
cell.setCellValue("");
cell.setCellStyle(style);
//创建空的行和列
for (int i = 0; i <= 14 - lineNum; i++) {
//创建行
row = mergeSheet.createRow(lineNum + 4 + i);// 行之后开始创建
row.setHeightInPoints(Short.parseShort("16"));//设置行高
//创建单元格并且添加数据
for (int j = 0; j < 5; j++) {
cell = row.createCell(j);
cell.setCellValue("");
cell.setCellStyle(style);
}
}
row = mergeSheet.createRow(18);
row.setHeightInPoints(Short.parseShort("16"));//设置行高
//创建单元格并且添加数据
cell = row.createCell(0);
cell.setCellValue("合计");
cell.setCellStyle(style);
cell = row.createCell(1);
cell.setCellValue(mergeSum + "");
cell.setCellStyle(style);
cell = row.createCell(2);
cell.setCellValue("制证车间");
cell.setCellStyle(style);
if ("p1".equals(workShop) || "p3".equals(workShop)) {
cell = row.createCell(2);
cell.setCellValue("平一");
cell.setCellStyle(style);
} else {
cell = row.createCell(2);
cell.setCellValue("平二");
cell.setCellStyle(style);
}
cell.setCellStyle(style);
cell = row.createCell(3);
cell.setCellValue(boxNum + "");
cell.setCellStyle(style);
cell = row.createCell(4);
cell.setCellValue(permanentPositionDate);
cell.setCellStyle(style);
//创建单元格并且添加数据
row = mergeSheet.createRow(19);
row.setHeightInPoints(Short.parseShort("16"));//设置行高
cell = row.createCell(0);
cell.setCellValue("类型");
cell.setCellStyle(style);
cell = row.createCell(1);
cell.setCellValue(typeName);
cell.setCellStyle(style);
cell = row.createCell(2);
cell.setCellValue("");
cell.setCellStyle(style);
cell = row.createCell(3);
cell.setCellValue("");
cell.setCellStyle(style);
cell = row.createCell(4);
cell.setCellValue("");
cell.setCellStyle(style);
CellRangeAddress callRangea = new CellRangeAddress(19, 19, 1, 4);//起始行,结束行,起始列,结束列
mergeSheet.addMergedRegion(callRangea);
//创建单元格并且添加数据
row = mergeSheet.createRow(20);
row.setHeightInPoints(Short.parseShort("32"));//设置行高
cell = row.createCell(0);
cell.setCellValue("编号");
cell.setCellStyle(style);
cell = row.createCell(1);
cell.setCellValue(cyclesheetid);
cell.setCellStyle(style);
cell = row.createCell(0);
cell.setCellValue("循环单");
cell.setCellStyle(style);
cell = row.createCell(2);
cell.setCellValue("");
cell.setCellStyle(style);
cell = row.createCell(3);
cell.setCellValue("");
cell.setCellStyle(style);
cell = row.createCell(4);
cell.setCellValue("");
cell.setCellStyle(style);
CellRangeAddress callRangea1 = new CellRangeAddress(20, 20, 1, 4);//起始行,结束行,起始列,结束列
mergeSheet.addMergedRegion(callRangea1);
row = mergeSheet.createRow(21);
row.setHeightInPoints(Short.parseShort("16"));//设置行高
//创建单元格并且添加数据
cell = row.createCell(0);
cell.setCellValue("出库日期");
cell.setCellStyle(style);
cell = row.createCell(1);
cell.setCellValue("20 年 月 日");
cell.setCellStyle(style);
cell = row.createCell(2);
cell.setCellValue("");
cell.setCellStyle(style);
cell = row.createCell(3);
cell.setCellValue("");
cell.setCellStyle(style);
cell = row.createCell(4);
cell.setCellValue("");
cell.setCellStyle(style);
CellRangeAddress callRangeb = new CellRangeAddress(21, 21, 1, 4);//起始行,结束行,起始列,结束列
mergeSheet.addMergedRegion(callRangeb);
lineNum++;
} else {
sheet = wb.createSheet(a + "-" + (String) map.get("countyName"));
sheet.setColumnWidth(0, (int) 30 * 100);
sheet.setColumnWidth(1, (int) 30 * 70);
sheet.setColumnWidth(2, (int) 30 * 80);
sheet.setColumnWidth(3, (int) 30 * 50);
sheet.setColumnWidth(4, (int) 30 * 110);
HSSFPrintSetup ps2 = sheet.getPrintSetup();
ps2.setLandscape(true); // 打印方向,true:横向,false:纵向
ps2.setPaperSize(HSSFPrintSetup.B5_PAPERSIZE);
//第三步创建行row:添加表头0行
row = sheet.createRow(0);
row.setHeightInPoints(Short.parseShort("20"));//设置行高
cell = row.createCell(0); //第一个单元格
cell.setCellValue("二代身份证统计表"); //设定值
cell.setCellStyle(style2);
for (int j = 0; j < 4; j++) {
cell = row.createCell(j + 1);
cell.setCellValue("");
cell.setCellStyle(style2);
}
CellRangeAddress callRange = new CellRangeAddress(0, 0, 0, 4);//起始行,结束行,起始列,结束列
sheet.addMergedRegion(callRange);
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("盒数");
cell.setCellStyle(style);
cell = row.createCell(4); //第五个单元格
cell.setCellValue("入库日期");
cell.setCellStyle(style);
//第五步插入数据
//创建行
row = sheet.createRow(2);
row.setHeightInPoints(Short.parseShort("16"));//设置行高
//创建单元格并且添加数据
cell = row.createCell(0);
// cell.setCellValue(typeName);
cell.setCellValue(cityName);
cell.setCellStyle(style);
for (int j = 0; j < 4; j++) {
cell = row.createCell(j + 1);
cell.setCellValue("");
cell.setCellStyle(style);
}
row = sheet.createRow(3);
row.setHeightInPoints(Short.parseShort("16"));//设置行高
//创建单元格并且添加数据
cell = row.createCell(0);
cell.setCellValue(map.get("countyName").toString());
cell.setCellStyle(style);
cell = row.createCell(1);
cell.setCellValue(map.get("download") + "");
cell.setCellStyle(style);
cell = row.createCell(2);
cell.setCellValue("");
cell.setCellStyle(style);
cell = row.createCell(3);
cell.setCellStyle(style);
cell.setCellValue(((Integer.parseInt(map.get("download") + "") % 250==0?Integer.parseInt(map.get("download") + "") / 250:Integer.parseInt(map.get("download") + "") / 250+1)) + "");
cell = row.createCell(4);
cell.setCellValue("");
cell.setCellStyle(style);
//创建空的行和列
for (int i = 0; i <= 14; i++) {
//创建行
row = sheet.createRow(4 + i);// 行之后开始创建
row.setHeightInPoints(Short.parseShort("16"));//设置行高
//创建单元格并且添加数据
for (int j = 0; j < 5; j++) {
cell = row.createCell(j);
cell.setCellValue("");
cell.setCellStyle(style);
}
}
row = sheet.createRow(18);
row.setHeightInPoints(Short.parseShort("16"));//设置行高
//创建单元格并且添加数据
cell = row.createCell(0);
cell.setCellValue("合计");
cell.setCellStyle(style);
cell = row.createCell(1);
cell.setCellValue(Integer.valueOf(map.get("download") + ""));
cell.setCellStyle(style);
cell = row.createCell(2);
cell.setCellValue("制证车间");
cell.setCellStyle(style);
if ("p1".equals(workShop) || "p3".equals(workShop)) {
cell = row.createCell(2);
cell.setCellValue("平一");
cell.setCellStyle(style);
} else {
cell = row.createCell(2);
cell.setCellValue("平二");
cell.setCellStyle(style);
}
cell.setCellStyle(style);
cell = row.createCell(3);
cell.setCellValue(((Integer.parseInt(map.get("download") + "") % 250==0?Integer.parseInt(map.get("download") + "") / 250:Integer.parseInt(map.get("download") + "") / 250+1)) + "");
cell.setCellStyle(style);
cell = row.createCell(4);
cell.setCellValue(permanentPositionDate);
cell.setCellStyle(style);
//创建单元格并且添加数据
row = sheet.createRow(19);
row.setHeightInPoints(Short.parseShort("16"));//设置行高
cell = row.createCell(0);
cell.setCellValue("类型");
cell.setCellStyle(style);
cell = row.createCell(1);
cell.setCellValue(typeName);
cell.setCellStyle(style);
cell = row.createCell(2);
cell.setCellValue("");
cell.setCellStyle(style);
cell = row.createCell(3);
cell.setCellValue("");
cell.setCellStyle(style);
cell = row.createCell(4);
cell.setCellValue("");
cell.setCellStyle(style);
CellRangeAddress callRangea = new CellRangeAddress(19, 19, 1, 4);//起始行,结束行,起始列,结束列
sheet.addMergedRegion(callRangea);
//创建单元格并且添加数据
row = sheet.createRow(20);
row.setHeightInPoints(Short.parseShort("32"));//设置行高
cell = row.createCell(0);
cell.setCellValue("编号");
cell.setCellStyle(style);
cell = row.createCell(1);
cell.setCellValue(cyclesheetid);
cell.setCellStyle(style);
cell = row.createCell(0);
cell.setCellValue("循环单");
cell.setCellStyle(style);
cell = row.createCell(2);
cell.setCellValue("");
cell.setCellStyle(style);
cell = row.createCell(3);
cell.setCellValue("");
cell.setCellStyle(style);
cell = row.createCell(4);
cell.setCellValue("");
cell.setCellStyle(style);
CellRangeAddress callRangea1 = new CellRangeAddress(20, 20, 1, 4);//起始行,结束行,起始列,结束列
sheet.addMergedRegion(callRangea1);
row = sheet.createRow(21);
row.setHeightInPoints(Short.parseShort("16"));//设置行高
//创建单元格并且添加数据
cell = row.createCell(0);
cell.setCellValue("出库日期");
cell.setCellStyle(style);
cell = row.createCell(1);
cell.setCellValue("20 年 月 日");
cell.setCellStyle(style);
cell = row.createCell(2);
cell.setCellValue("");
cell.setCellStyle(style);
cell = row.createCell(3);
cell.setCellValue("");
cell.setCellStyle(style);
cell = row.createCell(4);
cell.setCellValue("");
cell.setCellStyle(style);
CellRangeAddress callRangeb = new CellRangeAddress(21, 21, 1, 4);//起始行,结束行,起始列,结束列
sheet.addMergedRegion(callRangeb);
}
}
//第六步将生成excel文件保存到指定路径下
FileOutputStream fout = null;
try {
fout = new FileOutputStream("F:\\Excel\\" + simpleDateFormat.format(new Date()) + countyInfoList.get(0).get("countyName") + ".xls");
// fout = new FileOutputStream("D:\\" + simpleDateFormat.format(new Date()) + list.get(0).getString("countyName") + ".xls");
wb.write(fout);
fout.close();
} catch (IOException e) {
e.printStackTrace();
}
System.out.println("Excel文件生成成功..." + new Date());
return "F:\\Excel\\" + simpleDateFormat.format(new Date()) +countyInfoList.get(0).get("countyName") + ".xls";
// return "D:\\" + simpleDateFormat.format(new Date()) + list.get(0).getString("countyName") + ".xls";
}
}
...@@ -100,6 +100,7 @@ public class FailedinfoEntity { ...@@ -100,6 +100,7 @@ public class FailedinfoEntity {
public void setPrint_Date(String print_Date) { public void setPrint_Date(String print_Date) {
this.print_Date = print_Date; this.print_Date = print_Date;
} }
@Basic @Basic
@Column(name = "STATE", nullable = false, precision = 0) @Column(name = "STATE", nullable = false, precision = 0)
public long getState() { public long getState() {
...@@ -129,10 +130,8 @@ public class FailedinfoEntity { ...@@ -129,10 +130,8 @@ public class FailedinfoEntity {
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(failedinfoid,failed_Reason, groupno,cyclesheetid, position_Date, finish_Date,allot_Date,print_Date,state); return Objects.hash(failedinfoid, failed_Reason, groupno, cyclesheetid, position_Date, finish_Date, allot_Date, print_Date, state);
} }
} }
...@@ -53,6 +53,7 @@ public class GroupinfoEntity { ...@@ -53,6 +53,7 @@ public class GroupinfoEntity {
public void setGrouptype(Long grouptype) { public void setGrouptype(Long grouptype) {
this.grouptype = grouptype; this.grouptype = grouptype;
} }
@Basic @Basic
@Column(name = "VAILD_COUNT", nullable = true, precision = 0) @Column(name = "VAILD_COUNT", nullable = true, precision = 0)
public Long getValid_Count() { public Long getValid_Count() {
...@@ -62,6 +63,7 @@ public class GroupinfoEntity { ...@@ -62,6 +63,7 @@ public class GroupinfoEntity {
public void setValid_Count(Long valid_Count) { public void setValid_Count(Long valid_Count) {
this.valid_Count = valid_Count; this.valid_Count = valid_Count;
} }
@Basic @Basic
@Column(name = "INVALID_COUNT", nullable = true, precision = 0) @Column(name = "INVALID_COUNT", nullable = true, precision = 0)
public Long getInvalid_Count() { public Long getInvalid_Count() {
...@@ -87,6 +89,6 @@ public class GroupinfoEntity { ...@@ -87,6 +89,6 @@ public class GroupinfoEntity {
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(groupid, groupno,cyclesheetid, grouptype, valid_Count, invalid_Count); return Objects.hash(groupid, groupno, cyclesheetid, grouptype, valid_Count, invalid_Count);
} }
} }
...@@ -15,6 +15,7 @@ public class PoliceStationVailedInfoEntity { ...@@ -15,6 +15,7 @@ public class PoliceStationVailedInfoEntity {
private Long vailed_Count; private Long vailed_Count;
private Long invalid_Count; private Long invalid_Count;
private String sava_Date; private String sava_Date;
@Id @Id
@Column(name = "POLICE_STATION_VAILED_INFO_ID", nullable = false, length = 20) @Column(name = "POLICE_STATION_VAILED_INFO_ID", nullable = false, length = 20)
public String getPolice_Station_Vailed_Info_Id() { public String getPolice_Station_Vailed_Info_Id() {
...@@ -24,6 +25,7 @@ public class PoliceStationVailedInfoEntity { ...@@ -24,6 +25,7 @@ public class PoliceStationVailedInfoEntity {
public void setPolice_Station_Vailed_Info_Id(String police_Station_Vailed_Info_Id) { public void setPolice_Station_Vailed_Info_Id(String police_Station_Vailed_Info_Id) {
this.police_Station_Vailed_Info_Id = police_Station_Vailed_Info_Id; this.police_Station_Vailed_Info_Id = police_Station_Vailed_Info_Id;
} }
@Basic @Basic
@Column(name = "CYCLESHEETID", nullable = true, precision = 0) @Column(name = "CYCLESHEETID", nullable = true, precision = 0)
public String getCyclesheetid() { public String getCyclesheetid() {
...@@ -33,6 +35,7 @@ public class PoliceStationVailedInfoEntity { ...@@ -33,6 +35,7 @@ public class PoliceStationVailedInfoEntity {
public void setCyclesheetid(String cyclesheetid) { public void setCyclesheetid(String cyclesheetid) {
this.cyclesheetid = cyclesheetid; this.cyclesheetid = cyclesheetid;
} }
@Basic @Basic
@Column(name = "POLICE_STATION_CODE", nullable = true, precision = 0) @Column(name = "POLICE_STATION_CODE", nullable = true, precision = 0)
public String getPolice_Station_Code() { public String getPolice_Station_Code() {
...@@ -52,6 +55,7 @@ public class PoliceStationVailedInfoEntity { ...@@ -52,6 +55,7 @@ public class PoliceStationVailedInfoEntity {
public void setVailed_Count(Long vailed_Count) { public void setVailed_Count(Long vailed_Count) {
this.vailed_Count = vailed_Count; this.vailed_Count = vailed_Count;
} }
@Basic @Basic
@Column(name = "INVALID_COUNT", nullable = true, precision = 0) @Column(name = "INVALID_COUNT", nullable = true, precision = 0)
public Long getInvalid_Count() { public Long getInvalid_Count() {
...@@ -61,6 +65,7 @@ public class PoliceStationVailedInfoEntity { ...@@ -61,6 +65,7 @@ public class PoliceStationVailedInfoEntity {
public void setInvalid_Count(Long invalid_Count) { public void setInvalid_Count(Long invalid_Count) {
this.invalid_Count = invalid_Count; this.invalid_Count = invalid_Count;
} }
@Basic @Basic
@Column(name = "SAVA_DATE", nullable = true, length = 20) @Column(name = "SAVA_DATE", nullable = true, length = 20)
public String getSava_Date() { public String getSava_Date() {
...@@ -70,6 +75,7 @@ public class PoliceStationVailedInfoEntity { ...@@ -70,6 +75,7 @@ public class PoliceStationVailedInfoEntity {
public void setSava_Date(String sava_Date) { public void setSava_Date(String sava_Date) {
this.sava_Date = sava_Date; this.sava_Date = sava_Date;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) return true; if (this == o) return true;
...@@ -85,6 +91,6 @@ public class PoliceStationVailedInfoEntity { ...@@ -85,6 +91,6 @@ public class PoliceStationVailedInfoEntity {
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(police_Station_Vailed_Info_Id,cyclesheetid,police_Station_Code, vailed_Count, invalid_Count, sava_Date); return Objects.hash(police_Station_Vailed_Info_Id, cyclesheetid, police_Station_Code, vailed_Count, invalid_Count, sava_Date);
} }
} }
...@@ -23,6 +23,7 @@ public class AccCardTEntity { ...@@ -23,6 +23,7 @@ public class AccCardTEntity {
private String begin_Date; private String begin_Date;
private String apply_Reason; private String apply_Reason;
private String status_No; private String status_No;
@Basic @Basic
@Column(name = "UPLOAD_NO", nullable = false, length = 22) @Column(name = "UPLOAD_NO", nullable = false, length = 22)
public String getUpload_No() { public String getUpload_No() {
...@@ -32,6 +33,7 @@ public class AccCardTEntity { ...@@ -32,6 +33,7 @@ public class AccCardTEntity {
public void setUpload_No(String upload_No) { public void setUpload_No(String upload_No) {
this.upload_No = upload_No; this.upload_No = upload_No;
} }
@Id @Id
@Column(name = "ACCEPT_NO", nullable = false, length = 12) @Column(name = "ACCEPT_NO", nullable = false, length = 12)
public String getAccept_No() { public String getAccept_No() {
...@@ -61,6 +63,7 @@ public class AccCardTEntity { ...@@ -61,6 +63,7 @@ public class AccCardTEntity {
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
@Basic @Basic
@Column(name = "SEX_NO", nullable = false, length = 1) @Column(name = "SEX_NO", nullable = false, length = 1)
public String getSex_No() { public String getSex_No() {
...@@ -70,6 +73,7 @@ public class AccCardTEntity { ...@@ -70,6 +73,7 @@ public class AccCardTEntity {
public void setSex_No(String sex_No) { public void setSex_No(String sex_No) {
this.sex_No = sex_No; this.sex_No = sex_No;
} }
@Basic @Basic
@Column(name = "NATION_NO", nullable = false, length = 2) @Column(name = "NATION_NO", nullable = false, length = 2)
public String getNation_No() { public String getNation_No() {
...@@ -89,6 +93,7 @@ public class AccCardTEntity { ...@@ -89,6 +93,7 @@ public class AccCardTEntity {
public void setBirthday(String birthday) { public void setBirthday(String birthday) {
this.birthday = birthday; this.birthday = birthday;
} }
@Basic @Basic
@Column(name = "ID_NO", nullable = false, length = 18) @Column(name = "ID_NO", nullable = false, length = 18)
public String getId_No() { public String getId_No() {
...@@ -138,6 +143,7 @@ public class AccCardTEntity { ...@@ -138,6 +143,7 @@ public class AccCardTEntity {
public void setAddress1(String address1) { public void setAddress1(String address1) {
this.address1 = address1; this.address1 = address1;
} }
@Basic @Basic
@Column(name = "SIGN_GOVT", nullable = false, length = 45) @Column(name = "SIGN_GOVT", nullable = false, length = 45)
public String getSign_Govt() { public String getSign_Govt() {
...@@ -147,6 +153,7 @@ public class AccCardTEntity { ...@@ -147,6 +153,7 @@ public class AccCardTEntity {
public void setSign_Govt(String sign_Govt) { public void setSign_Govt(String sign_Govt) {
this.sign_Govt = sign_Govt; this.sign_Govt = sign_Govt;
} }
@Basic @Basic
@Column(name = "EXPIRE_DATE", nullable = false, length = 8) @Column(name = "EXPIRE_DATE", nullable = false, length = 8)
public String getExpire_Date() { public String getExpire_Date() {
...@@ -156,6 +163,7 @@ public class AccCardTEntity { ...@@ -156,6 +163,7 @@ public class AccCardTEntity {
public void setExpire_Date(String expire_Date) { public void setExpire_Date(String expire_Date) {
this.expire_Date = expire_Date; this.expire_Date = expire_Date;
} }
@Basic @Basic
@Column(name = "BEGIN_DATE", nullable = false, length = 8) @Column(name = "BEGIN_DATE", nullable = false, length = 8)
public String getBegin_Date() { public String getBegin_Date() {
...@@ -165,6 +173,7 @@ public class AccCardTEntity { ...@@ -165,6 +173,7 @@ public class AccCardTEntity {
public void setBegin_Date(String begin_Date) { public void setBegin_Date(String begin_Date) {
this.begin_Date = begin_Date; this.begin_Date = begin_Date;
} }
@Basic @Basic
@Column(name = "APPLY_REASON", nullable = false, length = 2) @Column(name = "APPLY_REASON", nullable = false, length = 2)
public String getApply_Reason() { public String getApply_Reason() {
...@@ -174,6 +183,7 @@ public class AccCardTEntity { ...@@ -174,6 +183,7 @@ public class AccCardTEntity {
public void setApply_Reason(String apply_Reason) { public void setApply_Reason(String apply_Reason) {
this.apply_Reason = apply_Reason; this.apply_Reason = apply_Reason;
} }
@Basic @Basic
@Column(name = "STATUS_NO", nullable = true, length = 1) @Column(name = "STATUS_NO", nullable = true, length = 1)
public String getStatus_No() { public String getStatus_No() {
......
...@@ -11,6 +11,7 @@ public class AccGroupRelationTEntity { ...@@ -11,6 +11,7 @@ public class AccGroupRelationTEntity {
private String deal_Status; private String deal_Status;
private String deal_Date; private String deal_Date;
private String upload_Unit_No; private String upload_Unit_No;
@Id @Id
@Column(name = "GROUP_NO", nullable = false, length = 10) @Column(name = "GROUP_NO", nullable = false, length = 10)
public String getGroup_No() { public String getGroup_No() {
...@@ -20,6 +21,7 @@ public class AccGroupRelationTEntity { ...@@ -20,6 +21,7 @@ public class AccGroupRelationTEntity {
public void setGroup_No(String group_No) { public void setGroup_No(String group_No) {
this.group_No = group_No; this.group_No = group_No;
} }
@Basic @Basic
@Column(name = "ORIGINAL_NO", nullable = false, length = 25) @Column(name = "ORIGINAL_NO", nullable = false, length = 25)
public String getOriginal_No() { public String getOriginal_No() {
...@@ -29,6 +31,7 @@ public class AccGroupRelationTEntity { ...@@ -29,6 +31,7 @@ public class AccGroupRelationTEntity {
public void setOriginal_No(String original_No) { public void setOriginal_No(String original_No) {
this.original_No = original_No; this.original_No = original_No;
} }
@Basic @Basic
@Column(name = "DEAL_STATUS", nullable = true, length = 1) @Column(name = "DEAL_STATUS", nullable = true, length = 1)
public String getDeal_Status() { public String getDeal_Status() {
...@@ -38,6 +41,7 @@ public class AccGroupRelationTEntity { ...@@ -38,6 +41,7 @@ public class AccGroupRelationTEntity {
public void setDeal_Status(String deal_Status) { public void setDeal_Status(String deal_Status) {
this.deal_Status = deal_Status; this.deal_Status = deal_Status;
} }
@Basic @Basic
@Column(name = "DEAL_DATE", nullable = false, length = 8) @Column(name = "DEAL_DATE", nullable = false, length = 8)
public String getDeal_Date() { public String getDeal_Date() {
...@@ -47,6 +51,7 @@ public class AccGroupRelationTEntity { ...@@ -47,6 +51,7 @@ public class AccGroupRelationTEntity {
public void setDeal_Date(String deal_Date) { public void setDeal_Date(String deal_Date) {
this.deal_Date = deal_Date; this.deal_Date = deal_Date;
} }
@Basic @Basic
@Column(name = "UPLOAD_UNIT_NO", nullable = false, length = 12) @Column(name = "UPLOAD_UNIT_NO", nullable = false, length = 12)
public String getUpload_Unit_No() { public String getUpload_Unit_No() {
......
...@@ -15,6 +15,7 @@ public class AccGroupTEntity { ...@@ -15,6 +15,7 @@ public class AccGroupTEntity {
private Byte invalid_Count; private Byte invalid_Count;
private Time submit_Date; private Time submit_Date;
private String submit_Code; private String submit_Code;
@Id @Id
@Column(name = "GROUP_NO", nullable = false, length = 10) @Column(name = "GROUP_NO", nullable = false, length = 10)
public String getGroup_No() { public String getGroup_No() {
...@@ -24,6 +25,7 @@ public class AccGroupTEntity { ...@@ -24,6 +25,7 @@ public class AccGroupTEntity {
public void setGroup_No(String group_No) { public void setGroup_No(String group_No) {
this.group_No = group_No; this.group_No = group_No;
} }
@Basic @Basic
@Column(name = "USER_CODE", nullable = true, length = 8) @Column(name = "USER_CODE", nullable = true, length = 8)
public String getUser_Code() { public String getUser_Code() {
...@@ -33,6 +35,7 @@ public class AccGroupTEntity { ...@@ -33,6 +35,7 @@ public class AccGroupTEntity {
public void setUser_Code(String user_Code) { public void setUser_Code(String user_Code) {
this.user_Code = user_Code; this.user_Code = user_Code;
} }
@Basic @Basic
@Column(name = "IMPORT_TIME", nullable = true) @Column(name = "IMPORT_TIME", nullable = true)
public Time getImport_Time() { public Time getImport_Time() {
...@@ -42,6 +45,7 @@ public class AccGroupTEntity { ...@@ -42,6 +45,7 @@ public class AccGroupTEntity {
public void setImport_Time(Time import_Time) { public void setImport_Time(Time import_Time) {
this.import_Time = import_Time; this.import_Time = import_Time;
} }
@Basic @Basic
@Column(name = "DEAL_FLAG", nullable = false, length = 1) @Column(name = "DEAL_FLAG", nullable = false, length = 1)
public String getDeal_Flag() { public String getDeal_Flag() {
...@@ -51,6 +55,7 @@ public class AccGroupTEntity { ...@@ -51,6 +55,7 @@ public class AccGroupTEntity {
public void setDeal_Flag(String deal_Flag) { public void setDeal_Flag(String deal_Flag) {
this.deal_Flag = deal_Flag; this.deal_Flag = deal_Flag;
} }
@Basic @Basic
@Column(name = "VALID_COUNT", nullable = true, precision = 0) @Column(name = "VALID_COUNT", nullable = true, precision = 0)
public Byte getValid_Count() { public Byte getValid_Count() {
...@@ -60,6 +65,7 @@ public class AccGroupTEntity { ...@@ -60,6 +65,7 @@ public class AccGroupTEntity {
public void setValid_Count(Byte valid_Count) { public void setValid_Count(Byte valid_Count) {
this.valid_Count = valid_Count; this.valid_Count = valid_Count;
} }
@Basic @Basic
@Column(name = "INVALID_COUNT", nullable = true, precision = 0) @Column(name = "INVALID_COUNT", nullable = true, precision = 0)
public Byte getInvalid_Count() { public Byte getInvalid_Count() {
...@@ -69,6 +75,7 @@ public class AccGroupTEntity { ...@@ -69,6 +75,7 @@ public class AccGroupTEntity {
public void setInvalid_Count(Byte invalid_Count) { public void setInvalid_Count(Byte invalid_Count) {
this.invalid_Count = invalid_Count; this.invalid_Count = invalid_Count;
} }
@Basic @Basic
@Column(name = "SUBMIT_DATE", nullable = true) @Column(name = "SUBMIT_DATE", nullable = true)
public Time getSubmit_Date() { public Time getSubmit_Date() {
...@@ -78,6 +85,7 @@ public class AccGroupTEntity { ...@@ -78,6 +85,7 @@ public class AccGroupTEntity {
public void setSubmit_Date(Time submit_Date) { public void setSubmit_Date(Time submit_Date) {
this.submit_Date = submit_Date; this.submit_Date = submit_Date;
} }
@Basic @Basic
@Column(name = "SUBMIT_CODE", nullable = true, length = 8) @Column(name = "SUBMIT_CODE", nullable = true, length = 8)
public String getSubmit_Code() { public String getSubmit_Code() {
......
...@@ -15,6 +15,7 @@ public class ProdApplyInfoTEntity { ...@@ -15,6 +15,7 @@ public class ProdApplyInfoTEntity {
private String apply_Address; private String apply_Address;
private String draw_Type; private String draw_Type;
private String province_No; private String province_No;
@Basic @Basic
@Column(name = "UPLOAD_NO", nullable = false, length = 22) @Column(name = "UPLOAD_NO", nullable = false, length = 22)
public String getUpload_No() { public String getUpload_No() {
...@@ -24,6 +25,7 @@ public class ProdApplyInfoTEntity { ...@@ -24,6 +25,7 @@ public class ProdApplyInfoTEntity {
public void setUpload_No(String upload_No) { public void setUpload_No(String upload_No) {
this.upload_No = upload_No; this.upload_No = upload_No;
} }
@Id @Id
@Column(name = "ACCEPT_NO", nullable = false, length = 12) @Column(name = "ACCEPT_NO", nullable = false, length = 12)
public String getAccept_No() { public String getAccept_No() {
...@@ -33,6 +35,7 @@ public class ProdApplyInfoTEntity { ...@@ -33,6 +35,7 @@ public class ProdApplyInfoTEntity {
public void setAccept_No(String accept_No) { public void setAccept_No(String accept_No) {
this.accept_No = accept_No; this.accept_No = accept_No;
} }
@Basic @Basic
@Column(name = "MAKE_TYPE", nullable = true, length = 1) @Column(name = "MAKE_TYPE", nullable = true, length = 1)
public String getMake_Type() { public String getMake_Type() {
...@@ -42,6 +45,7 @@ public class ProdApplyInfoTEntity { ...@@ -42,6 +45,7 @@ public class ProdApplyInfoTEntity {
public void setMake_Type(String make_Type) { public void setMake_Type(String make_Type) {
this.make_Type = make_Type; this.make_Type = make_Type;
} }
@Basic @Basic
@Column(name = "APPLY_NAME", nullable = true, length = 45) @Column(name = "APPLY_NAME", nullable = true, length = 45)
public String getApply_Name() { public String getApply_Name() {
...@@ -51,6 +55,7 @@ public class ProdApplyInfoTEntity { ...@@ -51,6 +55,7 @@ public class ProdApplyInfoTEntity {
public void setApply_Name(String apply_Name) { public void setApply_Name(String apply_Name) {
this.apply_Name = apply_Name; this.apply_Name = apply_Name;
} }
@Basic @Basic
@Column(name = "APPLY_PHONE", nullable = true, length = 20) @Column(name = "APPLY_PHONE", nullable = true, length = 20)
public String getApply_Phone() { public String getApply_Phone() {
...@@ -60,6 +65,7 @@ public class ProdApplyInfoTEntity { ...@@ -60,6 +65,7 @@ public class ProdApplyInfoTEntity {
public void setApply_Phone(String apply_Phone) { public void setApply_Phone(String apply_Phone) {
this.apply_Phone = apply_Phone; this.apply_Phone = apply_Phone;
} }
@Basic @Basic
@Column(name = "APPLY_POSTCODE", nullable = true, length = 6) @Column(name = "APPLY_POSTCODE", nullable = true, length = 6)
public String getApply_Postcode() { public String getApply_Postcode() {
...@@ -69,6 +75,7 @@ public class ProdApplyInfoTEntity { ...@@ -69,6 +75,7 @@ public class ProdApplyInfoTEntity {
public void setApply_Postcode(String apply_Postcode) { public void setApply_Postcode(String apply_Postcode) {
this.apply_Postcode = apply_Postcode; this.apply_Postcode = apply_Postcode;
} }
@Basic @Basic
@Column(name = "APPLY_ADDRESS", nullable = true, length = 105) @Column(name = "APPLY_ADDRESS", nullable = true, length = 105)
public String getApply_Address() { public String getApply_Address() {
...@@ -78,6 +85,7 @@ public class ProdApplyInfoTEntity { ...@@ -78,6 +85,7 @@ public class ProdApplyInfoTEntity {
public void setApply_Address(String apply_Address) { public void setApply_Address(String apply_Address) {
this.apply_Address = apply_Address; this.apply_Address = apply_Address;
} }
@Basic @Basic
@Column(name = "DRAW_TYPE", nullable = false, length = 2) @Column(name = "DRAW_TYPE", nullable = false, length = 2)
public String getDraw_Type() { public String getDraw_Type() {
...@@ -87,6 +95,7 @@ public class ProdApplyInfoTEntity { ...@@ -87,6 +95,7 @@ public class ProdApplyInfoTEntity {
public void setDraw_Type(String draw_Type) { public void setDraw_Type(String draw_Type) {
this.draw_Type = draw_Type; this.draw_Type = draw_Type;
} }
@Basic @Basic
@Column(name = "PROVINCE_NO", nullable = true, length = 6) @Column(name = "PROVINCE_NO", nullable = true, length = 6)
public String getProvince_No() { public String getProvince_No() {
...@@ -98,7 +107,6 @@ public class ProdApplyInfoTEntity { ...@@ -98,7 +107,6 @@ public class ProdApplyInfoTEntity {
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) return true; if (this == o) return true;
......
...@@ -29,6 +29,7 @@ public class ProdGroupTEntity { ...@@ -29,6 +29,7 @@ public class ProdGroupTEntity {
private String move_Flag; private String move_Flag;
private Byte move_Count; private Byte move_Count;
private Time move_Date; private Time move_Date;
@Id @Id
@Column(name = "GROUP_NO", nullable = false, length = 10) @Column(name = "GROUP_NO", nullable = false, length = 10)
public String getGroup_No() { public String getGroup_No() {
...@@ -38,6 +39,7 @@ public class ProdGroupTEntity { ...@@ -38,6 +39,7 @@ public class ProdGroupTEntity {
public void setGroup_No(String group_No) { public void setGroup_No(String group_No) {
this.group_No = group_No; this.group_No = group_No;
} }
@Basic @Basic
@Column(name = "VALID_COUNT", nullable = true, precision = 0) @Column(name = "VALID_COUNT", nullable = true, precision = 0)
public Byte getValid_Count() { public Byte getValid_Count() {
...@@ -47,6 +49,7 @@ public class ProdGroupTEntity { ...@@ -47,6 +49,7 @@ public class ProdGroupTEntity {
public void setValid_Count(Byte valid_Count) { public void setValid_Count(Byte valid_Count) {
this.valid_Count = valid_Count; this.valid_Count = valid_Count;
} }
@Basic @Basic
@Column(name = "INVALID_COUNT", nullable = true, precision = 0) @Column(name = "INVALID_COUNT", nullable = true, precision = 0)
public Byte getInvalid_Count() { public Byte getInvalid_Count() {
...@@ -56,6 +59,7 @@ public class ProdGroupTEntity { ...@@ -56,6 +59,7 @@ public class ProdGroupTEntity {
public void setInvalid_Count(Byte invalid_Count) { public void setInvalid_Count(Byte invalid_Count) {
this.invalid_Count = invalid_Count; this.invalid_Count = invalid_Count;
} }
@Basic @Basic
@Column(name = "SUBMIT_DATE", nullable = true) @Column(name = "SUBMIT_DATE", nullable = true)
public Time getSubmit_Date() { public Time getSubmit_Date() {
...@@ -65,6 +69,7 @@ public class ProdGroupTEntity { ...@@ -65,6 +69,7 @@ public class ProdGroupTEntity {
public void setSubmit_Date(Time submit_Date) { public void setSubmit_Date(Time submit_Date) {
this.submit_Date = submit_Date; this.submit_Date = submit_Date;
} }
@Basic @Basic
@Column(name = "SUBMIT_CODE", nullable = true, length = 8) @Column(name = "SUBMIT_CODE", nullable = true, length = 8)
public String getSubmit_Code() { public String getSubmit_Code() {
...@@ -74,6 +79,7 @@ public class ProdGroupTEntity { ...@@ -74,6 +79,7 @@ public class ProdGroupTEntity {
public void setSubmit_Code(String submit_Code) { public void setSubmit_Code(String submit_Code) {
this.submit_Code = submit_Code; this.submit_Code = submit_Code;
} }
@Basic @Basic
@Column(name = "EXPORT_DATE", nullable = true) @Column(name = "EXPORT_DATE", nullable = true)
public Time getExport_Date() { public Time getExport_Date() {
...@@ -83,6 +89,7 @@ public class ProdGroupTEntity { ...@@ -83,6 +89,7 @@ public class ProdGroupTEntity {
public void setExport_Date(Time export_Date) { public void setExport_Date(Time export_Date) {
this.export_Date = export_Date; this.export_Date = export_Date;
} }
@Basic @Basic
@Column(name = "EXPORT_CODE", nullable = true, length = 8) @Column(name = "EXPORT_CODE", nullable = true, length = 8)
public String getExport_Code() { public String getExport_Code() {
...@@ -92,6 +99,7 @@ public class ProdGroupTEntity { ...@@ -92,6 +99,7 @@ public class ProdGroupTEntity {
public void setExport_Code(String export_Code) { public void setExport_Code(String export_Code) {
this.export_Code = export_Code; this.export_Code = export_Code;
} }
@Basic @Basic
@Column(name = "DOWNLOAD_FLAG", nullable = true, length = 1) @Column(name = "DOWNLOAD_FLAG", nullable = true, length = 1)
public String getDownload_Flag() { public String getDownload_Flag() {
...@@ -101,6 +109,7 @@ public class ProdGroupTEntity { ...@@ -101,6 +109,7 @@ public class ProdGroupTEntity {
public void setDownload_Flag(String download_Flag) { public void setDownload_Flag(String download_Flag) {
this.download_Flag = download_Flag; this.download_Flag = download_Flag;
} }
@Basic @Basic
@Column(name = "DOWNLOAD_COUNT", nullable = true, precision = 0) @Column(name = "DOWNLOAD_COUNT", nullable = true, precision = 0)
public Byte getDownload_Count() { public Byte getDownload_Count() {
...@@ -110,6 +119,7 @@ public class ProdGroupTEntity { ...@@ -110,6 +119,7 @@ public class ProdGroupTEntity {
public void setDownload_Count(Byte download_Count) { public void setDownload_Count(Byte download_Count) {
this.download_Count = download_Count; this.download_Count = download_Count;
} }
@Basic @Basic
@Column(name = "DOWNLOAD_DATE", nullable = true) @Column(name = "DOWNLOAD_DATE", nullable = true)
public Time getDownload_Date() { public Time getDownload_Date() {
...@@ -119,6 +129,7 @@ public class ProdGroupTEntity { ...@@ -119,6 +129,7 @@ public class ProdGroupTEntity {
public void setDownload_Date(Time download_Date) { public void setDownload_Date(Time download_Date) {
this.download_Date = download_Date; this.download_Date = download_Date;
} }
@Basic @Basic
@Column(name = "EWRITE_FLAG", nullable = true, length = 1) @Column(name = "EWRITE_FLAG", nullable = true, length = 1)
public String getEwrite_Flag() { public String getEwrite_Flag() {
...@@ -128,6 +139,7 @@ public class ProdGroupTEntity { ...@@ -128,6 +139,7 @@ public class ProdGroupTEntity {
public void setEwrite_Flag(String ewrite_Flag) { public void setEwrite_Flag(String ewrite_Flag) {
this.ewrite_Flag = ewrite_Flag; this.ewrite_Flag = ewrite_Flag;
} }
@Basic @Basic
@Column(name = "EWRITE_COUNT", nullable = true, precision = 0) @Column(name = "EWRITE_COUNT", nullable = true, precision = 0)
public Byte getEwrite_Count() { public Byte getEwrite_Count() {
...@@ -137,6 +149,7 @@ public class ProdGroupTEntity { ...@@ -137,6 +149,7 @@ public class ProdGroupTEntity {
public void setEwrite_Count(Byte ewrite_Count) { public void setEwrite_Count(Byte ewrite_Count) {
this.ewrite_Count = ewrite_Count; this.ewrite_Count = ewrite_Count;
} }
@Basic @Basic
@Column(name = "EWRITE_DATE", nullable = true) @Column(name = "EWRITE_DATE", nullable = true)
public Time getEwrite_Date() { public Time getEwrite_Date() {
...@@ -146,6 +159,7 @@ public class ProdGroupTEntity { ...@@ -146,6 +159,7 @@ public class ProdGroupTEntity {
public void setEwrite_Date(Time ewrite_Date) { public void setEwrite_Date(Time ewrite_Date) {
this.ewrite_Date = ewrite_Date; this.ewrite_Date = ewrite_Date;
} }
@Basic @Basic
@Column(name = "CHECK_FLAG", nullable = true, length = 1) @Column(name = "CHECK_FLAG", nullable = true, length = 1)
public String getCheck_Flag() { public String getCheck_Flag() {
...@@ -155,6 +169,7 @@ public class ProdGroupTEntity { ...@@ -155,6 +169,7 @@ public class ProdGroupTEntity {
public void setCheck_Flag(String check_Flag) { public void setCheck_Flag(String check_Flag) {
this.check_Flag = check_Flag; this.check_Flag = check_Flag;
} }
@Basic @Basic
@Column(name = "CHECK_COUNT", nullable = true, precision = 0) @Column(name = "CHECK_COUNT", nullable = true, precision = 0)
public Byte getCheck_Count() { public Byte getCheck_Count() {
...@@ -164,6 +179,7 @@ public class ProdGroupTEntity { ...@@ -164,6 +179,7 @@ public class ProdGroupTEntity {
public void setCheck_Count(Byte check_Count) { public void setCheck_Count(Byte check_Count) {
this.check_Count = check_Count; this.check_Count = check_Count;
} }
@Basic @Basic
@Column(name = "CHECK_DATE", nullable = true) @Column(name = "CHECK_DATE", nullable = true)
public Time getCheck_Date() { public Time getCheck_Date() {
...@@ -173,6 +189,7 @@ public class ProdGroupTEntity { ...@@ -173,6 +189,7 @@ public class ProdGroupTEntity {
public void setCheck_Date(Time check_Date) { public void setCheck_Date(Time check_Date) {
this.check_Date = check_Date; this.check_Date = check_Date;
} }
@Basic @Basic
@Column(name = "SEND_FLAG", nullable = true, length = 1) @Column(name = "SEND_FLAG", nullable = true, length = 1)
public String getSend_Flag() { public String getSend_Flag() {
...@@ -182,6 +199,7 @@ public class ProdGroupTEntity { ...@@ -182,6 +199,7 @@ public class ProdGroupTEntity {
public void setSend_Flag(String send_Flag) { public void setSend_Flag(String send_Flag) {
this.send_Flag = send_Flag; this.send_Flag = send_Flag;
} }
@Basic @Basic
@Column(name = "SEND_COUNT", nullable = true, precision = 0) @Column(name = "SEND_COUNT", nullable = true, precision = 0)
public Byte getSend_Count() { public Byte getSend_Count() {
...@@ -191,6 +209,7 @@ public class ProdGroupTEntity { ...@@ -191,6 +209,7 @@ public class ProdGroupTEntity {
public void setSend_Count(Byte send_Count) { public void setSend_Count(Byte send_Count) {
this.send_Count = send_Count; this.send_Count = send_Count;
} }
@Basic @Basic
@Column(name = "SEND_DATE", nullable = true) @Column(name = "SEND_DATE", nullable = true)
public Time getSend_Date() { public Time getSend_Date() {
...@@ -200,6 +219,7 @@ public class ProdGroupTEntity { ...@@ -200,6 +219,7 @@ public class ProdGroupTEntity {
public void setSend_Date(Time send_Date) { public void setSend_Date(Time send_Date) {
this.send_Date = send_Date; this.send_Date = send_Date;
} }
@Basic @Basic
@Column(name = "MOVE_FLAG", nullable = true, length = 1) @Column(name = "MOVE_FLAG", nullable = true, length = 1)
public String getMove_Flag() { public String getMove_Flag() {
...@@ -209,6 +229,7 @@ public class ProdGroupTEntity { ...@@ -209,6 +229,7 @@ public class ProdGroupTEntity {
public void setMove_Flag(String move_Flag) { public void setMove_Flag(String move_Flag) {
this.move_Flag = move_Flag; this.move_Flag = move_Flag;
} }
@Basic @Basic
@Column(name = "MOVE_COUNT", nullable = true, precision = 0) @Column(name = "MOVE_COUNT", nullable = true, precision = 0)
public Byte getMove_Count() { public Byte getMove_Count() {
...@@ -218,6 +239,7 @@ public class ProdGroupTEntity { ...@@ -218,6 +239,7 @@ public class ProdGroupTEntity {
public void setMove_Count(Byte move_Count) { public void setMove_Count(Byte move_Count) {
this.move_Count = move_Count; this.move_Count = move_Count;
} }
@Basic @Basic
@Column(name = "MOVE_DATE", nullable = true) @Column(name = "MOVE_DATE", nullable = true)
public Time getMove_Date() { public Time getMove_Date() {
......
...@@ -20,6 +20,7 @@ public class ProdTraceTEntity { ...@@ -20,6 +20,7 @@ public class ProdTraceTEntity {
private Time check_Date; private Time check_Date;
private String mover_No; private String mover_No;
private Time move_Date; private Time move_Date;
@Id @Id
@Column(name = "ACCEPT_NO", nullable = false, length = 12) @Column(name = "ACCEPT_NO", nullable = false, length = 12)
public String getAccept_No() { public String getAccept_No() {
...@@ -29,6 +30,7 @@ public class ProdTraceTEntity { ...@@ -29,6 +30,7 @@ public class ProdTraceTEntity {
public void setAccept_No(String accept_No) { public void setAccept_No(String accept_No) {
this.accept_No = accept_No; this.accept_No = accept_No;
} }
@Basic @Basic
@Column(name = "PHOTOER_NO", nullable = true, length = 8) @Column(name = "PHOTOER_NO", nullable = true, length = 8)
public String getPhotoer_No() { public String getPhotoer_No() {
...@@ -38,6 +40,7 @@ public class ProdTraceTEntity { ...@@ -38,6 +40,7 @@ public class ProdTraceTEntity {
public void setPhotoer_No(String photoer_No) { public void setPhotoer_No(String photoer_No) {
this.photoer_No = photoer_No; this.photoer_No = photoer_No;
} }
@Basic @Basic
@Column(name = "PHOTO_DATE", nullable = true) @Column(name = "PHOTO_DATE", nullable = true)
public Time getPhoto_Date() { public Time getPhoto_Date() {
...@@ -47,6 +50,7 @@ public class ProdTraceTEntity { ...@@ -47,6 +50,7 @@ public class ProdTraceTEntity {
public void setPhoto_Date(Time photo_Date) { public void setPhoto_Date(Time photo_Date) {
this.photo_Date = photo_Date; this.photo_Date = photo_Date;
} }
@Basic @Basic
@Column(name = "EXPORT_NO", nullable = true, length = 8) @Column(name = "EXPORT_NO", nullable = true, length = 8)
public String getExport_No() { public String getExport_No() {
...@@ -56,6 +60,7 @@ public class ProdTraceTEntity { ...@@ -56,6 +60,7 @@ public class ProdTraceTEntity {
public void setExport_No(String export_No) { public void setExport_No(String export_No) {
this.export_No = export_No; this.export_No = export_No;
} }
@Basic @Basic
@Column(name = "EXPORT_DATE", nullable = true) @Column(name = "EXPORT_DATE", nullable = true)
public Time getExport_Date() { public Time getExport_Date() {
...@@ -65,6 +70,7 @@ public class ProdTraceTEntity { ...@@ -65,6 +70,7 @@ public class ProdTraceTEntity {
public void setExport_Date(Time export_Date) { public void setExport_Date(Time export_Date) {
this.export_Date = export_Date; this.export_Date = export_Date;
} }
@Basic @Basic
@Column(name = "DOWNLOAD_NO", nullable = true, length = 8) @Column(name = "DOWNLOAD_NO", nullable = true, length = 8)
public String getDownload_No() { public String getDownload_No() {
...@@ -74,6 +80,7 @@ public class ProdTraceTEntity { ...@@ -74,6 +80,7 @@ public class ProdTraceTEntity {
public void setDownload_No(String download_No) { public void setDownload_No(String download_No) {
this.download_No = download_No; this.download_No = download_No;
} }
@Basic @Basic
@Column(name = "DOWNLOAD_DATE", nullable = true) @Column(name = "DOWNLOAD_DATE", nullable = true)
public Time getDownload_Date() { public Time getDownload_Date() {
...@@ -83,6 +90,7 @@ public class ProdTraceTEntity { ...@@ -83,6 +90,7 @@ public class ProdTraceTEntity {
public void setDownload_Date(Time download_Date) { public void setDownload_Date(Time download_Date) {
this.download_Date = download_Date; this.download_Date = download_Date;
} }
@Basic @Basic
@Column(name = "ELECTRIC_WRITER_NO", nullable = true, length = 8) @Column(name = "ELECTRIC_WRITER_NO", nullable = true, length = 8)
public String getElectric_Writer_No() { public String getElectric_Writer_No() {
...@@ -92,6 +100,7 @@ public class ProdTraceTEntity { ...@@ -92,6 +100,7 @@ public class ProdTraceTEntity {
public void setElectric_Writer_No(String electric_Writer_No) { public void setElectric_Writer_No(String electric_Writer_No) {
this.electric_Writer_No = electric_Writer_No; this.electric_Writer_No = electric_Writer_No;
} }
@Basic @Basic
@Column(name = "ELECTRIC_WRITE_DATE", nullable = true) @Column(name = "ELECTRIC_WRITE_DATE", nullable = true)
public Time getElectric_Write_Date() { public Time getElectric_Write_Date() {
...@@ -101,6 +110,7 @@ public class ProdTraceTEntity { ...@@ -101,6 +110,7 @@ public class ProdTraceTEntity {
public void setElectric_Write_Date(Time electric_Write_Date) { public void setElectric_Write_Date(Time electric_Write_Date) {
this.electric_Write_Date = electric_Write_Date; this.electric_Write_Date = electric_Write_Date;
} }
@Basic @Basic
@Column(name = "CHECKER_NO", nullable = true, length = 8) @Column(name = "CHECKER_NO", nullable = true, length = 8)
public String getChecker_No() { public String getChecker_No() {
...@@ -110,6 +120,7 @@ public class ProdTraceTEntity { ...@@ -110,6 +120,7 @@ public class ProdTraceTEntity {
public void setChecker_No(String checker_No) { public void setChecker_No(String checker_No) {
this.checker_No = checker_No; this.checker_No = checker_No;
} }
@Basic @Basic
@Column(name = "CHECK_DATE", nullable = true) @Column(name = "CHECK_DATE", nullable = true)
public Time getCheck_Date() { public Time getCheck_Date() {
...@@ -119,6 +130,7 @@ public class ProdTraceTEntity { ...@@ -119,6 +130,7 @@ public class ProdTraceTEntity {
public void setCheck_Date(Time check_Date) { public void setCheck_Date(Time check_Date) {
this.check_Date = check_Date; this.check_Date = check_Date;
} }
@Basic @Basic
@Column(name = "MOVER_NO", nullable = true, length = 8) @Column(name = "MOVER_NO", nullable = true, length = 8)
public String getMover_No() { public String getMover_No() {
...@@ -128,6 +140,7 @@ public class ProdTraceTEntity { ...@@ -128,6 +140,7 @@ public class ProdTraceTEntity {
public void setMover_No(String mover_No) { public void setMover_No(String mover_No) {
this.mover_No = mover_No; this.mover_No = mover_No;
} }
@Basic @Basic
@Column(name = "MOVE_DATE", nullable = true) @Column(name = "MOVE_DATE", nullable = true)
public Time getMove_Date() { public Time getMove_Date() {
...@@ -137,6 +150,7 @@ public class ProdTraceTEntity { ...@@ -137,6 +150,7 @@ public class ProdTraceTEntity {
public void setMove_Date(Time move_Date) { public void setMove_Date(Time move_Date) {
this.move_Date = move_Date; this.move_Date = move_Date;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) return true; if (this == o) return true;
......
package com.yxproject.start.mapper; package com.yxproject.start.mapper;
import com.yxproject.start.entity.FailedinfoEntity; import com.yxproject.start.entity.FailedinfoEntity;
import com.yxproject.start.entity.UserInfo; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.*;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
......
...@@ -4,6 +4,7 @@ import com.yxproject.start.entity.GroupinfoEntity; ...@@ -4,6 +4,7 @@ import com.yxproject.start.entity.GroupinfoEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* Created by zhangyusheng on 2018/10/13 9:36 * Created by zhangyusheng on 2018/10/13 9:36
...@@ -12,7 +13,17 @@ import java.util.List; ...@@ -12,7 +13,17 @@ import java.util.List;
public interface GroupinfoMapper { public interface GroupinfoMapper {
public int insertGroupinfoEntity(GroupinfoEntity groupinfoEntity); public int insertGroupinfoEntity(GroupinfoEntity groupinfoEntity);
public List<GroupinfoEntity> findGroupinfoEntityByAcceptNo(String acceptNo); public List<GroupinfoEntity> findGroupinfoEntityByAcceptNo(String acceptNo);
public int updateGroupinfoEntity(GroupinfoEntity groupinfoEntity); public int updateGroupinfoEntity(GroupinfoEntity groupinfoEntity);
public List<GroupinfoEntity> findGroupinfoEntityListByProductionTaskListId(String cyclesheetid);
public List<Map<String, Object>> findCountyInfoList8_10(String groupinfo10, String groupinfo8);
public List<Map<String, Object>> findCountyInfoList8(String groupinfo8);
public List<Map<String, Object>> findCountyInfoList10(String groupinfo10);
} }
package com.yxproject.start.service;
import com.yxproject.start.entity.GroupinfoEntity;
import java.util.List;
import java.util.Map;
/**
* Created by zhangyusheng on 2018/11/1 14:22
*/
public interface GroupinfoService {
public List<Map<String, Object>> findCountyInfoList(String cyclesheetID);
}
...@@ -10,12 +10,19 @@ import java.util.List; ...@@ -10,12 +10,19 @@ import java.util.List;
public interface ProductionTaskListService { public interface ProductionTaskListService {
public List<ProductionTaskListEntity> findProductionTaskListEntityByID(String id); public List<ProductionTaskListEntity> findProductionTaskListEntityByID(String id);
public int updateProductionTask(ProductionTaskListEntity map); public int updateProductionTask(ProductionTaskListEntity map);
public int addProductionTaskListEntity(ProductionTaskListEntity productionTaskListEntity, List<GroupinfoEntity> groupinfoEntities); public int addProductionTaskListEntity(ProductionTaskListEntity productionTaskListEntity, List<GroupinfoEntity> groupinfoEntities);
public int addQuickCyclesheetInfo(String acceptNo); public int addQuickCyclesheetInfo(String acceptNo);
public List<Object> findCardInfoByCardIDOrAcceptNo(String cardInfo); public List<Object> findCardInfoByCardIDOrAcceptNo(String cardInfo);
public List<Object> findAccuProductionInfo(String importDate); public List<Object> findAccuProductionInfo(String importDate);
public int savePoliceStationVailedInfoEntity(List<PoliceStationVailedInfoEntity> policeStationVailedInfoEntities); public int savePoliceStationVailedInfoEntity(List<PoliceStationVailedInfoEntity> policeStationVailedInfoEntities);
public List<PoliceStationVailedInfoEntity> find(String id); public List<PoliceStationVailedInfoEntity> find(String id);
public List<ProductionTaskListEntity> findProductionTaskListEntityByState(int state); public List<ProductionTaskListEntity> findProductionTaskListEntityByState(int state);
......
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.GroupinfoEntity;
import com.yxproject.start.mapper.GroupinfoMapper;
import com.yxproject.start.service.GroupinfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* Created by zhangyusheng on 2018/11/1 14:26
*/
@Service
public class GroupinfoServiceImpl implements GroupinfoService {
@Autowired
public GroupinfoMapper groupinfoMapper;
@Override
public List<Map<String, Object>> findCountyInfoList(String cyclesheetid) {
List<Map<String, Object>> countyInfoList = new ArrayList<>();
List<GroupinfoEntity> groupinfoEntityList = groupinfoMapper.findGroupinfoEntityListByProductionTaskListId(cyclesheetid);
List<String> groupnoLength10 = new ArrayList<String>();
List<String> groupnoLength8 = new ArrayList<String>();
for (GroupinfoEntity groupinfoEntity : groupinfoEntityList) {
if (groupinfoEntity.getGroupno().length() == 10) {
groupnoLength10.add(groupinfoEntity.getGroupno());
} else {
groupnoLength8.add(groupinfoEntity.getGroupno());
}
}
String group_no10 = "";
for (int i = 0; i < groupnoLength10.size(); i++) {
if (i != groupnoLength10.size() - 1) {
group_no10 += "'" + groupnoLength10.get(i) + "',";
} else {
group_no10 += "'" + groupnoLength10.get(i) + "'";
}
}
String group_no8 = "";
for (int i = 0; i < groupnoLength8.size(); i++) {
if (i != groupnoLength8.size() - 1) {
group_no8 += "'" + groupnoLength8.get(i) + "',";
} else {
group_no8 += "'" + groupnoLength8.get(i) + "'";
}
}
//数组中有长度为10和8 的
if (groupnoLength8.size() != 0 && groupnoLength10.size() != 0) {
countyInfoList = groupinfoMapper.findCountyInfoList8_10(group_no10, group_no8);
} else if (groupnoLength8.size() == 0 && groupnoLength10.size() != 10) {
//数组中只有长度为10 的
countyInfoList = groupinfoMapper.findCountyInfoList10(group_no10);
} else if (groupnoLength8.size() != 0 && groupnoLength10.size() == 0) {
//数组中只有长度为8 的
countyInfoList = groupinfoMapper.findCountyInfoList8(group_no8);
}
return countyInfoList;
}
}
...@@ -14,7 +14,6 @@ public class UtilServiceImpl implements UtilService { ...@@ -14,7 +14,6 @@ public class UtilServiceImpl implements UtilService {
public UtilMapper utilMapper; public UtilMapper utilMapper;
@Override @Override
public int findProductionTaskListSequenceNextValue() { public int findProductionTaskListSequenceNextValue() {
return utilMapper.findProductionTaskListSequenceNextValue(); return utilMapper.findProductionTaskListSequenceNextValue();
} }
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
</resultMap> </resultMap>
<select id="findGroupinfoEntityListByProductionTaskListId" resultType="com.yxproject.start.entity.GroupinfoEntity" parameterType="String"> <select id="findGroupinfoEntityListByProductionTaskListId" resultType="com.yxproject.start.entity.GroupinfoEntity" parameterType="String">
select * from GROUPINFO where cyclesheetid like #{id} select * from GROUPINFO where cyclesheetid like #{cyclesheetid}
</select> </select>
<insert id="insertGroupinfoEntity" parameterType="com.yxproject.start.entity.GroupinfoEntity"> <insert id="insertGroupinfoEntity" parameterType="com.yxproject.start.entity.GroupinfoEntity">
...@@ -34,7 +34,13 @@ ...@@ -34,7 +34,13 @@
where GROUPID=#{groupid} where GROUPID=#{groupid}
</update> </update>
<!--<select id="findGroupinfoEntityByAcceptNo" resultType="java.util.HashMap" parameterType="String">--> <select id="findCountyInfoList8_10" resultType="java.util.HashMap" parameterType="String">
<!--select * from GROUPINFO where GROUPNO =#{acceptNo} or GROUPNO =substr(#{acceptNo},0,8)--> select * from FINDPRODCOUNTYLIST8_10_VIEW where p_view_param.set_param(#{groupinfo10})=#{groupinfo10} AND p_view_param.set_param2(#{groupinfo8})=#{groupinfo8}
<!--</select>--> </select>
<select id="findCountyInfoList8" resultType="java.util.HashMap" parameterType="String">
select * from FINDPRODCOUNTYLIST8_VIEW where p_view_param.set_param2(#{groupinfo8})=#{groupinfo8}
</select>
<select id="findCountyInfoList10" resultType="java.util.HashMap" parameterType="String">
select * from FINDPRODCOUNTYLIST10_VIEW where p_view_param.set_param(#{groupinfo10})=#{groupinfo10}
</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