Commit 070443a7 authored by liboyang's avatar liboyang

Merge remote-tracking branch 'origin/dev' into dev

parents 91614877 51213b5f
......@@ -39,191 +39,200 @@ public class AdminApi {
@RequestMapping("test")
public String hello(){
public String hello() {
return "f1";
}
/**
* 获得用户列表
*
* @return
*/
@RequestMapping("getUserList")
public List<UserInfo> selectAllUser() {
List<UserInfo> list = userInfoService.getAllUserInfo();
List<UserInfo> list = userInfoService.getAllUserInfo();
return list;
}
/**
* 用户添加;
*
* @return
*/
@PostMapping("userAdd")
public Map<String,String> userInfoAdd(@RequestBody String json){
public Map<String, String> userInfoAdd(@RequestBody String json) {
JSONObject jsonObject = JSONObject.fromObject(json);
String salt = UUID.randomUUID().toString();
UserInfo userInfo = new UserInfo();
userInfo.setPassword(Md5Utils.entryptPassword(jsonObject.getString("password"),salt));
userInfo.setPassword(Md5Utils.entryptPassword(jsonObject.getString("password"), salt));
userInfo.setSalt(salt);
userInfo.setUsername(jsonObject.getString("username"));
userInfo.setName(jsonObject.getString("name"));
Map<String,String> map = new HashMap<>();
Map<String, String> map = new HashMap<>();
boolean flag = false;
flag = userInfoService.addUser(userInfo,Integer.parseInt(jsonObject.getString("roleId")));
if (flag){
map.put("resultMsg","添加成功");
flag = userInfoService.addUser(userInfo, Integer.parseInt(jsonObject.getString("roleId")));
if (flag) {
map.put("resultMsg", "添加成功");
}else {
map.put("resultMsg","添加失败");
} else {
map.put("resultMsg", "添加失败");
}
return map;
}
/**
* 通过id查询用户;
*
* @return
*/
@RequestMapping(value = "getUserById",method = RequestMethod.GET)
public Map<String,Object> getUserById(@RequestParam("userId") String userId, HttpServletResponse response){
@RequestMapping(value = "getUserById", method = RequestMethod.GET)
public Map<String, Object> getUserById(@RequestParam("userId") String userId, HttpServletResponse response) {
response.setCharacterEncoding("UTF-8");
Map<String,Object> map = new HashMap<>();
UserInfo userInfo =userInfoService.getUserInfoByUserId(Integer.parseInt(userId));
map.put("user",userInfo);
return map;
Map<String, Object> map = new HashMap<>();
UserInfo userInfo = userInfoService.getUserInfoByUserId(Integer.parseInt(userId));
map.put("user", userInfo);
return map;
}
/**
* 用户删除;
*
* @return
*/
@RequestMapping(value = "userDel",method = RequestMethod.GET)
public Map<String,Object> userInfoDel(@RequestParam("userId") String userId,HttpServletResponse response){
@RequestMapping(value = "userDel", method = RequestMethod.GET)
public Map<String, Object> userInfoDel(@RequestParam("userId") String userId, HttpServletResponse response) {
response.setCharacterEncoding("UTF-8");
Map<String,Object> map = new HashMap<>();
Map<String, Object> map = new HashMap<>();
boolean flag = false;
flag = userInfoService.deleteUserInfo(Integer.parseInt(userId));
if(flag){
map.put("returnMsg","删除成功");
}else{
map.put("returnMsg","删除失败");
if (flag) {
map.put("returnMsg", "删除成功");
} else {
map.put("returnMsg", "删除失败");
}
return map;
return map;
}
/**
* 用户启用;
*
* @return
*/
@RequestMapping(value = "userBack",method = RequestMethod.GET)
public Map<String,Object> userInfoBack(@RequestParam("userId") String userId, HttpServletResponse response){
@RequestMapping(value = "userBack", method = RequestMethod.GET)
public Map<String, Object> userInfoBack(@RequestParam("userId") String userId, HttpServletResponse response) {
response.setCharacterEncoding("UTF-8");
Map<String,Object> map = new HashMap<>();
Map<String, Object> map = new HashMap<>();
boolean flag = false;
flag = userInfoService.BackUserInfo(Integer.parseInt(userId));
if(flag){
map.put("returnMsg","启用成功");
}else{
map.put("returnMsg","启用失败");
if (flag) {
map.put("returnMsg", "启用成功");
} else {
map.put("returnMsg", "启用失败");
}
return map;
return map;
}
@RequestMapping("getRoleList")
public List<SysRole> selectAllRole() {
List<SysRole> list = sysRoleService.getAllRoleInfo();
List<SysRole> list = sysRoleService.getAllRoleInfo();
return list;
}
@RequestMapping("getPermissionList")
public List<SysPermission> selectAllPermission() {
List<SysPermission> list = sysPermissionService.getAllPermission();
public List<SysPermission> selectAllPermission() {
List<SysPermission> list = sysPermissionService.getAllPermission();
return list;
}
/**
* 权限删除;
*
* @return
*/
@RequestMapping("permissionDel")
public Map permissionDel(@RequestParam("permissionId") String permissionId,HttpServletResponse response){
public Map permissionDel(@RequestParam("permissionId") String permissionId, HttpServletResponse response) {
response.setCharacterEncoding("UTF-8");
Map map = new HashMap();
boolean flag = false;
flag = sysPermissionService.deletePermission(Integer.parseInt(permissionId));
if(flag){
map.put("returnMsg","删除成功");
}else{
map.put("returnMsg","删除失败");
if (flag) {
map.put("returnMsg", "删除成功");
} else {
map.put("returnMsg", "删除失败");
}
return map;
}
/**
* 权限启用;
*
* @return
*/
@RequestMapping("permissionOpen")
public Map permissionBack(@RequestParam("permissionId") String permissionId,HttpServletResponse response){
public Map permissionBack(@RequestParam("permissionId") String permissionId, HttpServletResponse response) {
response.setCharacterEncoding("UTF-8");
Map map = new HashMap();
boolean flag = false;
flag = sysPermissionService.backPermission(Integer.parseInt(permissionId));
if(flag){
map.put("returnMsg","启用成功");
}else{
map.put("returnMsg","启用失败");
if (flag) {
map.put("returnMsg", "启用成功");
} else {
map.put("returnMsg", "启用失败");
}
return map;
}
/**
* 通过id查询权限;
*
* @return
*/
@RequestMapping(value = "getPermsById",method = RequestMethod.GET)
public Map<String,Object> getPermsById(@RequestParam("permissionId") String permissionId, HttpServletResponse response){
@RequestMapping(value = "getPermsById", method = RequestMethod.GET)
public Map<String, Object> getPermsById(@RequestParam("permissionId") String permissionId, HttpServletResponse response) {
response.setCharacterEncoding("UTF-8");
Map<String,Object> map = new HashMap<>();
SysPermission sysPermission =sysPermissionService.getPermissionByPId(Integer.parseInt(permissionId));
map.put("permission",sysPermission);
return map;
Map<String, Object> map = new HashMap<>();
SysPermission sysPermission = sysPermissionService.getPermissionByPId(Integer.parseInt(permissionId));
map.put("permission", sysPermission);
return map;
}
/**
* 通过id查询角色;
*
* @return
*/
@RequestMapping(value = "getRoleById",method = RequestMethod.GET)
public Map<String,Object> getRoleById(@RequestParam("roleId") String roleId, HttpServletResponse response){
@RequestMapping(value = "getRoleById", method = RequestMethod.GET)
public Map<String, Object> getRoleById(@RequestParam("roleId") String roleId, HttpServletResponse response) {
response.setCharacterEncoding("UTF-8");
Map<String,Object> map = new HashMap<>();
SysRole sysRole =sysRoleService.getRoleByRoleId(Integer.parseInt(roleId));
map.put("role",sysRole);
return map;
Map<String, Object> map = new HashMap<>();
SysRole sysRole = sysRoleService.getRoleByRoleId(Integer.parseInt(roleId));
map.put("role", sysRole);
return map;
}
/**
* 添加权限
*
* @param jsonStr
* @param resp
* @return
*/
@RequestMapping(value="permissionAdd",method = RequestMethod.POST)
public Map<String,String> userAdd(@RequestBody String jsonStr, HttpServletResponse resp){
@RequestMapping(value = "permissionAdd", method = RequestMethod.POST)
public Map<String, String> userAdd(@RequestBody String jsonStr, HttpServletResponse resp) {
resp.setCharacterEncoding("UTF-8");
Map<String,String> map = new HashMap<>();
Map<String, String> map = new HashMap<>();
JSONObject jsonObject = JSONObject.fromObject(jsonStr);
boolean flag = false;
String str = "0";
......@@ -240,44 +249,81 @@ public class AdminApi {
// }
System.out.println(sysPermission);
flag = sysPermissionService.addPermission(sysPermission);
if (flag){
map.put("resultMsg","添加成功");
if (flag) {
map.put("resultMsg", "添加成功");
}else {
map.put("resultMsg","添加失败");
} else {
map.put("resultMsg", "添加失败");
}
return map;
}
/**
* 查询所有非锁定角色;
*
* @return
*/
@RequestMapping(value = "getAllActiveRoleList",method = RequestMethod.GET)
public List<SysRole> userInfoAdd(){
@RequestMapping(value = "getAllActiveRoleList", method = RequestMethod.GET)
public List<SysRole> userInfoAdd() {
List<SysRole> list = sysRoleService.getAllActiveRoleInfo();
return list;
}
/**
* 查询所有非锁定权限;
*
* @return
*/
@RequestMapping(value = "getAllActivePermissionList",method = RequestMethod.GET)
public List<SysPermission> getAllActivePermissionList(){
@RequestMapping(value = "getAllActivePermissionList", method = RequestMethod.GET)
public List<SysPermission> getAllActivePermissionList() {
List<SysPermission> list = sysPermissionService.getAllActivePermission();
return list;
}
/**
* 角色删除;
*
* @return
*/
// @GET
// @Path("roleDel")
// @RequiresPermissions("role.del")
// public String roleDel(@QueryParam("roleId") String roleId,@Context HttpServletResponse response){
// response.setCharacterEncoding("UTF-8");
// Map map = new HashMap();
// boolean flag = false;
// flag = sysRoleService.deleteRole(Integer.parseInt(roleId));
// if(flag){
// map.put("returnMsg","删除成功");
// }else{
// map.put("returnMsg","删除失败");
// }
// return map.toString();
// }
// @GET
// @Path("roleBack")
// public String roleBack(@QueryParam("roleId") String roleId,@Context HttpServletResponse response){
// response.setCharacterEncoding("UTF-8");
// Map map = new HashMap();
// boolean flag = false;
// flag = sysRoleService.backRole(Integer.parseInt(roleId));
// if(flag){
// map.put("returnMsg","启用成功");
// }else{
// map.put("returnMsg","启用失败");
// }
// return map.toString();
// }
@RequestMapping("roleAdd")
public Map<String,String> roleAdd(@RequestBody String jsonStr,HttpServletResponse resp) {
public Map<String, String> roleAdd(@RequestBody String jsonStr, HttpServletResponse resp) {
resp.setCharacterEncoding("UTF-8");
Map<String,String> map = new HashMap<>();
Map<String, String> map = new HashMap<>();
JSONObject jsonObject = JSONObject.fromObject(jsonStr);
boolean flag = false;
SysRole sysRole = new SysRole();
......@@ -286,42 +332,42 @@ public class AdminApi {
String permissionIds = jsonObject.getString("permissionIds");
JSONArray jsonArray = JSONArray.fromObject(permissionIds);
flag = sysRoleService.addRole(sysRole,jsonArray);
if (flag){
map.put("resultMsg","添加成功");
flag = sysRoleService.addRole(sysRole, jsonArray);
if (flag) {
map.put("resultMsg", "添加成功");
}else {
map.put("resultMsg","添加失败");
} else {
map.put("resultMsg", "添加失败");
}
return map;
}
@PostMapping("userUpdate")
public Map<String,String> userInfoUpdate(@RequestBody String json,HttpServletResponse resp) {
public Map<String, String> userInfoUpdate(@RequestBody String json, HttpServletResponse resp) {
resp.setCharacterEncoding("UTF-8");
JSONObject jsonObject = JSONObject.fromObject(json);
UserInfo userInfo = new UserInfo();
userInfo.setUsername(jsonObject.getString("username"));
userInfo.setName(jsonObject.getString("name"));
userInfo.setId(Integer.parseInt(jsonObject.getString("id")));
Map<String,String> map = new HashMap<>();
Map<String, String> map = new HashMap<>();
boolean flag = false;
flag = userInfoService.updateUser(userInfo,Integer.parseInt(jsonObject.getString("roleId")),Integer.parseInt(jsonObject.getString("oldRoleId")));
if (flag){
map.put("resultMsg","修改成功");
flag = userInfoService.updateUser(userInfo, Integer.parseInt(jsonObject.getString("roleId")), Integer.parseInt(jsonObject.getString("oldRoleId")));
if (flag) {
map.put("resultMsg", "修改成功");
}else {
map.put("resultMsg","修改失败");
} else {
map.put("resultMsg", "修改失败");
}
return map;
}
@RequestMapping("roleUpdate")
public Map roleUpdate(@RequestBody String jsonStr,HttpServletResponse resp) {
public Map roleUpdate(@RequestBody String jsonStr, HttpServletResponse resp) {
resp.setCharacterEncoding("UTF-8");
Map<String,String> map = new HashMap<>();
Map<String, String> map = new HashMap<>();
JSONObject jsonObject = JSONObject.fromObject(jsonStr);
boolean flag = false;
SysRole sysRole = new SysRole();
......@@ -331,13 +377,13 @@ public class AdminApi {
String oldPermissionIds = jsonObject.getString("oldPermissionIds");
JSONArray jsonArrayOldPids = JSONArray.fromObject(oldPermissionIds);
String permissionIds = jsonObject.getString("permissionId");
JSONArray jsonArrayPids = JSONArray.fromObject(permissionIds);
flag = sysRoleService.updateRole(sysRole,jsonArrayPids,jsonArrayOldPids);
if (flag){
map.put("resultMsg","修改成功");
JSONArray jsonArrayPids = JSONArray.fromObject(permissionIds);
flag = sysRoleService.updateRole(sysRole, jsonArrayPids, jsonArrayOldPids);
if (flag) {
map.put("resultMsg", "修改成功");
}else {
map.put("resultMsg","修改失败");
} else {
map.put("resultMsg", "修改失败");
}
return map;
......@@ -345,10 +391,10 @@ public class AdminApi {
@PostMapping("permissionUpdate")
public Map<String,String> permissionUpdate(@RequestBody String jsonStr,HttpServletResponse resp){
public Map<String, String> permissionUpdate(@RequestBody String jsonStr, HttpServletResponse resp) {
resp.setCharacterEncoding("UTF-8");
JSONObject jsonObject = JSONObject.fromObject(jsonStr);
Map<String,String> map = new HashMap<>();
Map<String, String> map = new HashMap<>();
boolean flag = false;
// String str = "0";
SysPermission sysPermission = new SysPermission();
......@@ -365,11 +411,11 @@ public class AdminApi {
// }
System.out.println(sysPermission);
flag = sysPermissionService.updatePermission(sysPermission);
if (flag){
map.put("resultMsg","修改成功");
if (flag) {
map.put("resultMsg", "修改成功");
}else {
map.put("resultMsg","修改失败");
} else {
map.put("resultMsg", "修改失败");
}
return map;
......
......@@ -40,6 +40,10 @@ public class UserApi {
@Autowired
private FailedCardService failedCardService;
@Autowired
private CountyListService countyListService;
@Autowired
private CardBodyService cardBodyService;
@PostMapping("login")
public Map<String, Object> submitLogin(@RequestBody String jsonStr) {
......@@ -55,14 +59,14 @@ public class UserApi {
UserInfo userInfo = (UserInfo) SecurityUtils.getSubject().getPrincipal();
resultMap.put("status", 200);
resultMap.put("message", "登录成功");
resultMap.put("user",userInfo);
resultMap.put("user", userInfo);
} catch (UnknownAccountException e) {
resultMap.put("status", 201);
resultMap.put("message", "账号不存在!");
}catch(IncorrectCredentialsException e1){
} catch (IncorrectCredentialsException e1) {
resultMap.put("status", 202);
resultMap.put("message", "密码错误!");
}catch (Exception e) {
} catch (Exception e) {
resultMap.put("status", 500);
resultMap.put("message", "用户名密码错误");
}
......@@ -76,31 +80,35 @@ public class UserApi {
subject.logout();
}
}
/**
* 查询任务单;
*
* @return
*/
@RequestMapping(value = "/getProductionTaskListByID", method = RequestMethod.GET)
@ResponseBody
public String getProductionTaskListByID(@RequestParam("id") String id, HttpServletResponse resp) {
public String getProductionTaskListByID(@RequestParam("id") String id, HttpServletResponse resp) {
List<TaskEntity> productionTaskListEntity = taskService.findProductionTaskListEntityByID(Long.valueOf(id));
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
yxjsonResponse.outPutSuccess(productionTaskListEntity);
Map map = new HashMap();
System.out.println(yxjsonResponse.toJSONString()+"--------");
// map.put("MakeType",productionTaskListEntity);
return yxjsonResponse.toJSONString();
}
/**
* 更新任务单;
*
* @return
*/
@RequestMapping(value = "/updateProductionTask", method = RequestMethod.GET)
@RequiresPermissions("userInfo.add")//权限管理;
@ResponseBody
public String updateProductionTask(@RequestParam("id") String id, HttpServletResponse resp) {
public String updateProductionTask(@RequestParam("id") String id, HttpServletResponse resp) {
String map = "{\"production_Task_List_Id\":\"20181016001\",\"make_Type\":8,\"old_Make_Type\":8,} ";
JSONObject jsonObject = JSONObject.fromObject(map);
TaskEntity productionTaskListEntity = (TaskEntity) jsonObject.toBean(jsonObject, TaskEntity.class);
......@@ -119,13 +127,13 @@ public class UserApi {
@RequestMapping(value = "/addProductionTaskList", method = RequestMethod.GET)
@RequiresPermissions("userInfo.add")//权限管理;
@ResponseBody
public String addProductionTaskList(@RequestParam("id") String id, HttpServletResponse resp) {
public String addProductionTaskList(@RequestParam("id") String id, HttpServletResponse resp) {
String map = "{\"productionTaskListId\":\"20181016001\",\"makeType\":4,\"oldMakeType\":7}";
JSONObject jsonObject = JSONObject.fromObject(map);
Object taskList = jsonObject.get("taskList");
Object groupInfoList = jsonObject.get("groupInfoList");
List<GroupNoEntity> groupNoEntities = (List<GroupNoEntity>) groupInfoList;
TaskEntity taskEntity = (TaskEntity) taskList;
TaskEntity taskEntity = (TaskEntity) taskList;
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
......@@ -136,12 +144,13 @@ public class UserApi {
/**
* 查询证件信息;
*
* @return
*/
@RequestMapping(value = "/findCardInfoByCardIDOrAcceptNo", method = RequestMethod.GET)
@RequiresPermissions("userInfo.add")//权限管理;
@ResponseBody
public String findCardInfoByCardIDOrAcceptNo(@RequestParam("id") String id, HttpServletResponse resp) {
public String findCardInfoByCardIDOrAcceptNo(@RequestParam("id") String id, HttpServletResponse resp) {
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
......@@ -152,12 +161,13 @@ public class UserApi {
/**
* 添加快证任务单;
*
* @return
*/
@RequestMapping(value = "/addQuickCyclesheetInfo", method = RequestMethod.GET)
@RequiresPermissions("userInfo.add")//权限管理;
@ResponseBody
public String addQuickCyclesheetInfo(@RequestParam("id") String id, HttpServletResponse resp) {
public String addQuickCyclesheetInfo(@RequestParam("id") String id, HttpServletResponse resp) {
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
......@@ -198,7 +208,7 @@ public class UserApi {
@RequestMapping("/test")
@RequiresPermissions("userInfo.add")//权限管理;
@ResponseBody
public String test(@RequestParam("id") String permissionId,HttpServletResponse resp) {
public String test(@RequestParam("id") String permissionId, HttpServletResponse resp) {
//TODO
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
......@@ -210,66 +220,70 @@ public class UserApi {
/**
* 保存废证详情;
*
* @return
*/
@RequestMapping("addFailedinfo")
public String addFailedinfo(@RequestParam("id") String id,HttpServletResponse resp){
String map ="[{\"failedinfoid\":\"20181016002\",\"failed_Reason\":1,\"groupno\":\"41108201\",\"cyclesheetid\":\"20181016001\"}]";
public String addFailedinfo(@RequestParam("id") String id, HttpServletResponse resp) {
String map = "[{\"failedinfoid\":\"20181016002\",\"failed_Reason\":1,\"groupno\":\"41108201\",\"cyclesheetid\":\"20181016001\"}]";
JSONArray jsonArray = JSONArray.fromObject(map);
List<FailedCardEntity> failedinfoEntityList = new ArrayList<>();
for (Object object: jsonArray) {
for (Object object : jsonArray) {
FailedCardEntity o = (FailedCardEntity) JSONObject.toBean((JSONObject) object, FailedCardEntity.class);
failedinfoEntityList.add(o);
}
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
int i = failedCardService.saveFailedinfo(failedinfoEntityList);
yxjsonResponse.outPutSuccess(i+"添加成功");
yxjsonResponse.outPutSuccess(i + "添加成功");
return yxjsonResponse.toJSONString();
}
/**
* 更新废证详情;
* 更新废证详情;
*
* @return
*/
@RequestMapping("updateFailedinfo")
@RequiresPermissions("userInfo.add")//权限管理;
public String updateFailedinfo(@RequestParam("id") String id, HttpServletResponse resp){
String map ="[{\"failedinfoid\":\"201810302\",\"failed_Reason\":1,\"groupno\":\"411081\",\"cyclesheetid\":\"20181016001\"}]";
public String updateFailedinfo(@RequestParam("id") String id, HttpServletResponse resp) {
String map = "[{\"failedinfoid\":\"201810302\",\"failed_Reason\":1,\"groupno\":\"411081\",\"cyclesheetid\":\"20181016001\"}]";
JSONArray jsonArray = JSONArray.fromObject(map);
List<FailedCardEntity> failedinfoEntityList = new ArrayList<>();
for (Object object: jsonArray) {
for (Object object : jsonArray) {
FailedCardEntity o = (FailedCardEntity) JSONObject.toBean((JSONObject) object, FailedCardEntity.class);
failedinfoEntityList.add(o);
}
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
int i = failedCardService.updateFailedinfo(failedinfoEntityList);
yxjsonResponse.outPutSuccess(i+"更新成功");
yxjsonResponse.outPutSuccess(i + "更新成功");
return yxjsonResponse.toJSONString();
}
/**
* 查询废证详情;
* 查询废证详情;
*
* @return
*/
@RequestMapping("findFailedinfo")
@RequiresPermissions("userInfo.add")//权限管理;
public String findFailedinfo(@RequestParam("id") String id, HttpServletResponse resp){
public String findFailedinfo(@RequestParam("id") String id, HttpServletResponse resp) {
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
List<Map<String, Object>> maps = failedCardService.selectFailedinfo(Integer.valueOf(id));
yxjsonResponse.outPutSuccess(maps+"------添加成功---"+maps.size());
yxjsonResponse.outPutSuccess(maps + "------添加成功---" + maps.size());
return yxjsonResponse.toJSONString();
}
/**
* 查询任务单详情;
* 查询任务单详情;
*
* @return
*/
@RequestMapping("findProductionTaskListByState")
@RequiresPermissions("userInfo.add")//权限管理;
public String findProductionTaskListByState(@RequestParam("state") String state, HttpServletResponse resp){
public String findProductionTaskListByState(@RequestParam("state") String state, HttpServletResponse resp) {
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
List<Map<String, Object>> productionTaskInfoList = taskService.findProductionTaskListEntityByState(Integer.valueOf(state));
......@@ -278,12 +292,13 @@ public class UserApi {
}
/**
* 查询区县列表详情;
* 查询区县列表详情;
*
* @return
*/
@RequestMapping("findProdCountyList")
@RequiresPermissions("userInfo.add")//权限管理;
public String findProdCountyList(@RequestParam("cyclesheetID") String cyclesheetID, HttpServletResponse resp){
public String findProdCountyList(@RequestParam("cyclesheetID") String cyclesheetID, HttpServletResponse resp) {
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
List<Map<String, Object>> countyInfoList = groupNoService.findCountyInfoList(cyclesheetID);
......@@ -292,16 +307,17 @@ public class UserApi {
}
/**
* 保存派出所申请类型数量;
* 保存派出所申请类型数量;
*
* @return
*/
@RequestMapping("savePoliceApplyCount")
@RequiresPermissions("userInfo.add")//权限管理;
public String savePoliceApplyCount(@RequestParam("cyclesheetID") String cyclesheetID, HttpServletResponse resp){
public String savePoliceApplyCount(@RequestParam("cyclesheetID") String cyclesheetID, HttpServletResponse resp) {
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
int i = policeStationApplyReasonService.savePoliceStationApplyReasonEntity(cyclesheetID);
yxjsonResponse.outPutSuccess(i+"");
yxjsonResponse.outPutSuccess(i + "");
return yxjsonResponse.toJSONString();
}
......@@ -320,7 +336,7 @@ public class UserApi {
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);
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));
......@@ -337,18 +353,164 @@ public class UserApi {
return null;
}
/**
* 通过任务单查询区县列表;
*
* @return
*/
@RequestMapping("getCountyList")
// @RequiresPermissions("userInfo.add")//权限管理;
public String getCountyListInfoByTaskListID(@RequestParam("taskListID") String tasklistid, HttpServletResponse resp) {
List<CountyListEntity> countyListInfoEntity = countyListService.findCountyListByTaskListID(tasklistid);
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
yxjsonResponse.outPutSuccess(countyListInfoEntity);
Map map = new HashMap();
// map.put("MakeType",productionTaskListEntity);
return yxjsonResponse.toJSONString();
}
/**有误
* 保存卡基表;
*
* @return
*/
@RequestMapping("addCardBody")
// @RequiresPermissions("userInfo.add")//权限管理;
public String addCardBodyInfo(@RequestParam("cardBodyId") String cardBodyId, HttpServletResponse resp) {
String map = "{\"cardBodyId\":\"1\",}";
JSONObject jsonObject = JSONObject.fromObject(map);
Object cardBody = jsonObject.get("CardBody");
CardBodyEntity cardBodyEntity = (CardBodyEntity) cardBody;
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
int i = cardBodyService.addCardBodyEntity(cardBodyEntity);
yxjsonResponse.outPutSuccess(i + "添加成功");
return yxjsonResponse.toJSONString();
}
/**有误
* 更新循环单
* 添加异常状态;
* @return
*/
@RequestMapping("addExceptionState")
// @RequiresPermissions("userInfo.add")//权限管理;
public String addExceptionState(@RequestParam("exception_Information") String exception_Information, HttpServletResponse resp) {
String map = "{\"task_Id\":\"20181016001\",\"exception_Information\":0} ";
JSONObject jsonObject = JSONObject.fromObject(map);
TaskEntity taskEntity = (TaskEntity) jsonObject.toBean(jsonObject, TaskEntity.class);
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
int i = taskService.addExceptionState(taskEntity);
yxjsonResponse.outPutSuccess(i + "更新成功");
return yxjsonResponse.toJSONString();
}
/**
* 更新入库时间
*404
* @return
*/
@RequestMapping("updatePutinstorageDate")
// @RequiresPermissions("userInfo.add")//权限管理;
public String updatePutinstorageDate(@RequestParam("id") String id, HttpServletResponse resp) {
String map = "{\"id\":\"20181016001\",} ";
JSONObject jsonObject = JSONObject.fromObject(map);
TaskEntity productionTaskListEntity = (TaskEntity) jsonObject.toBean(jsonObject, TaskEntity.class);
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
int i = taskService.updatePutinstorageDate(productionTaskListEntity);
yxjsonResponse.outPutSuccess(i + "更新成功");
return yxjsonResponse.toJSONString();
}
/**
* 更新出库时间
*
* @return
*/
@RequestMapping("updateOutboundDate")
// @RequiresPermissions("userInfo.add")//权限管理;
public String updateOutboundDate(@RequestParam("id") String id, HttpServletResponse resp) {
String map = "{\"task_Id\":\"20181016001\",\"make_Type\":8,\"old_Make_Type\":8,} ";
JSONObject jsonObject = JSONObject.fromObject(map);
TaskEntity taskEntity = (TaskEntity) jsonObject.toBean(jsonObject, TaskEntity.class);
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
int i = taskService.updateOutboundDate(taskEntity);
yxjsonResponse.outPutSuccess(i + "更新成功");
return yxjsonResponse.toJSONString();
}
/**
* 对出库数进行更改
* 更新出库数
* 有点问题
* @return
*/
@RequestMapping("reviseOutBoundCount")
// @RequiresPermissions("userInfo.add")//权限管理;
public String reviseOutBoundCount(@RequestParam("county_List_Id") String county_List_Id, HttpServletResponse resp) {
String map = "{\"county_List_Id\":\"20181016001\",\"Out_Storage_County\":\"52\",} ";
JSONObject jsonObject = JSONObject.fromObject(map);
CountyListEntity countyListEntity = (CountyListEntity) jsonObject.toBean(jsonObject, CountyListEntity.class);
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
int i = countyListService.reviseOutBoundCount(countyListEntity);
yxjsonResponse.outPutSuccess(i + "更新成功");
return yxjsonResponse.toJSONString();
}
/**
* 对入库数进行更改
* 更新入库数
* 有点问题
* @return
*/
@RequestMapping("reviseInBoundCount")
// @RequiresPermissions("userInfo.add")//权限管理;
public String reviseInBoundCount(@RequestParam("county_List_Id") String county_List_Id, HttpServletResponse resp) {
String map = "{\"county_List_Id\":\"20181016001\",\"In_Storage_County\":\"52\",} ";
JSONObject jsonObject = JSONObject.fromObject(map);
CountyListEntity countyListEntity = (CountyListEntity) jsonObject.toBean(jsonObject, CountyListEntity.class);
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
int i = countyListService.reviseInBoundCount(countyListEntity);
yxjsonResponse.outPutSuccess(i + "更新成功");
return yxjsonResponse.toJSONString();
}
/**
* 查询交接单;
*
* @return
*/
@RequestMapping("getConnectList")
// @RequiresPermissions("userInfo.add")//权限管理;
public String getConnectList(@RequestParam("save_Date") String save_Date, HttpServletResponse resp) {
List<CountyListEntity> countyListEntity = countyListService.getConnectList(save_Date);
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
yxjsonResponse.outPutSuccess(countyListEntity);
Map map = new HashMap();
// map.put("MakeType",productionTaskListEntity);
return yxjsonResponse.toJSONString();
}
/**
* 下载装箱单
*
* @param countyInfoList 装箱单信息
* @param typeName 制证类型
* @param workShop 制证车间
* @param sum 总数
* @param cityName 地市
* @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","");
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();
......@@ -455,8 +617,8 @@ public class UserApi {
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.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("");
......@@ -725,8 +887,8 @@ public class UserApi {
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.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);
......@@ -918,7 +1080,7 @@ public class UserApi {
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.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);
......@@ -959,7 +1121,7 @@ public class UserApi {
}
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.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);
......@@ -1037,7 +1199,7 @@ public class UserApi {
//第六步将生成excel文件保存到指定路径下
FileOutputStream fout = null;
try {
fout = new FileOutputStream("F:\\Excel\\" + simpleDateFormat.format(new Date()) + countyInfoList.get(0).get("COUNTYNAME") + ".xls");
fout = new FileOutputStream("E:\\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();
......@@ -1046,7 +1208,7 @@ public class UserApi {
}
System.out.println("Excel文件生成成功..." + new Date());
return "F:\\Excel\\" + simpleDateFormat.format(new Date()) +countyInfoList.get(0).get("COUNTYNAME") + ".xls";
return "E:\\Excel\\" + simpleDateFormat.format(new Date()) +countyInfoList.get(0).get("COUNTYNAME") + ".xls";
// return "D:\\" + simpleDateFormat.format(new Date()) + list.get(0).getString("COUNTYNAME") + ".xls";
}
......
......@@ -38,10 +38,10 @@ public class MyShiroRealm extends AuthorizingRealm {
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
System.out.println("权限配置-->MyShiroRealm.doGetAuthorizationInfo()");
SimpleAuthorizationInfo authorizationInfo = new SimpleAuthorizationInfo();
UserInfo userInfo = (UserInfo)principals.getPrimaryPrincipal();
for(SysRole role:userInfo.getRoleList()){
UserInfo userInfo = (UserInfo) principals.getPrimaryPrincipal();
for (SysRole role : userInfo.getRoleList()) {
authorizationInfo.addRole(role.getRole());
for(SysPermission p:role.getPermissions()){
for (SysPermission p : role.getPermissions()) {
authorizationInfo.addStringPermission(p.getPermission());
}
}
......@@ -49,7 +49,6 @@ public class MyShiroRealm extends AuthorizingRealm {
}
/**
*
* @param token
* @return
* @throws AuthenticationException
......@@ -59,13 +58,13 @@ public class MyShiroRealm extends AuthorizingRealm {
throws AuthenticationException {
System.out.println("MyShiroRealm.doGetAuthenticationInfo()");
//获取用户的输入的账号.
String username = (String)token.getPrincipal();
String username = (String) token.getPrincipal();
System.out.println(username);
System.out.println(token.getCredentials().toString());
//通过username从数据库中查找 User对象,如果找到,没找到.
//实际项目中,这里可以根据实际情况做缓存,如果不做,Shiro自己也是有时间间隔机制,2分钟内不会重复执行该方法
UserInfo user = userInfoService.findByUsername(username);
if(user == null || user.getState()==1){
if (user == null || user.getState() == 1) {
return null;
}
SimpleAuthenticationInfo authenticationInfo = new SimpleAuthenticationInfo(
......
......@@ -33,43 +33,43 @@ import java.util.*;
@Configuration
public class ShiroConfig {
@Autowired
private MyShiroRealm realm;
@Autowired
private MyShiroRealm realm;
@Bean
public MyShiroRealm customRealm() {
return new MyShiroRealm();
}
@Bean
public MyShiroRealm customRealm() {
return new MyShiroRealm();
}
@Bean
public DefaultWebSecurityManager securityManager() {
System.out.println("添加了DefaultWebSecurityManager");
DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager();
securityManager.setRealm(realm);
return securityManager;
}
@Bean
public DefaultWebSecurityManager securityManager() {
System.out.println("添加了DefaultWebSecurityManager");
DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager();
securityManager.setRealm(realm);
return securityManager;
}
@Bean
public static DefaultAdvisorAutoProxyCreator getDefaultAdvisorAutoProxyCreator(){
@Bean
public static DefaultAdvisorAutoProxyCreator getDefaultAdvisorAutoProxyCreator() {
DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator=new DefaultAdvisorAutoProxyCreator();
defaultAdvisorAutoProxyCreator.setUsePrefix(true);
DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator = new DefaultAdvisorAutoProxyCreator();
defaultAdvisorAutoProxyCreator.setUsePrefix(true);
return defaultAdvisorAutoProxyCreator;
}
return defaultAdvisorAutoProxyCreator;
}
@Bean
public ShiroFilterChainDefinition shiroFilterChainDefinition() {
System.out.println("添加了过滤器链");
DefaultShiroFilterChainDefinition chainDefinition = new DefaultShiroFilterChainDefinition();
@Bean
public ShiroFilterChainDefinition shiroFilterChainDefinition() {
System.out.println("添加了过滤器链");
DefaultShiroFilterChainDefinition chainDefinition = new DefaultShiroFilterChainDefinition();
chainDefinition.addPathDefinition("/admin/**", "authc");
chainDefinition.addPathDefinition("/admin/**", "roles[admin]");
chainDefinition.addPathDefinition("/user/login", "anon");
chainDefinition.addPathDefinition("/user/logout", "anon");
chainDefinition.addPathDefinition("/user/**", "authc");
chainDefinition.addPathDefinition("/**", "anon");
chainDefinition.addPathDefinition("/admin/**", "authc");
chainDefinition.addPathDefinition("/admin/**", "roles[admin]");
chainDefinition.addPathDefinition("/user/login", "anon");
chainDefinition.addPathDefinition("/user/logout", "anon");
chainDefinition.addPathDefinition("/user/**", "authc");
chainDefinition.addPathDefinition("/**", "anon");
return chainDefinition;
}
return chainDefinition;
}
}
......@@ -2,72 +2,99 @@ package com.yxproject.start.entity;
import javax.persistence.*;
import java.sql.Time;
import java.util.Date;
import java.util.Objects;
/**
* Created by zhangyusheng on 2018/11/16 10:51
*/
@Entity
@Table(name = "CARD_BODY", schema = "DAHAI", catalog = "")
@Table(name = "CARD_BODY", schema = "DAHAI")
public class CardBodyEntity {
private long cardBodyId;
private Time saveDate;
private long isActive;
private long totalCount;
private long card_Body_Id;
private Date save_Date;
private long card_Type_Id;
private long is_Active;
private long task_Id;
private long total_Count;
@Id
@Column(name = "CARD_BODY_ID", nullable = false, precision = 0)
public long getCardBodyId() {
return cardBodyId;
public long getCard_Body_Id() {
return card_Body_Id;
}
public void setCardBodyId(long cardBodyId) {
this.cardBodyId = cardBodyId;
public void setCard_Body_Id(long card_Body_Id) {
this.card_Body_Id = card_Body_Id;
}
@Basic
@Column(name = "SAVE_DATE", nullable = false)
public Time getSaveDate() {
return saveDate;
public Date getSave_Date() {
return save_Date;
}
public void setSaveDate(Time saveDate) {
this.saveDate = saveDate;
public void setSave_Date(Date save_Date) {
this.save_Date = save_Date;
}
@Basic
@Column(name = "CARD_TYPE_ID", nullable = false, precision = 0)
public long getCard_Type_Id() {
return card_Type_Id;
}
public void setCard_Type_Id(long card_Type_Id) {
this.card_Type_Id = card_Type_Id;
}
@Basic
@Column(name = "IS_ACTIVE", nullable = false, precision = 0)
public long getIsActive() {
return isActive;
public long getIs_Active() {
return is_Active;
}
public void setIs_Active(long is_Active) {
this.is_Active = is_Active;
}
@Basic
@Column(name = "TASK_ID", nullable = false, precision = 0)
public long getTask_Id() {
return task_Id;
}
public void setIsActive(long isActive) {
this.isActive = isActive;
public void setTask_Id(long task_id) {
this.task_Id = task_Id;
}
@Basic
@Column(name = "TOTAL_COUNT", nullable = false, precision = 0)
public long getTotalCount() {
return totalCount;
public long getTotal_Count() {
return total_Count;
}
public void setTotalCount(long totalCount) {
this.totalCount = totalCount;
public void setTotal_Count(long total_Count) {
this.total_Count = total_Count;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CardBodyEntity that = (CardBodyEntity) o;
return cardBodyId == that.cardBodyId &&
isActive == that.isActive &&
totalCount == that.totalCount &&
Objects.equals(saveDate, that.saveDate);
return card_Body_Id == that.card_Body_Id &&
card_Type_Id == that.card_Type_Id &&
is_Active == that.is_Active &&
task_Id == that.task_Id &&
total_Count == that.total_Count &&
Objects.equals(save_Date, that.save_Date);
}
@Override
public int hashCode() {
return Objects.hash(cardBodyId, saveDate, isActive, totalCount);
return Objects.hash(card_Body_Id, card_Type_Id, is_Active, task_Id,total_Count,save_Date);
}
}
......@@ -2,68 +2,87 @@ package com.yxproject.start.entity;
import javax.persistence.*;
import java.sql.Time;
import java.util.Date;
import java.util.Objects;
/**
* Created by zhangyusheng on 2018/11/16 10:51
*/
@Entity
@Table(name = "COUNTY_LIST", schema = "DAHAI", catalog = "")
@Table(name = "COUNTY_LIST", schema = "DAHAI")
public class CountyListEntity {
private long countyListId;
private Time saveDate;
private Long finishCount;
private Long inStorageCount;
private Long outStorageCount;
private long county_List_Id;
private long task_Id;
private Date save_Date;
private String county_Code;
private long finish_Count;
private long in_Storage_Count;
private long out_Storage_Count;
@Id
@Column(name = "COUNTY_LIST_ID", nullable = false, precision = 0)
public long getCountyListId() {
return countyListId;
public long getCounty_List_Id() {
return county_List_Id;
}
public void setCounty_List_Id(long county_List_Id) {
this.county_List_Id = county_List_Id;
}
@Basic
@Column(name = "TASK_ID", nullable = false, precision = 0)
public long getTask_Id() {
return task_Id;
}
public void setCountyListId(long countyListId) {
this.countyListId = countyListId;
public void setTask_Id(long task_Id) {
this.task_Id = task_Id;
}
@Basic
@Column(name = "SAVE_DATE", nullable = false)
public Time getSaveDate() {
return saveDate;
public Date getSave_Date() {
return save_Date;
}
public void setSaveDate(Time saveDate) {
this.saveDate = saveDate;
public void setSave_Date(Date save_Date) {
this.save_Date = save_Date;
}
@Basic
@Column(name = "COUNTY_CODE", nullable = true, length = 20)
public String getCounty_Code() {
return county_Code;
}
public void setCounty_Code(String county_Code) {
this.county_Code = county_Code;
}
@Basic
@Column(name = "FINISH_COUNT", nullable = true, precision = 0)
public Long getFinishCount() {
return finishCount;
public long getFinish_Count() {
return finish_Count;
}
public void setFinishCount(Long finishCount) {
this.finishCount = finishCount;
public void setFinish_Count(long finish_Count) {
this.finish_Count = finish_Count;
}
@Basic
@Column(name = "IN_STORAGE_COUNT", nullable = true, precision = 0)
public Long getInStorageCount() {
return inStorageCount;
public long getIn_Storage_Count() {
return in_Storage_Count;
}
public void setInStorageCount(Long inStorageCount) {
this.inStorageCount = inStorageCount;
public void setIn_Storage_Count(long in_Storage_Count) {
this.in_Storage_Count = in_Storage_Count;
}
@Basic
@Column(name = "OUT_STORAGE_COUNT", nullable = true, precision = 0)
public Long getOutStorageCount() {
return outStorageCount;
public long getOut_Storage_Count() {
return out_Storage_Count;
}
public void setOutStorageCount(Long outStorageCount) {
this.outStorageCount = outStorageCount;
public void setOut_Storage_Count(long out_Storage_Count) {
this.out_Storage_Count = out_Storage_Count;
}
@Override
......@@ -71,15 +90,17 @@ public class CountyListEntity {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CountyListEntity that = (CountyListEntity) o;
return countyListId == that.countyListId &&
Objects.equals(saveDate, that.saveDate) &&
Objects.equals(finishCount, that.finishCount) &&
Objects.equals(inStorageCount, that.inStorageCount) &&
Objects.equals(outStorageCount, that.outStorageCount);
return county_List_Id == that.county_List_Id &&
task_Id == that.task_Id &&
finish_Count == that.finish_Count &&
in_Storage_Count == that.in_Storage_Count &&
out_Storage_Count == that.out_Storage_Count &&
Objects.equals(save_Date, that.save_Date) &&
Objects.equals(county_Code, that.county_Code);
}
@Override
public int hashCode() {
return Objects.hash(countyListId, saveDate, finishCount, inStorageCount, outStorageCount);
return Objects.hash(county_List_Id, task_Id, finish_Count, in_Storage_Count, out_Storage_Count,save_Date,county_Code);
}
}
......@@ -7,24 +7,14 @@ import java.util.Objects;
* Created by zhangyusheng on 2018/11/16 10:51
*/
@Entity
@Table(name = "GROUP_NO", schema = "DAHAI", catalog = "")
@Table(name = "GROUP_NO", schema = "DAHAI")
public class GroupNoEntity {
private long group_Id;
private long task_Id;
private String group_No;
private long vaild_Count;
private long invalid_Count;
private long special_Card_Count;
@Basic
@Column(name = "GROUP_ID", nullable = false, precision = 0)
public long getGroup_Id() {
return group_Id;
}
public void setGroup_Id(long group_Id) {
this.group_Id = group_Id;
}
@Basic
@Column(name = "TASK_ID", nullable = false, precision = 0)
public long getTask_Id() {
......@@ -72,11 +62,10 @@ public class GroupNoEntity {
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (this == o) { return true;}
if (o == null || getClass() != o.getClass()){ return false;}
GroupNoEntity that = (GroupNoEntity) o;
return group_Id == that.group_Id &&
vaild_Count == that.vaild_Count &&
return vaild_Count == that.vaild_Count &&
invalid_Count == that.invalid_Count &&
special_Card_Count == that.special_Card_Count &&
task_Id == that.task_Id &&
......@@ -85,6 +74,6 @@ public class GroupNoEntity {
@Override
public int hashCode() {
return Objects.hash(group_Id, group_No, task_Id, vaild_Count, invalid_Count,special_Card_Count);
return Objects.hash( group_No, task_Id, vaild_Count, invalid_Count,special_Card_Count);
}
}
......@@ -190,9 +190,6 @@ public class TaskEntity {
this.in_Storage_Date = in_Storage_Date;
}
@Basic
@Column(name = "TASK_STATE_ID", nullable = true, precision = 0)
public long getTask_State_Id() {
......
package com.yxproject.start.mapper;
import com.yxproject.start.entity.CardBodyEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* Created by liuxinben on 2018/11/6.10:26
*/
@Mapper
public interface CardBodyMapper {
public int insertCardBodyEntity(CardBodyEntity cardBodyEntity);
public int updateCardBodyInfo(CardBodyEntity cardBodyEntity);
}
\ No newline at end of file
package com.yxproject.start.mapper;
import com.yxproject.start.entity.CountyListEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.Date;
import java.util.List;
/**
* Created by liuxinben on 2018/11/6.10:26
*/
@Mapper
public interface CountyListMapper {
public List<CountyListEntity> findCountyListByTaskListID(String tasklistID);
public int updateBoundCount(CountyListEntity countyListEntity);
public List<CountyListEntity>getConnectList(String save_Date);
}
......@@ -15,17 +15,38 @@ public interface PoliceStationVailedMapper {
* @param policeStationVailedEntity
* @return
*/
@Insert("INSERT INTO POLICE_STATION_VAILED_INFO (POLICE_STATION_VAILED_INFO_ID,CYCLESHEETID,POLICE_STATION_CODE,VAILED_COUNT,INVALID_COUNT,SAVA_DATE) " +
"values (#{police_Station_Vailed_Info_Id},#{cyclesheetid},#{police_Station_Code},#{vailed_Count},#{invalid_Count},#{sava_Date})")
@Insert("INSERT INTO POLICE_STATION_VAILED (POLICE_STATION_VAILED_ID,TASK_ID,POLICE_STATION_CODE,VAILED_COUNT,INVALID_COUNT,SAVA_DATE) " +
"values (#{police_Station_Vailed_Id},#{task_Id},#{police_Station_Code},#{vailed_Count},#{invalid_Count},#{sava_Date})")
@Options(useGeneratedKeys = true, keyProperty = "police_Station_Vailed_Info_Id",keyColumn = "police_Station_Vailed_Info_Id")
public void savePoliceStationVailedInfoEntity(PoliceStationVailedEntity policeStationVailedEntity);
@Select("select * from POLICE_STATION_VAILED_INFO WHERE POLICE_STATION_VAILED_INFO_ID=#{id}")
@Results({@Result(property = "police_Station_Vailed_Info_Id",column = "police_Station_Vailed_Info_Id"),
@Result(property = "cyclesheetid",column = "cyclesheetid"),
@Select("select * from POLICE_STATION_VAILED WHERE POLICE_STATION_VAILED_ID=#{id}")
@Results({@Result(property = "police_Station_Vailed_Id",column = "police_Station_Vailed_Id"),
@Result(property = "task_Id",column = "police_Station_Vailed_Id"),
@Result(property = "police_Station_Code",column = "police_Station_Code"),
@Result(property = "vailed_Count",column = "vailed_Count"),
@Result(property = "invalid_Count",column = "invalid_Count"),
@Result(property = "sava_Date",column = "sava_Date")})
public List<PoliceStationVailedEntity> findPoliceStationVailedEntity(String id);
}
//@Mapper
//interface Inter {
// public static final int num=3;
// public abstract void show();
//}
//
//class Test implements Inter {
// public void show(){
//
// }
//}
//public class InterfaceDome{
//// public static void mian(String[] args){
//// Test t = new Test();
//// System.out.println(t.num);
//// System.out.println(Test.num);
//// System.out.println(Inter.num);
//// }
//
//}
\ No newline at end of file
......@@ -17,5 +17,6 @@ public interface TaskMapper {
public int updateTaskEntity(TaskEntity taskEntity);
public List<TaskEntity> findTaskEntityByAcceptNo(String acceptNo);
public List<TaskEntity> findTaskEntityByState(int state);
public int replaceExceptionInformation(TaskEntity taskEntity);
public int totalnum (int i);
}
......@@ -101,3 +101,5 @@ public interface UserInfoMapper {
@Update("UPDATE USER_INFO SET USERNAME=#{username},NAME=#{name} where ID=#{id}")
public void updateUserInfo(UserInfo userInfo);
}
......@@ -12,14 +12,17 @@ public interface UtilMapper {
* 查询任务单序列值
*/
public int findProductionTaskListSequenceNextValue();
/**
* 查询组号信息序列值
*/
public int findGroupInfoSequenceNextValue();
/**
* 查询派出所照片质量表序列值
*/
public int findPoliceStationVailedSequenceNextValue();
/**
* 查询废证信息表序列值
*/
......@@ -33,3 +36,5 @@ public interface UtilMapper {
*/
public int findPoliceStationApplyReasonSequenceNextValue();
}
package com.yxproject.start.service;
import com.yxproject.start.entity.CardBodyEntity;
import com.yxproject.start.entity.GroupNoEntity;
import java.util.List;
/**
* Created by Administrator on 2018/11/7.
*/
public interface CardBodyService {
public int addCardBodyEntity(CardBodyEntity cardBodyEntity);
public int updateCardBody(CardBodyEntity map);
}
package com.yxproject.start.service;
import com.yxproject.start.entity.CountyListEntity;
import java.util.Date;
import java.util.List;
public interface CountyListService {
public List<CountyListEntity> findCountyListByTaskListID(String tasklistID);
public int reviseOutBoundCount(CountyListEntity map);
public int reviseInBoundCount(CountyListEntity map);
public List<CountyListEntity> getConnectList(String save_Date);
}
......@@ -26,5 +26,11 @@ public interface TaskService {
public List<Map<String,Object>> findProductionTaskListEntityByState(int state);
public int addExceptionState(TaskEntity state);
public int updateOutboundDate(TaskEntity map);
public int updatePutinstorageDate(TaskEntity map);
}
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.CardBodyEntity;
import com.yxproject.start.entity.GroupNoEntity;
import com.yxproject.start.mapper.CardBodyMapper;
import com.yxproject.start.mapper.GroupNoMapper;
import com.yxproject.start.mapper.UtilMapper;
import com.yxproject.start.service.CardBodyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.List;
/**
* Created by Administrator on 2018/11/7.
*/
@Service
public class CardBodyServiceImpl implements CardBodyService {
@Autowired
public CardBodyMapper cardBodyMapper;
@Override
public int updateCardBody(CardBodyEntity cardBodyEntity) {
//todo 状态更新时间
return cardBodyMapper.updateCardBodyInfo(cardBodyEntity);
}
@Override
public int addCardBodyEntity(CardBodyEntity cardBodyEntity) {
return cardBodyMapper.insertCardBodyEntity(cardBodyEntity);
}
}
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.CountyListEntity;
import com.yxproject.start.mapper.CountyListMapper;
import com.yxproject.start.service.CountyListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
* Created by liuxinben on 2018/11/6.13:42
*/
@Service
public class CountyListServiceImpl implements CountyListService {
@Autowired
public CountyListMapper countyListMapper;
@Override
public List<CountyListEntity> findCountyListByTaskListID(String tasklistid) {
List<CountyListEntity> byTaskListID = countyListMapper.findCountyListByTaskListID(tasklistid);
return byTaskListID;
}
@Override
public int reviseOutBoundCount(CountyListEntity countyListEntity) {
countyListEntity.setOut_Storage_Count(countyListEntity.getOut_Storage_Count());
return countyListMapper.updateBoundCount(countyListEntity);
}
@Override
public int reviseInBoundCount(CountyListEntity countyListEntity) {
countyListEntity.setIn_Storage_Count(countyListEntity.getIn_Storage_Count());
return countyListMapper.updateBoundCount(countyListEntity);
}
@Override
public List<CountyListEntity> getConnectList(String save_Date) {
return countyListMapper.getConnectList(save_Date);
}
}
\ No newline at end of file
......@@ -9,7 +9,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
......
......@@ -4,6 +4,9 @@ import com.yxproject.start.entity.*;
import com.yxproject.start.entity.accu.AccCardTEntity;
import com.yxproject.start.entity.prod.ProdCardTEntity;
import com.yxproject.start.mapper.*;
import com.yxproject.start.entity.CountyListEntity;
import net.sf.json.JSONObject;
import java.util.Scanner;
import com.yxproject.start.service.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -40,6 +43,7 @@ public class TaskServiceImpl implements TaskService {
public SpecialCardMapper specialCardMapper;
/**
* 查询任务单
* 通过任务单ID
......@@ -411,6 +415,65 @@ public class TaskServiceImpl implements TaskService {
return null;
}
/**
* 更新任务单
* 更新异常状态
* @param
* @return
*/
@Override
public int addExceptionState(TaskEntity taskEntity) {
int i =0;
if(taskEntity.getException_Information()!=null) {
taskEntity.setIs_Exception((long)1);
i=taskMapper.updateTaskEntity(taskEntity);
} else {
taskEntity.setIs_Exception((long)0);
i=taskMapper.replaceExceptionInformation(taskEntity);
}
return i;
}
private CountyListEntity countyListEntity;
/**
* 更新出库时间
* @param
* @return
*/
@Override
public int updateOutboundDate(TaskEntity taskEntity) {
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
* @return
*/
@Override
public int updatePutinstorageDate(TaskEntity taskEntity) {
int i=0;
i= taskMapper.totalnum(i);
if (countyListEntity.getIn_Storage_Count()==i){
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
taskEntity.setIn_Storage_Date(new Date());
return taskMapper.updateTaskEntity(taskEntity);
}
else{
return 0;
}
}
/**
* 测试查询
*
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yxproject.start.mapper.CardBodyInfoMapper">
<resultMap id="CardBodyInfoMapper" type="com.yxproject.start.entity.CardBodyEntity">
<id column="CARD_BODY_ID" property="card_Body_Id" jdbcType="NUMERIC"/>
<result column="SAVE_DATE" property="save_Date" jdbcType="DATE"/>
<result column="CARD_TYPE_ID" property="card_Type_Id" jdbcType="NUMERIC"/>
<result column="IS_ACTIVE" property="is_Active" jdbcType="NUMERIC"/>
<result column="TASK_ID" property="task_Id" jdbcType="NUMERIC"/>
<result column="TOTAL_COUNT" property="total_Count" jdbcType="NUMERIC"/>
</resultMap>
<select id="insertCardBodyEntity" resultType="com.yxproject.start.entity.CardBodyEntity" parameterType="String">
select * from CARD_BODY where CARD_BODY_ID=#{card_Body_Id}
</select>
<update id="updateCardBody" parameterType="com.yxproject.start.entity.CardBodyEntity">
update CARD_BODY
<set>
<if test="save_Date ">SAVE_DATE =#{save_Date},</if>
<if test="card_Type_Id ">CARD_TYPE_ID =#{card_Type_Id},</if>
<if test="is_Active ">is_Active =#{is_Active},</if>
<if test="card_Body_Type">CARD_BODY_TYPE =#{card_Body_Type},</if>
<if test="task_Id ">TASK_ID =#{task_Id},</if>
<if test="total_Count">TOTAL_COUNT =#{total_Count},</if>
</set>
where CARD_BODY_ID =#{card_Body_Id}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yxproject.start.mapper.CountyListMapper">
<resultMap id="CountyListMapper" type="com.yxproject.start.entity.CountyListEntity">
<id column="COUNTY_LIST_ID" property="county_List_Id" jdbcType="NUMERIC" />
<result column="TASK_ID" property="task_Id" jdbcType="NUMERIC"/>
<result column="SAVE_DATE" property="save_Date" jdbcType="DATE"/>
<result column="COUNTY_CODE" property="county_Code" jdbcType="VARCHAR"/>
<result column="FINISH_COUNT" property="finish_Count" jdbcType="NUMERIC"/>
<result column="IN_STORAGE_COUNT" property="in_Storage_Count" jdbcType="NUMERIC"/>
<result column="OUT_STORAGE_COUNT" property="out_Storage_Count" jdbcType="NUMERIC"/>
</resultMap>
<!--<insert id="addPermissionByMap" parameterType="com.yxproject.start.entity.SysPermission">-->
<!--Insert into DAHAI.SYS_PERMISSION (ID,AVAILABLE,NAME,PARENT_ID,PARENT_IDS,PERMISSION,RESOURCE_TYPE,URL) values (PERMISSION_seq.nextval,0,#{name},#{parentId},#{parentIds},#{permission},#{resourceType},#{url})-->
<!--</insert>-->
<select id="findCountyListByTaskListID" resultType="com.yxproject.start.entity.CountyListEntity" parameterType="String">
SELECT * FROM COUNTY_LIST where task_Id=#{task_Id}
</select>
<update id="updateBoundCount" parameterType="com.yxproject.start.entity.CountyListEntity" >
update COUNTY_LIST OUT_STORAGE_COUNT =#{out_Storage_Count},IN_STORAGE_COUNT =#{in_Storage_Count} where COUNTY_LIST_ID =#{county_List_Id}
</update>
<select id="getConnectList" resultType="com.yxproject.start.entity.CountyListEntity" parameterType="String">
SELECT OUT_STORAGE_COUNT FROM COUNTY_LIST where save_Date=#{save_Date}
</select>
</mapper>
......@@ -2,9 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yxproject.start.mapper.GroupNoMapper">
<resultMap id="GroupNoMapper" type="com.yxproject.start.entity.GroupNoEntity">
<id column="GROUP_ID" property="group_Id" jdbcType="NUMERIC"/>
<id column="GROUP_NO" property="group_No" jdbcType="VARCHAR"/>
<result column="TASK_ID" property="task_Id" jdbcType="NUMERIC"/>
<result column="GROUP_NO" property="group_No" jdbcType="VARCHAR"/>
<result column="VAILD_COUNT" property="vaild_Count" jdbcType="NUMERIC"/>
<result column="INVALID_COUNT" property="invalid_Count" jdbcType="NUMERIC"/>
<result column="SPECIAL_CARD_COUNT" property="special_Card_Count" jdbcType="NUMERIC"/>
......@@ -15,8 +14,8 @@
</select>
<insert id="insertGroupNoEntity" parameterType="com.yxproject.start.entity.GroupNoEntity">
Insert into GROUP_NO (GROUP_ID,GROUP_NO,task_Id,VAILD_COUNT,INVALID_COUNT,special_Card_Count) values
(#{group_Id},#{group_No},#{task_Id},#{vaild_Count},#{invalid_Count},#{special_Card_Count})
Insert into GROUP_NO (GROUP_NO,task_Id,VAILD_COUNT,INVALID_COUNT,special_Card_Count) values
(#{group_No},#{task_Id},#{vaild_Count},#{invalid_Count},#{special_Card_Count})
</insert>
<select id="findGroupNoEntityByAcceptNo" resultType="com.yxproject.start.entity.GroupNoEntity" parameterType="String">
......@@ -24,13 +23,12 @@
</select>
<update id="updateGroupinfoEntity" parameterType="com.yxproject.start.entity.GroupNoEntity">
update GROUP_NO set GROUP_ID=#{group_Id}
<if test="group_No">,group_No =#{group_No}</if>
update GROUP_NO set group_No =#{group_No}
<if test="task_Id">,task_Id =#{task_Id}</if>
<if test="vaild_Count">,vaild_Count =#{vaild_Count}</if>
<if test="invalid_Count">,invalid_Count =#{invalid_Count}</if>
<if test="special_Card_Count">,special_Card_Count =#{special_Card_Count}</if>
where GROUP_ID=#{group_Id}
where group_No=#{group_No}
</update>
<select id="findGroupNoCountByTaskId" parameterType="String" resultType="int">
......
......@@ -34,7 +34,7 @@
values (#{task_Id},#{card_Type},#{old_Card_Type},#{citycode},#{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})
</insert>
<update id="updateProductionTask" parameterType="com.yxproject.start.entity.TaskEntity">
<update id="updateTaskEntity" parameterType="com.yxproject.start.entity.TaskEntity">
update TASK
<set>
<if test="card_Type ">card_Type =#{card_Type},</if>
......@@ -61,11 +61,19 @@
</update>
<select id="findProductionTaskListEntityByAcceptNo" resultType="com.yxproject.start.entity.TaskEntity" parameterType="String">
select * from TASK left join GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID where GROUP_NO.GROUP_NO =#{acceptNo} or GROUP_NO.GROUP_NO =substr (#{acceptNo},0,8)
select * from TASK left join GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID where GROUP_NO.GROUP_NO =#{acceptNo} or GROUP_NO.GROUP_NO =substr (#{acceptNo},0,8)
</select>
<select id="findProductionTaskListEntityByState" resultType="com.yxproject.start.entity.TaskEntity" parameterType="Integer">
select * from TASK where TASK_STATE_ID =#{state }
</select>
<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>
<select id="totalnum" resultType="Int">
select SUM(VAILD_COUNT)FROM GROUP_NO where TASK_ID =#{task_Id}
</select>
</mapper>
\ No newline at end of file
<div class="app-content-body app-content-full fade-in-up" ng-class="{'h-full': app.hideFooter }">
<div class="hbox hbox-auto-xs hbox-auto-sm bg-light " ng-init="app.settings.asideFixed = true;app.settings.asideDock = false;app.settings.container = false;app.hideAside = false;app.hideFooter = true;">
<div class="hbox hbox-auto-xs hbox-auto-sm bg-light "
ng-init="app.settings.asideFixed = true;app.settings.asideDock = false;app.settings.container = false;app.hideAside = false;app.hideFooter = true;">
<div class="hbox hbox-auto-xs hbox-auto-sm">
<div class="col w-md bg-light dk b-r bg-auto">
<div class="wrapper b-b bg">
<button class="btn btn-sm btn-default pull-right visible-sm visible-xs" ui-toggle-class="show" target="#email-menu"><i class="fa fa-bars"></i></button>
<a class="w-xs font-bold">任务循环单</a>
<button class="btn btn-sm btn-default pull-right visible-sm visible-xs" ui-toggle-class="show"
target="#email-menu"><i class="fa fa-bars"></i></button>
<a class="w-xs font-bold">任务循环单</a>
</div>
<div class="wrapper hidden-sm hidden-xs" id="email-menu">
<ul class="nav nav-pills nav-stacked nav-sm">
<li ng-repeat="fold in folds" ui-sref-active="active" ng-class="{true: 'active', false: ''}[fold.isActive]" >
<a ng-click="func(fold.id)">
{{fold.name}}({{fold.count}})
<li ng-repeat="type in typeList" ui-sref-active="active"
ng-class="{true: 'active', false: ''}[type.isActive]">
<a ng-click="check_type(type.typeCode)">
{{type.typeName}}({{type.typeCount}})
</a>
</li>
</ul>
......@@ -22,110 +25,84 @@
<div class="row" style="padding-top:15px;padding-left:20px;">
<span class="col-lg-2">
<div class="input-group w-md">
<input type="text" class="form-control" datepicker-popup="{{format}}" ng-model="dt" is-open="opened" datepicker-options="dateOptions" ng-required="true" close-text="Close" />
<input type="text" class="form-control" datepicker-popup="{{format}}" ng-model="dt"
is-open="opened" datepicker-options="dateOptions" ng-required="true"
close-text="Close"/>
<span class="input-group-btn">
<button type="button" class="btn btn-default" ng-click="open($event)"><i class="glyphicon glyphicon-calendar"></i></button>
<button type="button" class="btn btn-default" ng-click="open($event)"><i
class="glyphicon glyphicon-calendar"></i></button>
</span>
</div>
</span>
<span class="col-lg-1">
<button type="button" class="btn btn-primary" ng-click="">查询</button>
<span class="col-lg-1" style="margin-left: 1em">
<button type="button" class="btn btn-primary" ng-click="task_click()">查询</button>
</span>
</div>
<!-- / header -->
<div class="wrapper-md">
<div class="panel panel-default">
<div class="panel-heading">
Responsive Table
制证任务
</div>
<div class="table-responsive">
<table class="table table-striped b-t b-light">
<thead>
<tr>
<th style="width:20px;">
<label class="i-checks m-b-none">
<input type="checkbox"><i></i>
</label>
</th>
<th>Project</th>
<th>Task</th>
<th>Date</th>
<th style="width:30px;"></th>
</tr>
<th>循环单编号</th>
<th>地市</th>
<th>组数</th>
<th>组号</th>
<th>数据核验</th>
<th>不合格</th>
<th>机器号</th>
<th>状态</th>
<th></th>
</thead>
<tbody>
<tr>
<td><label class="i-checks m-b-none"><input type="checkbox" name="post[]"><i></i></label></td>
<td>Idrawfast</td>
<td>4c</td>
<td>Jul 25, 2013</td>
<td>
<a href class="active" ui-toggle-class><i class="fa fa-check text-success text-active"></i><i class="fa fa-times text-danger text"></i></a>
</td>
</tr>
<tr>
<td><label class="i-checks m-b-none"><input type="checkbox" name="post[]"><i></i></label></td>
<td>Formasa</td>
<td>8c</td>
<td>Jul 22, 2013</td>
<td>
<a href ui-toggle-class><i class="fa fa-check text-success text-active"></i><i class="fa fa-times text-danger text"></i></a>
</td>
</tr>
<tr>
<td><label class="i-checks m-b-none"><input type="checkbox" name="post[]"><i></i></label></td>
<td>Avatar system</td>
<td>15c</td>
<td>Jul 15, 2013</td>
<td>
<a href class="active" ui-toggle-class><i class="fa fa-check text-success text-active"></i><i class="fa fa-times text-danger text"></i></a>
</td>
</tr>
<tr>
<td><label class="i-checks m-b-none"><input type="checkbox" name="post[]"><i></i></label></td>
<td>Throwdown</td>
<td>4c</td>
<td>Jul 11, 2013</td>
<td>
<a href class="active" ui-toggle-class><i class="fa fa-check text-success text-active"></i><i class="fa fa-times text-danger text"></i></a>
</td>
</tr>
<tbody ng-repeat="city in cityList| orderBy:citycode:desc">
<tr>
<td><label class="i-checks m-b-none"><input type="checkbox" name="post[]"><i></i></label></td>
<td>Idrawfast</td>
<td>4c</td>
<td>Jul 7, 2013</td>
<td>{{city.task_Id}}</td>
<td><span class="city"
style="color: #337ab7;display:inline-block">{{city.cityName}}</span></td>
<td>{{city.groupCount}}</td>
<td>{{city.groupNO}}</td>
<td>{{city.groupSum}}</td>
<td>{{city.groupInvailedSum}}</td>
<td>
<a href class="active" ui-toggle-class><i class="fa fa-check text-success text-active"></i><i class="fa fa-times text-danger text"></i></a>
<span style="padding-left:10px;"
ng-show="city.printer_Id==null">未分配</span>
<span style="padding-left:10px;"
ng-show="city.printer_Id!=null">机器<span>{{city.printer_Id}}</span></span>
</td>
<td>{{city.state}}</td>
<td><a ng-click="showTable(city.task_Id)">组号列表</a></td>
</tr>
<tr>
<td><label class="i-checks m-b-none"><input type="checkbox" name="post[]"><i></i></label></td>
<td>Formasa</td>
<td>8c</td>
<td>Jul 3, 2013</td>
<td>
<a href class="active" ui-toggle-class><i class="fa fa-check text-success text-active"></i><i class="fa fa-times text-danger text"></i></a>
</td>
</tr>
<tr>
<td><label class="i-checks m-b-none"><input type="checkbox" name="post[]"><i></i></label></td>
<td>Avatar system</td>
<td>15c</td>
<td>Jul 2, 2013</td>
<td>
<a href class="active" ui-toggle-class><i class="fa fa-check text-success text-active"></i><i class="fa fa-times text-danger text"></i></a>
</td>
</tr>
<tr>
<td><label class="i-checks m-b-none"><input type="checkbox" name="post[]"><i></i></label></td>
<td>Videodown</td>
<td>4c</td>
<td>Jul 1, 2013</td>
<td>
<a href class="active" ui-toggle-class><i class="fa fa-check text-success text-active"></i><i class="fa fa-times text-danger text"></i></a>
<tr ng-show="showtable==city.task_Id">
<td></td>
<td colspan="4">
<table style="font-size:0.9em;color: #000;" class="table">
<thead>
<th>组号</th>
<th>合格数量</th>
<th>不合格数量</th>
<th></th>
</thead>
<tbody>
<tr ng-repeat="groups in city.list">
<td>{{groups.groupNo}}</td>
<td>{{groups.downloadCount}}</td>
<td>{{groups.type}}</td>
<td></td>
</tr>
</tbody>
</table>
</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
......
......@@ -54,7 +54,42 @@ app.controller('cycleSheetCtrl', ['$scope','$rootScope', '$http', '$state', '$fi
$scope.initDate = new Date('2016-15-20');
$scope.formats = ['dd-MMMM-yyyy', 'yyyy/MM/dd', 'dd.MM.yyyy', 'shortDate'];
$scope.format = $scope.formats[1];
$scope.task_click = function(){
console.log($rootScope.loginData.state,"----测试-----",$scope.dt,"====");
}
$scope.check_type = function(typeCode){
console.log($rootScope.loginData.state,"----测试-----",$scope.dt,"====",typeCode,"+++++++++++++");
}
$scope.typeList =[
{typeCode:0,typeCount:5000,typeName:'普通证'},
{typeCode:1,typeCount:5000,typeName:'邮寄证'},
{typeCode:2,typeCount:5000,typeName:'特殊证'},
{typeCode:9,typeCount:5000,typeName:'异地证'},
]
$scope.cityList =[
{"card_Type":1,"citycode":"410300",cityName:"郑州",groupCount:10,groupSum:1500,groupInvailedSum:15,groupNO:"1-25","download_Date":null,"exception_Information":"","in_Storage_Date":null,"is_Exception":0,"issued_Date":null,"old_Card_Type":1,"out_Storage_Date":null,"out_Workshop_Date":null,"position_Date":null,"print_Out_Date":null,"print_State":0,"printer_Id":0,"quality_People_Name":"","quality_Test_Date":null,"submit_Date":{"date":20,"day":2,"hours":11,"minutes":20,"month":10,"seconds":53,"time":1542684053000,"timezoneOffset":-480,"year":118},"task_Id":201811203,"task_State_Id":1},
{"card_Type":1,"citycode":"410400",cityName:"驻马店",groupCount:10,groupSum:2500,groupInvailedSum:16,groupNO:"26-45","download_Date":null,"exception_Information":"","in_Storage_Date":null,"is_Exception":0,"issued_Date":null,"old_Card_Type":1,"out_Storage_Date":null,"out_Workshop_Date":null,"position_Date":null,"print_Out_Date":null,"print_State":0,"printer_Id":0,"quality_People_Name":"","quality_Test_Date":null,"submit_Date":{"date":20,"day":2,"hours":11,"minutes":20,"month":10,"seconds":53,"time":1542684053000,"timezoneOffset":-480,"year":118},"task_Id":201811203,"task_State_Id":1},
{"card_Type":1,"citycode":"410500",cityName:"新乡",groupCount:10,groupSum:3500,groupInvailedSum:17,groupNO:"46","download_Date":null,"exception_Information":"","in_Storage_Date":null,"is_Exception":0,"issued_Date":null,"old_Card_Type":1,"out_Storage_Date":null,"out_Workshop_Date":null,"position_Date":null,"print_Out_Date":null,"print_State":0,"printer_Id":0,"quality_People_Name":"","quality_Test_Date":null,"submit_Date":{"date":20,"day":2,"hours":11,"minutes":20,"month":10,"seconds":53,"time":1542684053000,"timezoneOffset":-480,"year":118},"task_Id":201811203,"task_State_Id":1},
{"card_Type":1,"citycode":"410600",cityName:"周口",groupCount:10,groupSum:3500,groupInvailedSum:18,groupNO:"48-52,53-55","download_Date":null,"exception_Information":"","in_Storage_Date":null,"is_Exception":0,"issued_Date":null,"old_Card_Type":1,"out_Storage_Date":null,"out_Workshop_Date":null,"position_Date":null,"print_Out_Date":null,"print_State":0,"printer_Id":0,"quality_People_Name":"","quality_Test_Date":null,"submit_Date":{"date":20,"day":2,"hours":11,"minutes":20,"month":10,"seconds":53,"time":1542684053000,"timezoneOffset":-480,"year":118},"task_Id":201811203,"task_State_Id":1},
]
$scope.groupList =[
{"groupNO":45,"vaildCount":45,invaildCount:25,specialCardCount:5,specialCardList:[{acceptNo:20180401,specialType:1},{acceptNo:20180401,specialType:1}]},
{"groupNO":45,"vaildCount":45,invaildCount:25,specialCardCount:5,specialCardList:[{acceptNo:20180401,specialType:1},{acceptNo:20180401,specialType:1}]},
{"groupNO":45,"vaildCount":45,invaildCount:25,specialCardCount:5,specialCardList:[{acceptNo:20180401,specialType:1},{acceptNo:20180401,specialType:1}]}
]
$scope.countyList = [
{}
]
$scope.showtable = -1;
$scope.showTableDY = function (taskID) {
if ($scope.showtable != taskID) {
$scope.showtable = taskID;
} else {
$scope.showtable = -1;
}
}
$scope.folds = [
{id:1,name: '普通证', count:10000,filter:'',isActive:true, dataTable:{
......
package com.yxproject.start.service.impl;
import static org.junit.Assert.*;
/**
* Created by Administrator on 2018/11/6.
*/
public class GroupinfoServiceImplTest {
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
</web-app>
\ 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