diff --git a/lib/CNG信息.txt b/lib/CNG信息.txt index 95c2ac3..cef321c 100644 --- a/lib/CNG信息.txt +++ b/lib/CNG信息.txt @@ -13,7 +13,7 @@ 密码:cngcs2022! 三、堡垒机信息: -访问地址:https://172.23.252.220/web/main.ssi +访问地址:http://172.23.252.220 账号:CNGZH-user01 密码:CNGzh321!CNGzh321! diff --git a/src/main/java/com/ciotea/cdcng/front/application/carPremises/CarInfoController.java b/src/main/java/com/ciotea/cdcng/front/application/carPremises/CarInfoController.java index 23f7d0a..58569c3 100644 --- a/src/main/java/com/ciotea/cdcng/front/application/carPremises/CarInfoController.java +++ b/src/main/java/com/ciotea/cdcng/front/application/carPremises/CarInfoController.java @@ -34,114 +34,112 @@ import infrastructure.support.records.Order; /** * 车辆信息查询 - * */ @Controller @RequestMapping(value = "carInfo") public class CarInfoController { - @Resource - Repository repository; - - @Resource - CngCdCarStrategy carStrategy; - - @Resource - AuthorityDepartmentRepository authorityDepartmentRepository; - - @Resource - BottleRepository bottleRepository; - - @Resource - DepartmentRepository departmentRepository; - - @Resource - CngUserRepository cngUserRepository; - - @Resource - AreaRepository areaRepository; - - @Resource - BottleCertRepository bottleCertRepository; - - @Resource - private LogOperation logOperation; - - @ResponseBody - @RequestMapping(value = "carList", method = RequestMethod.GET) - infrastructure.support.records.Pagination getCars(CngCdCar vo, Context context, Integer dict, Integer dept, Integer area_dict, infrastructure.support.records.Pagination pagination) { - PermissionFilter permissionFilter = cngUserRepository.permissionFilter(context.getDepartment(),context.getDistrict()); - List list = departmentRepository.getLoginerDepartmentType(context); - if(context.getUser().getUsername().equals("cngpublic")){ - pagination.setRows(carStrategy.publicUserCarInfo(vo.getPlatenum(), vo.getVin())); - }else{ - pagination.setRows(carStrategy.getCngCdCar(vo, permissionFilter, pagination, dict, dept, area_dict)); - } - return pagination; - } - - @ResponseBody - @RequestMapping(value = "cngTypeDict", method = RequestMethod.GET) - List getCngTypeDicts(Context context) { - List list = new ArrayList(); - boolean cancel = false; - if( context.getDepartment().getDeptType() != null ){ - if( context.getDepartment().getDeptType().getId()==24 ){//交委 - cancel = true; - } - } - if(cancel){ - list = carStrategy.getCancelList(); - }else{ - list = repository.getAll(CngTypeDict.class, Order.asc("id")); - } - return list; - } - - @ResponseBody - @RequestMapping(value = "regDept", method = RequestMethod.GET) - List getRegDepts() { - Integer types[] = new Integer[] { 17, 22 }; - List list = authorityDepartmentRepository.findByDeptTypes(types); - return list; - } - - @ResponseBody - @RequestMapping(value = "areaDict", method = RequestMethod.GET) - List getAreaDicts() { + @Resource + Repository repository; + + @Resource + CngCdCarStrategy carStrategy; + + @Resource + AuthorityDepartmentRepository authorityDepartmentRepository; + + @Resource + BottleRepository bottleRepository; + + @Resource + DepartmentRepository departmentRepository; + + @Resource + CngUserRepository cngUserRepository; + + @Resource + AreaRepository areaRepository; + + @Resource + BottleCertRepository bottleCertRepository; + + @Resource + private LogOperation logOperation; + + @ResponseBody + @RequestMapping(value = "carList", method = RequestMethod.GET) + infrastructure.support.records.Pagination getCars(CngCdCar vo, Context context, Integer dict, Integer dept, Integer area_dict, infrastructure.support.records.Pagination pagination) { + PermissionFilter permissionFilter = cngUserRepository.permissionFilter(context.getDepartment(), context.getDistrict()); + if (context.getUser().getUsername().equals("cngpublic")) { + pagination.setRows(carStrategy.publicUserCarInfo(vo.getPlatenum(), vo.getVin())); + } else { + pagination.setRows(carStrategy.getCngCdCar(vo, permissionFilter, pagination, dict, dept, area_dict)); + } + return pagination; + } + + @ResponseBody + @RequestMapping(value = "cngTypeDict", method = RequestMethod.GET) + List getCngTypeDicts(Context context) { + List list; + boolean cancel = false; + if (context.getDepartment().getDeptType() != null) { + if (context.getDepartment().getDeptType().getId() == 24) {//交委 + cancel = true; + } + } + if (cancel) { + list = carStrategy.getCancelList(); + } else { + list = repository.getAll(CngTypeDict.class, Order.asc("id")); + } + return list; + } + + @ResponseBody + @RequestMapping(value = "regDept", method = RequestMethod.GET) + List getRegDepts() { + Integer types[] = new Integer[]{17, 22}; + List list = authorityDepartmentRepository.findByDeptTypes(types); + return list; + } + + @ResponseBody + @RequestMapping(value = "areaDict", method = RequestMethod.GET) + List getAreaDicts() { // List list = repository.getAll(AreaDict.class, Order.asc("id")); - List list = areaRepository.getAll(); - return list; - } - - @ResponseBody - @RequestMapping(value = "bottles", method = RequestMethod.GET) - List getBottles(Integer carId) { - List list = new ArrayList(); - if(null != carId){ - list = bottleRepository.getBottleByCarId(carId); - } - return list; - } - - @ResponseBody - @RequestMapping(value = "getCarById", method = RequestMethod.GET) - CngCdCar getCar(Integer id) { - CngCdCar car = repository.get(CngCdCar.class, id); - return car; - } - - @ResponseBody - @RequestMapping(value = "carState", method = RequestMethod.PUT) - void updateCarState(Integer id, Context context) { - BottleCert bottleCert = bottleCertRepository.getUseing(id); - if(bottleCert == null) { - throw new AppException("该车辆没有正在使用的气瓶使用登记证,请先绑定!"); - } else { - CngCdCar car = repository.get(CngCdCar.class, id); - car.setCarState(4); - repository.save(car); - logOperation.saveCngcdCarLog(car, context.getUser().getUsername(), Operations.UPDATE, "气瓶使用登记证绑定模块中,修改车辆状态为已绑定气瓶使用登记证"); - } - } + List list = areaRepository.getAll(); + return list; + } + + @ResponseBody + @RequestMapping(value = "bottles", method = RequestMethod.GET) + List getBottles(Integer carId) { + List list = new ArrayList(); + if (null != carId) { + list = bottleRepository.getBottleByCarId(carId); + } + return list; + } + + @ResponseBody + @RequestMapping(value = "getCarById", method = RequestMethod.GET) + CngCdCar getCar(Integer id) { + CngCdCar car = repository.get(CngCdCar.class, id); + return car; + } + + @ResponseBody + @RequestMapping(value = "carState", method = RequestMethod.PUT) + void updateCarState(Integer id, Context context) { + BottleCert bottleCert = bottleCertRepository.getUseing(id); + if (bottleCert == null) { + throw new AppException("该车辆没有正在使用的气瓶使用登记证,请先绑定!"); + } else { + CngCdCar car = repository.get(CngCdCar.class, id); + car.setCarState(4); + repository.save(car); + logOperation.saveCngcdCarLog(car, context.getUser().getUsername(), Operations.UPDATE, "气瓶使用登记证绑定模块中,修改车辆状态为已绑定气瓶使用登记证"); + } + } } diff --git a/src/main/java/com/ciotea/cdcng/front/application/specialInspection/checkmanage/BindBottleController.java b/src/main/java/com/ciotea/cdcng/front/application/specialInspection/checkmanage/BindBottleController.java index 1d6be11..e80f744 100644 --- a/src/main/java/com/ciotea/cdcng/front/application/specialInspection/checkmanage/BindBottleController.java +++ b/src/main/java/com/ciotea/cdcng/front/application/specialInspection/checkmanage/BindBottleController.java @@ -224,7 +224,7 @@ public class BindBottleController { isLetterTo = true; } } - // 将号段按字母拆开后再组合 + // TODO 截取气瓶使用登记证编号 将号段按字母拆开后再组合 String[] str = range.getRangeFrom().split(range.getRangeFrom().substring(numberFrom, numberFrom + 1)); String strFrom = ""; for(int k = 0; k < str.length; k++){ diff --git a/src/main/java/com/ciotea/cdcng/front/application/specialInspection/checkmanage/ChecklogController.java b/src/main/java/com/ciotea/cdcng/front/application/specialInspection/checkmanage/ChecklogController.java index 058d6de..9088d36 100644 --- a/src/main/java/com/ciotea/cdcng/front/application/specialInspection/checkmanage/ChecklogController.java +++ b/src/main/java/com/ciotea/cdcng/front/application/specialInspection/checkmanage/ChecklogController.java @@ -57,9 +57,8 @@ import infrastructure.support.utils.StringUtil; /** * 定检管理 - * - * @author fuxj * + * @author fuxj */ @Controller @RequestMapping(value = "checklog") @@ -88,31 +87,30 @@ public class ChecklogController { @Resource BottgropfcService bottgropfcService; - + @Resource AuthorityDepartmentRepository deptRepository; - + @Resource BottleCertRepository bottleCertRepository; @Resource AuthorityDepartmentRepository authorityDepartmentRepository; - + @Resource RfidtagsendRepository rfidtagsendRepository; - + @Resource private LogOperation logOperation; - + private static final String CHECKER_SELECTED = "checkerSelected"; private static final String VERIFIER_SELECTED = "verifierSelected"; private static final String APPROVER_SELECTED = "approverSelected"; - - + + /** - * * 获取列表 - * + * * @param platenum * @param vin * @param workingTypeDict @@ -125,30 +123,28 @@ public class ChecklogController { @ResponseBody @RequestMapping(value = "bottlecert", method = RequestMethod.GET) infrastructure.support.records.Pagination getBottleCert(String platenum, String vin, - Integer workingTypeDict, String bottlecode, String owner, - Integer areaDict, infrastructure.support.records.Pagination pagination, Context context) { + Integer workingTypeDict, String bottlecode, String owner, + Integer areaDict, infrastructure.support.records.Pagination pagination, Context context) { // PermissionFilter permissionFilter = cngUserRepository.permissionFilter(context); return pagination.setRows(bottleCertRepository.getBottleCert(platenum, vin, workingTypeDict, bottlecode, owner, areaDict, pagination, null)); } - + /** - * * 根据ID获取气瓶使用登记证 - * + * * @param id * @return */ @ResponseBody @RequestMapping(value = "cert", method = RequestMethod.GET) BottleCert getCarById(Integer id) { - return repository.get(BottleCert.class, id); + return repository.get(BottleCert.class, id); } /** - * * 获取区域 - * + * * @return */ @ResponseBody @@ -159,7 +155,7 @@ public class ChecklogController { /** * 获取使用性质 - * + * * @return */ @ResponseBody @@ -169,9 +165,8 @@ public class ChecklogController { } /** - * * 获取气瓶列表 - * + * * @param platenum * @return */ @@ -183,7 +178,7 @@ public class ChecklogController { /** * 得到所有的车辆类型 - * + * * @return */ @ResponseBody @@ -220,8 +215,8 @@ public class ChecklogController { } /** - * 获取检验,审核,批准人员 - * + * 获取检验员,审核,批准人员 + * * @param context * @return */ @@ -231,25 +226,25 @@ public class ChecklogController { List userlist = new ArrayList(); List postlist = context.getDepartment().getPositions(); - for (Position position : postlist) { - if(position.getCode().equals("jyzzw")) { - Set setuser = position.getUsers(); - Iterator it = setuser.iterator(); - while(it.hasNext()) { - User user = it.next(); - if(!StringUtil.isNullOrBlank(user.getSignature())) { - CngUser cnguser = cngUserRepository.findBySysUserId(user.getId()); - userlist.add(cnguser); - } + for (Position position : postlist) { + if (position.getCode().equals("jyzzw")) { + Set setuser = position.getUsers(); + Iterator it = setuser.iterator(); + while (it.hasNext()) { + User user = it.next(); + if (!StringUtil.isNullOrBlank(user.getSignature())) { + CngUser cnguser = cngUserRepository.findBySysUserId(user.getId()); + userlist.add(cnguser); } } } + } return userlist; } /** * 获取判废标准 - * + * * @return */ @ResponseBody @@ -259,9 +254,8 @@ public class ChecklogController { } /** - * * 定检合格 - * + * * @param nextCheckDate * @param bcodes * @param check @@ -270,15 +264,15 @@ public class ChecklogController { */ @ResponseBody @RequestMapping(value = "passcheck", method = RequestMethod.POST) - CheckLog passCheckLog(String nextCheckDate, String[] bcodes, - CheckLog check, Context context) { - - if(!StringUtil.isNullOrBlank(nextCheckDate)){ - if(!Tool.isDate2(nextCheckDate)){ + Map passCheckLog(String nextCheckDate, String[] bcodes, + CheckLog check, Context context) { + + if (!StringUtil.isNullOrBlank(nextCheckDate)) { + if (!Tool.isDate2(nextCheckDate)) { throw new AppException("请输入正确的日期格式,如2012-01-10"); } } - + Department dment = context.getPosition().getDepartment(); AuthorityDepartment dept = deptRepository.findByMemo(dment.getId()); CngUser user = cngUserRepository.findBySysUserId(context.getUser().getId()); @@ -286,9 +280,8 @@ public class ChecklogController { } /** - * * 定检报废 - * + * * @param bcodescrap * @param scrapmemo * @param check @@ -298,28 +291,30 @@ public class ChecklogController { @ResponseBody @RequestMapping(value = "scarpcheck", method = RequestMethod.POST) CheckLog scrapCheckLog(String[] bcodescraps, String[] scrapmemos, - CheckLog check, Context context) { + CheckLog check, Context context) { Department dment = context.getPosition().getDepartment(); AuthorityDepartment dept = deptRepository.findByMemo(dment.getId()); CngUser user = cngUserRepository.findBySysUserId(context.getUser().getId()); return checklogService.scrapCheckLog(bcodescraps, scrapmemos, check, user, dept); } - int isres=0; + + int isres = 0; + @ResponseBody @RequestMapping(value = "checkcount", method = RequestMethod.GET) Integer getChecklogByCount(Integer carid) { - + List list = checklogRepository.getChecklogByCount(carid); CngCdCar car = repository.get(CngCdCar.class, carid); - if(list.size() > 0) {//表示有未打印数据 + if (list.size() > 0) {//表示有未打印数据 isres = 1;//未打印 - }else{ - if(car!=null){ - if(car.getBottleNum() != null && car.getBottleNum() > 0) { + } else { + if (car != null) { + if (car.getBottleNum() != null && car.getBottleNum() > 0) { isres = 2;//有气瓶 } - if(car.getBottleNum() == null || car.getBottleNum() <= 0){ + if (car.getBottleNum() == null || car.getBottleNum() <= 0) { isres = 3;//没有气瓶 } } @@ -329,7 +324,7 @@ public class ChecklogController { /** * 车辆信息修改 - * + * * @param car * @param context * @return @@ -345,7 +340,7 @@ public class ChecklogController { /** * 得到气瓶类型 - * + * * @return */ @ResponseBody @@ -356,7 +351,7 @@ public class ChecklogController { /** * 得到生产厂家 - * + * * @return */ @ResponseBody @@ -367,7 +362,7 @@ public class ChecklogController { /** * 新增气瓶信息 - * + * * @param bott * @param context * @return @@ -383,7 +378,7 @@ public class ChecklogController { /** * 修改气瓶信息 - * + * * @param bott * @param context * @return @@ -398,11 +393,11 @@ public class ChecklogController { bottle.setDateJoined(tempBottle.getDateJoined()); return checklogService.updateBottle(bottle, user, dept); } - - + + /** * 删除气瓶 - * + * * @param bott * @param context * @return @@ -411,19 +406,19 @@ public class ChecklogController { @RequestMapping(value = "bottle", method = RequestMethod.DELETE) void delBottle(Bottle bottle, Context context) { List list = bottleRepository.findBottleByCode(bottle.getBottCode()); - if(list != null && list.size() > 0) { + if (list != null && list.size() > 0) { Bottle temp = list.get(0); - if(temp.getBottState() != 1) { + if (temp.getBottState() != 1) { throw new AppException("该气瓶还有标签,请注销/报废后重试"); } else { CngCdCar car = repository.get(CngCdCar.class, temp.getCar().getId()); - if(car == null) { + if (car == null) { throw new AppException("没有找到所属车辆信息"); } else { Department sysdept = context.getPosition().getDepartment(); AuthorityDepartment dept = deptRepository.findByMemo(sysdept.getId()); CngUser user = cngUserRepository.findBySysUserId(context.getUser().getId()); - + temp.setRowState(2); temp.setTouchDeptId(dept.getId()); temp.setTouchUserId(user.getId()); @@ -438,8 +433,8 @@ public class ChecklogController { } /** - * * 定检结果打印列表 + * * @param platenum * @param checkcode * @param starttime @@ -452,21 +447,22 @@ public class ChecklogController { @ResponseBody @RequestMapping(value = "checklogs", method = RequestMethod.GET) infrastructure.support.records.Pagination getChecklog(CheckLogView logview, String starttime, - String endtime, infrastructure.support.records.Pagination pagination, Context context) { + String endtime, infrastructure.support.records.Pagination pagination, Context context) { // PermissionFilter permission = cngUserRepository.permissionFilter(context); return pagination.setRows(checklogRepository.getChecklog(logview, starttime, endtime, pagination, null)); } - + @ResponseBody @RequestMapping(value = "eualifed", method = RequestMethod.GET) List getEualifieddict() { return checklogRepository.getEualifieddict(); } - + /** * 当前登录用户单位编号 + * * @param context - * @return + * @return5 */ @ResponseBody @RequestMapping(value = "deptcode", method = RequestMethod.GET) @@ -474,11 +470,10 @@ public class ChecklogController { Department dment = context.getPosition().getDepartment(); return deptRepository.findByMemo(dment.getId()); } - + /** - * * 根据定检编号获取对象 - * + * * @param checkCode * @return */ @@ -487,7 +482,7 @@ public class ChecklogController { Map getCheckLogByCode(Integer checkid) { return checklogRepository.getBottCert(checkid); } - + @ResponseBody @RequestMapping(value = "printlog", method = RequestMethod.PUT) boolean printChecklog(Integer checkid, Context context) { @@ -496,31 +491,31 @@ public class ChecklogController { CngUser user = cngUserRepository.findBySysUserId(context.getUser().getId()); return checklogService.printChecklog(checkid, dept, user); } - + @ResponseBody @RequestMapping(value = "checkklogid", method = RequestMethod.GET) CheckLog findCheckLogById(Integer id) { return checklogRepository.findCheckLogById(id); } - + @ResponseBody @RequestMapping(value = "history", method = RequestMethod.GET) List getHistory(Integer bottleId) { List bott = new ArrayList(); - if(bottleId!=null && bottleId>0){ + if (bottleId != null && bottleId > 0) { bott = checklogRepository.getHistory(bottleId); } return bott; } - + @ResponseBody @RequestMapping(value = "updateRowState", method = RequestMethod.PUT) - CheckLog updateRowState(Integer id,Context context){ - String userId= context.getPosition().getDepartment().getId(); + CheckLog updateRowState(Integer id, Context context) { + String userId = context.getPosition().getDepartment().getId(); AuthorityDepartment regDept = authorityDepartmentRepository.findByMemo(userId); String myuserId = context.getUser().getId(); - CngUser regUser= authorityDepartmentRepository.findByUser(myuserId); - CheckLog log = repository.get(CheckLog.class, id); + CngUser regUser = authorityDepartmentRepository.findByUser(myuserId); + CheckLog log = repository.get(CheckLog.class, id); log.setRowState(2); log.setDateUpdate(new Date()); log.setTouchDeptId(regDept.getId()); @@ -529,31 +524,31 @@ public class ChecklogController { logOperation.saveCngcdCheckLog(checkLog, regUser.getUsername(), Operations.DELETE, ""); return checkLog; } - + @ResponseBody @RequestMapping(value = "editSelectedUser", method = RequestMethod.PUT) void editChecker(Integer userId, String selectedName, Context context) { List postlist = context.getDepartment().getPositions(); List userList = new ArrayList(); - for (Position position : postlist) { - Set setuser = position.getUsers(); - Iterator it = setuser.iterator(); - while(it.hasNext()) { - User user = it.next(); - if(!StringUtil.isNullOrBlank(user.getSignature())) { - CngUser cnguser = cngUserRepository.findBySysUserId(user.getId()); - if(!StringUtil.isNullOrBlank(cnguser.getEmail()) && cnguser.getEmail().equals(selectedName)){ - cnguser.setEmail(""); - } - userList.add(cnguser); + for (Position position : postlist) { + Set setuser = position.getUsers(); + Iterator it = setuser.iterator(); + while (it.hasNext()) { + User user = it.next(); + if (!StringUtil.isNullOrBlank(user.getSignature())) { + CngUser cnguser = cngUserRepository.findBySysUserId(user.getId()); + if (!StringUtil.isNullOrBlank(cnguser.getEmail()) && cnguser.getEmail().equals(selectedName)) { + cnguser.setEmail(""); } + userList.add(cnguser); } } - - CngUser editBean = repository.get(CngUser.class,userId); + } + + CngUser editBean = repository.get(CngUser.class, userId); editBean.setEmail(selectedName); repository.save(editBean); } - - + + } diff --git a/src/main/java/com/ciotea/cdcng/front/application/specialInspection/checkmanage/PrintBottcertController.java b/src/main/java/com/ciotea/cdcng/front/application/specialInspection/checkmanage/PrintBottcertController.java index 25b03d3..750861f 100644 --- a/src/main/java/com/ciotea/cdcng/front/application/specialInspection/checkmanage/PrintBottcertController.java +++ b/src/main/java/com/ciotea/cdcng/front/application/specialInspection/checkmanage/PrintBottcertController.java @@ -77,7 +77,6 @@ public class PrintBottcertController { /** * 根据车牌号 查询气瓶详情 - * @param id * @return */ @ResponseBody//printBottcert/getBottleByPlatenum @@ -100,7 +99,6 @@ public class PrintBottcertController { } /** * 打印气瓶使用登记证 - * @param bean * @param context * @return */ @@ -153,7 +151,6 @@ public class PrintBottcertController { /** * 注销气瓶使用登记证 - * @param bean * @param context * @return */ diff --git a/src/main/java/com/ciotea/cdcng/front/application/system/SystemController.java b/src/main/java/com/ciotea/cdcng/front/application/system/SystemController.java index 346f7ba..83c4798 100644 --- a/src/main/java/com/ciotea/cdcng/front/application/system/SystemController.java +++ b/src/main/java/com/ciotea/cdcng/front/application/system/SystemController.java @@ -31,6 +31,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import com.ciotea.cdcng.front.domain.chart.carUseChart.repository.CarUseRepository; @@ -67,40 +68,40 @@ public class SystemController { @Resource UserService userService; - + @Resource ModuleService moduleService; - + @Resource MessageRepository messageRepository; @Resource AuthorityDepartmentRepository authorityDepartmentRepository; - + @Resource MessageService messageService; - + @Resource CarUseRepository carUseRepository; - + @Resource CarUseService carUseService; - + @Resource CngUserRepository cngUserRepository; - + @Resource Repository commonRepository; - + @Resource ResetRepository resetRepository; - + @Resource CarTypeDictRepository carTypeDictRepository; @Resource OpeningTimeRepo openingTimeRepo; - + @ResponseBody @RequestMapping(value = "user", method = RequestMethod.GET) User getUser(Context ctx) { @@ -109,15 +110,13 @@ public class SystemController { /** * 单点登录方人员信息 - * @param jsonObject + * @param * @return */ @ResponseBody - @RequestMapping(value = "/point/getUser", method = RequestMethod.POST) - public PointUserInfo getUserPointInfo(JSONObject jsonObject){ - System.out.println("俺来了Controller"); - System.out.println(jsonObject.getString("code")); - return userService.getUserPointInfo(jsonObject); + @RequestMapping(value = "/point/getUser", method = RequestMethod.GET) + public PointUserInfo getUserPointInfo(@RequestParam("code") String code){ + return userService.getUserPointInfo(code); } @ResponseBody @@ -125,25 +124,25 @@ public class SystemController { Department getDept(Context ctx) { return ctx.getDepartment(); } - + @ResponseBody @RequestMapping(value = "user/organization", method = RequestMethod.GET) Organization getUserOrganization(Context ctx) { return ctx.getOrganization(); } - + @ResponseBody @RequestMapping(value = "user/password", method = RequestMethod.PUT) void putPassword(PasswordUpdate passwordUpdate, Context ctx) { userService.updatePassword(ctx.getUser().getId(), passwordUpdate); } - + @ResponseBody @RequestMapping(value = "moduleGroups", method = RequestMethod.GET) List getModuleGroups() { return repository.getAll(ModuleGroup.class, Order.asc("order")); } - + @ResponseBody @RequestMapping(value = "checkNewMsg", method = RequestMethod.GET) Integer checkNewMsg(Context context) { @@ -157,7 +156,7 @@ public class SystemController { } return list.size(); } - + @ResponseBody @RequestMapping(value = "checkNewFile", method = RequestMethod.GET) Integer checkNewFile(Context context) { @@ -181,13 +180,13 @@ public class SystemController { } return new AuthorityDepartment(); } - + @Resource ResponseBodyCacheManager responseBodyCacheManager; - + private PermissionFilter fiter = null; - - + + @PostConstruct private void init() { new Timer(true).schedule(new TimerTask() { @@ -209,7 +208,7 @@ public class SystemController { List getModulesInGroup(String moduleGroupId, Context ctx) { return moduleService.getModulesInGroupOfUser(moduleGroupId, ctx.getUser().getId()); } - + @ResponseBody @RequestMapping(value = "userType", method = RequestMethod.GET) Map getUserType(Context context){ @@ -221,7 +220,7 @@ public class SystemController { } return map; } - + //车辆在用情况统计 @ResponseBody @RequestMapping(value = "carUseChart", method = RequestMethod.GET) @@ -244,7 +243,7 @@ public class SystemController { carList.get(carList.size()-1).setSum(sum); return carList; } - + @ResponseBody @RequestMapping(value = "carUseAreaChart", method = RequestMethod.GET) List> getCarUseAreaChart(PermissionFilter permissionFilter,Context context){ @@ -258,7 +257,7 @@ public class SystemController { } return carUseService.getCarUseAreaChart(permissionFilter); } - + //导出[质监局-气瓶使用登记证发放统计]的电子表格 @ResponseBody @RequestMapping(value = "exportCaruseExcelForQuality", method = RequestMethod.GET) @@ -307,8 +306,8 @@ public class SystemController { bytes.length, new Date())); ServletUtil.respondBytes(res, bytes); } - -// @ResponseBody + + // @ResponseBody // @RequestMapping(value = "getDeptName", method = RequestMethod.GET) // Integer getDeptName(Context context){ // Department dept = context.getDepartment(); @@ -323,8 +322,8 @@ public class SystemController { ResetVo vo = resetRepository.isReset(user.getId()); return vo; } - - + + @ResponseBody @RequestMapping(value = "refitinquiryDept", method = RequestMethod.GET) List getRegDepts() { @@ -332,21 +331,21 @@ public class SystemController { List list = authorityDepartmentRepository.findByDeptTypes(types); return list; } - + @ResponseBody @RequestMapping(value="selectCngTypeDictAll" , method= RequestMethod.GET) List selectcngAll(){ return carTypeDictRepository.selectCngTypeDict(); } - - + + @ResponseBody @RequestMapping(value="getAreas", method = RequestMethod.GET) List getAllArea(){ return carTypeDictRepository.selectAreaDict(); } - - + + @ResponseBody @RequestMapping(value = "getPermissionFilter", method = RequestMethod.GET) PermissionFilter getPermissionFilter(Context context) { @@ -365,7 +364,7 @@ public class SystemController { // } return permissionFilter; } - + @ResponseBody @RequestMapping(value = "openingLongin", method = RequestMethod.GET) public int openingLongin() throws ParseException{ diff --git a/src/main/java/com/ciotea/cdcng/front/domain/carPremises/makeQRCode/service/MakeQRCodeServiceImpl.java b/src/main/java/com/ciotea/cdcng/front/domain/carPremises/makeQRCode/service/MakeQRCodeServiceImpl.java index 6809b3d..4498522 100644 --- a/src/main/java/com/ciotea/cdcng/front/domain/carPremises/makeQRCode/service/MakeQRCodeServiceImpl.java +++ b/src/main/java/com/ciotea/cdcng/front/domain/carPremises/makeQRCode/service/MakeQRCodeServiceImpl.java @@ -66,7 +66,7 @@ public class MakeQRCodeServiceImpl implements MakeQRCodeService { v.forProperty("carModel").notBlank().maxLength(100); v.forProperty("carWeight").notBlank().maxLength(5).isNum(); v.forProperty("bottCode").notBlank().maxLength(20); - v.forProperty("capacity").notBlank().maxLength(5).isNum().isInRange(0, 500.0); + v.forProperty("capacity").notBlank().maxLength(5).isNum().isInRange(0, 2000.0); v.forProperty("registDate").notBlank(); v.forProperty("weight").notBlank().maxLength(5).isNum(); v.check(); @@ -95,7 +95,7 @@ public class MakeQRCodeServiceImpl implements MakeQRCodeService { v.forProperty("carModel").notBlank().maxLength(40); v.forProperty("carWeight").notBlank().maxLength(5).isNum(); v.forProperty("bottCode").notBlank().maxLength(20); - v.forProperty("capacity").notBlank().maxLength(5).isNum().isInRange(0, 500.0); + v.forProperty("capacity").notBlank().maxLength(5).isNum().isInRange(0, 2000.0); v.forProperty("registDate").notBlank(); v.forProperty("weight").notBlank().maxLength(5).isNum(); v.check(); diff --git a/src/main/java/com/ciotea/cdcng/front/domain/entity/system/User.java b/src/main/java/com/ciotea/cdcng/front/domain/entity/system/User.java index 8f51b7f..346a31e 100644 --- a/src/main/java/com/ciotea/cdcng/front/domain/entity/system/User.java +++ b/src/main/java/com/ciotea/cdcng/front/domain/entity/system/User.java @@ -62,6 +62,12 @@ public class User implements Serializable { @Enumerated(EnumType.STRING) private YesNo isLocked; + /** + * 登录失败次数 + */ + @Column(name = "count") + private Integer count; + @Column(name = "_DELETED") private String isDeleted; @@ -92,11 +98,7 @@ public class User implements Serializable { @Column(name = "_PASSWORD_UPDATE_TIME") private Date updataTime; - /** - * 登录失败次数 - */ - @Column(name = "count") - private Integer count; + @ManyToOne @JoinColumn(name = "_LOGIN_POSITION_ID") @@ -258,6 +260,7 @@ public class User implements Serializable { public void setTel(String tel) { this.tel = tel; } - + + } diff --git a/src/main/java/com/ciotea/cdcng/front/domain/refittingFactory/bottle/repository/AirBottleRepositoryImpl.java b/src/main/java/com/ciotea/cdcng/front/domain/refittingFactory/bottle/repository/AirBottleRepositoryImpl.java index 57ebc23..26c4c74 100644 --- a/src/main/java/com/ciotea/cdcng/front/domain/refittingFactory/bottle/repository/AirBottleRepositoryImpl.java +++ b/src/main/java/com/ciotea/cdcng/front/domain/refittingFactory/bottle/repository/AirBottleRepositoryImpl.java @@ -71,7 +71,8 @@ public class AirBottleRepositoryImpl implements AirBottleRepository{ param.put("permissionFilter", permissionFilter); param.put("plateNum", bean.getPlatenum()); param.put("vin", bean.getVin()); - + param.put("refitState", bean.getRefitState()); + return sqlSessionYunsa.selectList(NS + "selectBottleByMybatis", param, pagination); } diff --git a/src/main/java/com/ciotea/cdcng/front/domain/refittingFactory/bottle/service/AirBottleServiceImpl.java b/src/main/java/com/ciotea/cdcng/front/domain/refittingFactory/bottle/service/AirBottleServiceImpl.java index 785528c..1e170ae 100644 --- a/src/main/java/com/ciotea/cdcng/front/domain/refittingFactory/bottle/service/AirBottleServiceImpl.java +++ b/src/main/java/com/ciotea/cdcng/front/domain/refittingFactory/bottle/service/AirBottleServiceImpl.java @@ -66,7 +66,7 @@ public class AirBottleServiceImpl implements AirBottleService{ v.forProperty("installDate").notBlank().isDate().custom(bean.getInstallDate().compareTo(bean.getMadeDate())>0, "安装日期必须大于生产日期!");//安装日期 v.forProperty("validYear").maxLength(5).isNum();//使用年限 v.forProperty("bottModel").hasNoChineseWord().maxLength(30);//气瓶型号 - v.forProperty("capacity").notBlank().isNum().isInRange(0, 500.0).length(1, 5).hasNoChineseWord();//气瓶容积 + v.forProperty("capacity").notBlank().isNum().isInRange(0, 2000.0).length(1, 5).hasNoChineseWord();//气瓶容积 v.check(); if("".equals(bean.getRatedFillCount())){ bean.setRatedFillCount(null); @@ -100,7 +100,7 @@ public class AirBottleServiceImpl implements AirBottleService{ v.forProperty("installDate").notBlank().isDate().custom(bean.getInstallDate().compareTo(bean.getMadeDate())>0, "安装日期必须大于生产日期!");//安装日期 v.forProperty("validYear").maxLength(5).isNum(); // 使用年限 v.forProperty("bottModel").hasNoChineseWord().maxLength(30); // 气瓶型号 - v.forProperty("capacity").notBlank().isNum().isInRange(0, 500.0).length(1, 5).hasNoChineseWord(); // 气瓶容积 + v.forProperty("capacity").notBlank().isNum().isInRange(0, 2000.0).length(1, 5).hasNoChineseWord(); // 气瓶容积 v.check(); if("".equals(bean.getRatedFillCount())){ bean.setRatedFillCount(null); diff --git a/src/main/java/com/ciotea/cdcng/front/domain/refittingFactory/refittingCar/entity/CngCdCar.java b/src/main/java/com/ciotea/cdcng/front/domain/refittingFactory/refittingCar/entity/CngCdCar.java index 06bde12..d92f14e 100644 --- a/src/main/java/com/ciotea/cdcng/front/domain/refittingFactory/refittingCar/entity/CngCdCar.java +++ b/src/main/java/com/ciotea/cdcng/front/domain/refittingFactory/refittingCar/entity/CngCdCar.java @@ -80,7 +80,7 @@ public class CngCdCar implements Serializable { @Column(name = "engineid") private String engineid; /** - * + * 0 改装 1原装 2过户 */ @Column(name = "isorig") private String isorig; diff --git a/src/main/java/com/ciotea/cdcng/front/domain/refittingFactory/refittingCar/repository/CngCdCarStrategyImpl.java b/src/main/java/com/ciotea/cdcng/front/domain/refittingFactory/refittingCar/repository/CngCdCarStrategyImpl.java index 0cc9af8..0a6a276 100644 --- a/src/main/java/com/ciotea/cdcng/front/domain/refittingFactory/refittingCar/repository/CngCdCarStrategyImpl.java +++ b/src/main/java/com/ciotea/cdcng/front/domain/refittingFactory/refittingCar/repository/CngCdCarStrategyImpl.java @@ -30,121 +30,121 @@ import infrastructure.support.records.Pagination; @Repository public class CngCdCarStrategyImpl implements CngCdCarStrategy { - - private static final String NS = "com.ciotea.cdcng.front.domain.refittingFactory.refittingCar.repository.CngCdCarStrategy."; - private static final String SS = "com.ciotea.cdcng.front.domain.specialInspection.checkquery.repository.SetupCheckRepository."; - - - @Resource - Dao dao; - - @Resource - CngUserRepository cngUserRepository; - - @Resource - SqlSessionTemplate sqlSessionYunsa; - - /** - * 根据条件查询 - */ - @Override - public List getCngCdCarPlatenum(final PermissionFilter permissionFilter, final CngCdCar bean, Pagination pagination) { - final Integer[] refStatus = new Integer[] { 0, 1 }; - return dao.list(new Query(CngCdCar.class, pagination) { - { - // add(in("regDept.deptType.id", list)); + + private static final String NS = "com.ciotea.cdcng.front.domain.refittingFactory.refittingCar.repository.CngCdCarStrategy."; + private static final String SS = "com.ciotea.cdcng.front.domain.specialInspection.checkquery.repository.SetupCheckRepository."; + + + @Resource + Dao dao; + + @Resource + CngUserRepository cngUserRepository; + + @Resource + SqlSessionTemplate sqlSessionYunsa; + + /** + * 根据条件查询 + */ + @Override + public List getCngCdCarPlatenum(final PermissionFilter permissionFilter, final CngCdCar bean, Pagination pagination) { + final Integer[] refStatus = new Integer[]{0, 1}; + return dao.list(new Query(CngCdCar.class, pagination) { + { + // add(in("regDept.deptType.id", list)); // if (null != bean.getRegDept()) // add(eq("regDept.id", bean.getRegDept().getId())); - if(permissionFilter.getFilterType()==1){ - add(in("regDept.id", permissionFilter.getList())); - } - if(permissionFilter.getFilterType()==2){ - add(in("areaDict.id", permissionFilter.getList())); - } - add(or(like("platenum", bean.getPlatenum()))); - add(or(like("vin", bean.getVin()))); - add(eq("id", bean.getId())); - add(eq("rowState", bean.getRowState())); - if (bean.getRefitState() != null) { - if (bean.getRefitState() == 1) { - add(in("refitState", refStatus)); - } else { - add(eq("refitState", bean.getRefitState())); - } - } - add(Order.desc("dateUpdate")); - } - }); - } - - @Override - public List getCngCdCarPlatenumMybatis(PermissionFilter permissionFilter, CngCdCar bean, Pagination pagination) { - Map param = new HashMap<>(); - param.put("permissionFilter", permissionFilter); - param.put("plateNum", bean.getPlatenum().trim()); - param.put("vin", bean.getVin().trim()); - param.put("refitState", bean.getRefitState()); - - return sqlSessionYunsa.selectList(NS + "getCngCdCarPlatenumMybatis", param, pagination); - } - - /** - * 分页查询所有 - */ - @Override - public List getCngCdCarAll(Pagination pagination) { - - return dao.list(new Query(CngCdCar.class, pagination)); - } - - /** - * 查询所有 - */ - @Override - public List selcetCngCdCarAll() { - return dao.list(new Query(CngCdCar.class) { - { - add(eq("rowState", 1)); - add(Order.asc("id")); - } - }); - } - - @Override - public List getBottleAll(final Integer carId, Pagination pagination) { - return dao.list(new Query(Bottle.class, pagination) { - { - add(eq("rowState", 1)); - add(eq("car.id", carId)); - add(Order.desc("dateUpdate")); - } - }); - } - - @Override - public List getBottleAllMybatis(final Integer carId, Pagination pagination) { - Map param = new HashMap<>(); - param.put("carId", carId); - return sqlSessionYunsa.selectList(NS + "getBottleAll", param, pagination); - } - - @Override - public List getCngCdCar(CngCdCar bean, - PermissionFilter permissionFilter, - infrastructure.support.records.Pagination pagination, - Integer cngTypeDict, Integer regDept, Integer areaDict) { - - Map param = new HashMap<>(); - param.put("permissionFilter", permissionFilter); - param.put("rowState", "1"); - param.put("plateNum", bean.getPlatenum()/*.trim()*/); - param.put("vin", bean.getVin()/*.trim()*/); - param.put("cngTypeId", cngTypeDict); - param.put("regDeptId", regDept); - param.put("areaId", areaDict); - param.put("isorigId", bean.getIsorig()); - return sqlSessionYunsa.selectList(NS + "getCngCdCar", param, pagination); - } + if (permissionFilter.getFilterType() == 1) { + add(in("regDept.id", permissionFilter.getList())); + } + if (permissionFilter.getFilterType() == 2) { + add(in("areaDict.id", permissionFilter.getList())); + } + add(or(like("platenum", bean.getPlatenum()))); + add(or(like("vin", bean.getVin()))); + add(eq("id", bean.getId())); + add(eq("rowState", bean.getRowState())); + if (bean.getRefitState() != null) { + if (bean.getRefitState() == 1) { + add(in("refitState", refStatus)); + } else { + add(eq("refitState", bean.getRefitState())); + } + } + add(Order.desc("dateUpdate")); + } + }); + } + + @Override + public List getCngCdCarPlatenumMybatis(PermissionFilter permissionFilter, CngCdCar bean, Pagination pagination) { + Map param = new HashMap<>(); + param.put("permissionFilter", permissionFilter); + param.put("plateNum", bean.getPlatenum().trim()); + param.put("vin", bean.getVin().trim()); + param.put("refitState", bean.getRefitState()); + + return sqlSessionYunsa.selectList(NS + "getCngCdCarPlatenumMybatis", param, pagination); + } + + /** + * 分页查询所有 + */ + @Override + public List getCngCdCarAll(Pagination pagination) { + + return dao.list(new Query(CngCdCar.class, pagination)); + } + + /** + * 查询所有 + */ + @Override + public List selcetCngCdCarAll() { + return dao.list(new Query(CngCdCar.class) { + { + add(eq("rowState", 1)); + add(Order.asc("id")); + } + }); + } + + @Override + public List getBottleAll(final Integer carId, Pagination pagination) { + return dao.list(new Query(Bottle.class, pagination) { + { + add(eq("rowState", 1)); + add(eq("car.id", carId)); + add(Order.desc("dateUpdate")); + } + }); + } + + @Override + public List getBottleAllMybatis(final Integer carId, Pagination pagination) { + Map param = new HashMap<>(); + param.put("carId", carId); + return sqlSessionYunsa.selectList(NS + "getBottleAll", param, pagination); + } + + @Override + public List getCngCdCar(CngCdCar bean, + PermissionFilter permissionFilter, + infrastructure.support.records.Pagination pagination, + Integer cngTypeDict, Integer regDept, Integer areaDict) { + + Map param = new HashMap<>(); + param.put("permissionFilter", permissionFilter); + param.put("rowState", "1"); + param.put("plateNum", bean.getPlatenum()); + param.put("vin", bean.getVin()); + param.put("cngTypeId", cngTypeDict); + param.put("regDeptId", regDept); + param.put("areaId", areaDict); + param.put("isorigId", bean.getIsorig()); + return sqlSessionYunsa.selectList(NS + "getCngCdCar", param, pagination); + } // @Override // public List getCngCdCar(final CngCdCar bean, final PermissionFilter permissionFilter, Pagination pagination, final Integer cngTypeDict, final Integer regDept, final Integer areaDict) { @@ -169,133 +169,129 @@ public class CngCdCarStrategyImpl implements CngCdCarStrategy { // }); // } - @Override - public CngCdCar findByVin(final String vin) { - return StringUtil.isNullOrEmpty(vin) ? null : dao.single(new Query(CngCdCar.class) { - { - add(eq("vin", vin)); - } - }); - } - - @Override - public List getRefitIssuance(CngCdCar bean, final List list, Pagination pagination, final String platenum, final Integer search_ref, final Integer search_refstatus) { - final Integer[] refStatus = new Integer[] { 2, 3, 4, 5, 6 }; - return dao.list(new Query(CngCdCar.class, pagination) { - { - add(in("regDept.deptType.id", list)); - add(in("refitState", refStatus)); - add(eq("rowState", 1)); - add(eq("carState", 2)); - - add(like("platenum", platenum)); - add(eq("regDept.id", search_ref)); - add(eq("refitState", search_refstatus)); - - add(Order.desc("dateUpdate")); - } - }); - } - - - - - - @Override - public List getAeratedAttributes(final CngCdCar bean, final PermissionFilter permissionFilter, infrastructure.support.records.Pagination pagination) { - Map param = new HashMap<>(); - param.put("permissionFilter", permissionFilter); - param.put("rowState", "1"); - param.put("plateNum", bean.getPlatenum().trim()); - param.put("vin", bean.getVin().trim()); - return sqlSessionYunsa.selectList(NS + "getAeratedAttributes", param, pagination); - } - - @Override - public List getAeratedAttributesBackup(final CngCdCar bean, final PermissionFilter permissionFilter, Pagination pagination) { - final Integer carState[] = {4,5}; - return dao.list(new Query(CngCdCar.class, pagination) { - { - if(permissionFilter.getFilterType()==1){ - add(in("regDept.id", permissionFilter.getList())); - } - if(permissionFilter.getFilterType()==2){ - add(in("areaDict.id", permissionFilter.getList())); - } - //TODO - add(eq("carState",bean.getCarState())); - add(eq("rowState", 1)); - // add(eq("isorig","0")); - // add(eq("registeType","1")); - add(or(in("carState",carState),eq("refitState",7))); - - add(like("platenum", bean.getPlatenum())); - add(like("vin", bean.getVin())); - - add(Order.desc("dateUpdate")); - } - }); - } - - /** - * 特检院新增查询条件过滤 - */ - @Override - public List getSpecialAddCar(final CngCdCar bean,final PermissionFilter permissionFilter,Pagination pagination,final Context context) { - - return dao.list(new Query(CngCdCar.class, pagination) { - - { - - //根据部门 + @Override + public CngCdCar findByVin(final String vin) { + return StringUtil.isNullOrEmpty(vin) ? null : dao.single(new Query(CngCdCar.class) { + { + add(eq("vin", vin)); + } + }); + } + + @Override + public List getRefitIssuance(CngCdCar bean, final List list, Pagination pagination, final String platenum, final Integer search_ref, final Integer search_refstatus) { + final Integer[] refStatus = new Integer[]{2, 3, 4, 5, 6}; + return dao.list(new Query(CngCdCar.class, pagination) { + { + add(in("regDept.deptType.id", list)); + add(in("refitState", refStatus)); + add(eq("rowState", 1)); + add(eq("carState", 2)); + + add(like("platenum", platenum)); + add(eq("regDept.id", search_ref)); + add(eq("refitState", search_refstatus)); + + add(Order.desc("dateUpdate")); + } + }); + } + + + @Override + public List getAeratedAttributes(final CngCdCar bean, final PermissionFilter permissionFilter, infrastructure.support.records.Pagination pagination) { + Map param = new HashMap<>(); + param.put("permissionFilter", permissionFilter); + param.put("rowState", "1"); + param.put("plateNum", bean.getPlatenum().trim()); + param.put("vin", bean.getVin().trim()); + return sqlSessionYunsa.selectList(NS + "getAeratedAttributes", param, pagination); + } + + @Override + public List getAeratedAttributesBackup(final CngCdCar bean, final PermissionFilter permissionFilter, Pagination pagination) { + final Integer carState[] = {4, 5}; + return dao.list(new Query(CngCdCar.class, pagination) { + { + if (permissionFilter.getFilterType() == 1) { + add(in("regDept.id", permissionFilter.getList())); + } + if (permissionFilter.getFilterType() == 2) { + add(in("areaDict.id", permissionFilter.getList())); + } + //TODO + add(eq("carState", bean.getCarState())); + add(eq("rowState", 1)); + // add(eq("isorig","0")); + // add(eq("registeType","1")); + add(or(in("carState", carState), eq("refitState", 7))); + + add(like("platenum", bean.getPlatenum())); + add(like("vin", bean.getVin())); + + add(Order.desc("dateUpdate")); + } + }); + } + + /** + * 特检院新增查询条件过滤 + */ + @Override + public List getSpecialAddCar(final CngCdCar bean, final PermissionFilter permissionFilter, Pagination pagination, final Context context) { + + return dao.list(new Query(CngCdCar.class, pagination) { + + { + + //根据部门 // if(permissionFilter.getFilterType()==1){ // add(in("regDept.id",permissionFilter.getList())); // } - add(or(like("platenum", bean.getPlatenum()))); - add(or(like("vin", bean.getVin()))); - add(eq("id", bean.getId())); - add(eq("rowState", 1)); - //过滤车辆状态 - add(in("carState", new Integer[]{1,2,3,6})); - add(Order.desc("dateUpdate")); - - } - - }); - } - - @Override - public List getMaintenances(final CngCdCar bean, final PermissionFilter permissionFilter, Pagination pagination) { - return dao.list(new Query(CngCdCar.class, pagination) { - { + add(or(like("platenum", bean.getPlatenum()))); + add(or(like("vin", bean.getVin()))); + add(eq("id", bean.getId())); + add(eq("rowState", 1)); + //过滤车辆状态 + add(in("carState", new Integer[]{1, 2, 3, 6})); + add(Order.desc("dateUpdate")); + + } + + }); + } + + @Override + public List getMaintenances(final CngCdCar bean, final PermissionFilter permissionFilter, Pagination pagination) { + return dao.list(new Query(CngCdCar.class, pagination) { + { // add(in("regDept.deptType.id", list)); - if(permissionFilter.getFilterType()==1){ - add(in("regDept.id", permissionFilter.getList())); - } - if(permissionFilter.getFilterType()==2){ - add(in("areaDict.id", permissionFilter.getList())); - } - add(eq("rowState", 1)); - add(eq("isorig", "0")); - add(gt("bottleNum",0)); - add(eq("carState", 5)); - add(or(like("platenum", bean.getPlatenum()))); - add(or(like("vin", bean.getVin()))); - add(Order.desc("dateUpdate")); - } - }); - } - - /** - * 特检院绑定气瓶使用登记证查询过滤 - * - */ - @Override - public List getBindCar(final PermissionFilter permissionFilter,final String platenum, Pagination pagination) { - - Map param = new HashMap<>(); - param.put("plateNum", platenum); - return sqlSessionYunsa.selectList(NS + "getBindCar", param, pagination); + if (permissionFilter.getFilterType() == 1) { + add(in("regDept.id", permissionFilter.getList())); + } + if (permissionFilter.getFilterType() == 2) { + add(in("areaDict.id", permissionFilter.getList())); + } + add(eq("rowState", 1)); + add(eq("isorig", "0")); + add(gt("bottleNum", 0)); + add(eq("carState", 5)); + add(or(like("platenum", bean.getPlatenum()))); + add(or(like("vin", bean.getVin()))); + add(Order.desc("dateUpdate")); + } + }); + } + + /** + * 特检院绑定气瓶使用登记证查询过滤 + */ + @Override + public List getBindCar(final PermissionFilter permissionFilter, final String platenum, Pagination pagination) { + + Map param = new HashMap<>(); + param.put("plateNum", platenum); + return sqlSessionYunsa.selectList(NS + "getBindCar", param, pagination); // return dao.list(new Query(CngCdCar.class, pagination) { // // { @@ -321,122 +317,122 @@ public class CngCdCarStrategyImpl implements CngCdCarStrategy { // } // // }); - } - - @Override - public List findByPlateNum(final Integer rowState, final String plateNum) { - return dao.list(new Query(CngCar.class) { - { - add(eq("rowState", rowState)); - add(eq("platenum", plateNum)); - - } - }); - - } - - - @Override - public List findByVin(final Integer rowState,final String vin) { - return dao.list(new Query(CngCar.class){ - { - add(eq("rowState",rowState)); - add(eq("vin",vin)); - - } - }); - } - - - @Override - public List getQualityCngCdCar(final CngCdCar bean, final List list, Pagination pagination, final Integer cngTypeDict, final Integer regDept, final Integer areaDict) { - return dao.list(new Query(CngCdCar.class, pagination) { - { - // add(in("regDept.deptType.id", list)); - if (list.size() > 0) { - add(in("car.areaDict.id", list)); - } - add(eq("rowState", 1)); - - add(or(like("platenum", bean.getPlatenum()))); - add(or(like("vin", bean.getVin()))); - add(or(eq("cngTypeDict.id", cngTypeDict))); - add(or(eq("areaDict.id", areaDict))); - add(or(eq("regDept.id", regDept))); - - add(Order.desc("dateJoined")); - } - }); - } - - @Override - public CngCdCar findById(final Integer id) { - return dao.single(new Query(CngCdCar.class) { - { - add(eq("id", id)); - add(eq("rowState", 1)); - } - }); - } - - @Override - public List findByPlateNumByPcolor(final Integer rowState, final String plateNum,final String pcolor) { - return dao.list(new Query(CngCar.class) { - { - add(eq("rowState", rowState)); - add(eq("platenum", plateNum)); - add(eq("pcolor", pcolor)); - - } - }); - } - - @Override - public List findByPlateNumAndPcolor( final Integer rowState, - final String plateNum,final String pcolor,final Integer id) { - return dao.list(new Query(CngCar.class) { - { - add(eq("rowState", rowState)); - add(eq("platenum", plateNum)); - add(eq("pcolor", pcolor)); - add(ne("id", id)); - } - }); - } - - @Override - public List findByPlateNumUp(final Integer rowState,final String plateNum, - final Integer id) { - return dao.list(new Query(CngCar.class) { - { - add(eq("rowState", rowState)); - add(eq("platenum", plateNum)); - add(ne("id", id)); - } - }); - } - - @Override - public List findByVinUp(final Integer rowState,final String vin,final Integer id) { - return dao.list(new Query(CngCar.class){ - { - add(eq("rowState",rowState)); - add(eq("vin",vin)); - add(ne("id", id)); - add(Order.desc("dateJoined")); - } - }); - } - - @Override - public List getRefitthroughs(String districtId, infrastructure.support.records.Pagination pagination, String platenum, Integer search_ref) { - Map param = new HashMap<>(); - param.put("districtId", districtId); - param.put("rowState", "1"); - param.put("plateNum", platenum); - param.put("deptId", search_ref); - return sqlSessionYunsa.selectList(NS + "getRefitthroughs", param, pagination); - } + } + + @Override + public List findByPlateNum(final Integer rowState, final String plateNum) { + return dao.list(new Query(CngCar.class) { + { + add(eq("rowState", rowState)); + add(eq("platenum", plateNum)); + + } + }); + + } + + + @Override + public List findByVin(final Integer rowState, final String vin) { + return dao.list(new Query(CngCar.class) { + { + add(eq("rowState", rowState)); + add(eq("vin", vin)); + + } + }); + } + + + @Override + public List getQualityCngCdCar(final CngCdCar bean, final List list, Pagination pagination, final Integer cngTypeDict, final Integer regDept, final Integer areaDict) { + return dao.list(new Query(CngCdCar.class, pagination) { + { + // add(in("regDept.deptType.id", list)); + if (list.size() > 0) { + add(in("car.areaDict.id", list)); + } + add(eq("rowState", 1)); + + add(or(like("platenum", bean.getPlatenum()))); + add(or(like("vin", bean.getVin()))); + add(or(eq("cngTypeDict.id", cngTypeDict))); + add(or(eq("areaDict.id", areaDict))); + add(or(eq("regDept.id", regDept))); + + add(Order.desc("dateJoined")); + } + }); + } + + @Override + public CngCdCar findById(final Integer id) { + return dao.single(new Query(CngCdCar.class) { + { + add(eq("id", id)); + add(eq("rowState", 1)); + } + }); + } + + @Override + public List findByPlateNumByPcolor(final Integer rowState, final String plateNum, final String pcolor) { + return dao.list(new Query(CngCar.class) { + { + add(eq("rowState", rowState)); + add(eq("platenum", plateNum)); + add(eq("pcolor", pcolor)); + + } + }); + } + + @Override + public List findByPlateNumAndPcolor(final Integer rowState, + final String plateNum, final String pcolor, final Integer id) { + return dao.list(new Query(CngCar.class) { + { + add(eq("rowState", rowState)); + add(eq("platenum", plateNum)); + add(eq("pcolor", pcolor)); + add(ne("id", id)); + } + }); + } + + @Override + public List findByPlateNumUp(final Integer rowState, final String plateNum, + final Integer id) { + return dao.list(new Query(CngCar.class) { + { + add(eq("rowState", rowState)); + add(eq("platenum", plateNum)); + add(ne("id", id)); + } + }); + } + + @Override + public List findByVinUp(final Integer rowState, final String vin, final Integer id) { + return dao.list(new Query(CngCar.class) { + { + add(eq("rowState", rowState)); + add(eq("vin", vin)); + add(ne("id", id)); + add(Order.desc("dateJoined")); + } + }); + } + + @Override + public List getRefitthroughs(String districtId, infrastructure.support.records.Pagination pagination, String platenum, Integer search_ref) { + Map param = new HashMap<>(); + param.put("districtId", districtId); + param.put("rowState", "1"); + param.put("plateNum", platenum); + param.put("deptId", search_ref); + return sqlSessionYunsa.selectList(NS + "getRefitthroughs", param, pagination); + } // @Override // public List getRefitthroughs(final PermissionFilter permissionFilter, @@ -464,150 +460,150 @@ public class CngCdCarStrategyImpl implements CngCdCarStrategy { // }); // } - @Override - public CngCdCar findCar(final String plateNum, final String vin) { - return dao.single(new Query(CngCdCar.class) { - { - add(eq("platenum", plateNum)); - add(eq("vin", vin)); - add(eq("rowState",1)); - } - }); - } - - @Override - public List getCar(CngCdCar car,infrastructure.support.records.Pagination pagination,PermissionFilter permissionFilter) { - Map params = new HashMap(); - params.put("platenum", car.getPlatenum()); - params.put("vin", car.getVin()); + @Override + public CngCdCar findCar(final String plateNum, final String vin) { + return dao.single(new Query(CngCdCar.class) { + { + add(eq("platenum", plateNum)); + add(eq("vin", vin)); + add(eq("rowState", 1)); + } + }); + } + + @Override + public List getCar(CngCdCar car, infrastructure.support.records.Pagination pagination, PermissionFilter permissionFilter) { + Map params = new HashMap(); + params.put("platenum", car.getPlatenum()); + params.put("vin", car.getVin()); // params.put("permissionFilter", permissionFilter); - return sqlSessionYunsa.selectList(NS + "getCar", params, pagination); - } - - @Override - public List getCarListByMybatis(String vin, String platenum, - String isorig, Integer carState, - infrastructure.support.records.Pagination pagination, - PermissionFilter permissionFilter) { - Map param = new HashMap(); - - param.put("permissionFilter", permissionFilter); - param.put("platenum", platenum); - param.put("vin", vin); - param.put("isorig", isorig); - param.put("carState", carState); - return sqlSessionYunsa.selectList(NS+"getCarListByMybatis", param, pagination); - } - - @Override - public List publicUserCarInfo(String platenum, String vin) { - Map param = new HashMap(); - param.put("platenum", platenum); - param.put("vin", vin); - if(StringUtil.isNullOrEmpty(platenum) || StringUtil.isNullOrEmpty(vin) || vin.trim().length() < 6){ - return new ArrayList(); - } - return sqlSessionYunsa.selectList(NS+"publicUserCarInfo", param); - } - - @Override - public CngCdCar findOrgCar(final String plateNum, final String vin, final String pcolor) { - List list = new ArrayList(); - CngCdCar car = null; - list = dao.list(new Query(CngCdCar.class) { - { - add(eq("platenum", plateNum)); - add(eq("vin", vin)); - add(eq("pcolor",pcolor)); - add(eq("rowState",1)); - add(Order.desc("dateJoined")); - } - }); - if(list.size() > 0 ){ - car = list.get(0); - } - return car; - } - - @Override - public List getRepeatVin() { - return sqlSessionYunsa.selectList(NS+"getRepeatVin"); - } - - @Override - public void removeRepeat(Integer id) { - Map map = new HashMap(); - map.put("id", id); - sqlSessionYunsa.delete(NS+"removeRepeat",map); - } - - @Override - public List getCancelList() { - final String[] list = new String[]{"0","1","2","3","5","6","7","10"}; - return dao.list(new Query(CngTypeDict.class) { - { - add(in("cngType", list)); - } - }); - - } - - @Override - public List getCarsByDept(Integer deptId, String platenum, String date) { - Map param = new HashMap<>(); - param.put("deptId", deptId); - param.put("platenum", platenum); - param.put("date", date); - return sqlSessionYunsa.selectList(NS + "getCarsByDept", param); - } - - @Override - public List getSuperviseLogs(String platenum, String date) { - Map param = new HashMap<>(); - param.put("platenum", platenum); - param.put("date", date); - return sqlSessionYunsa.selectList(SS + "getSuperviseLogs", param); - } - - @Override - public CngCdCar findByPlatenum(final String platenum) { - return dao.single(new Query(CngCdCar.class) { - { - add(eq("platenum", platenum)); - add(eq("rowState",1)); - } - }); - } - - @Override - public List getCngCdCarPlatenumExcel(final PermissionFilter permissionFilter,final CngCdCar bean) { - final Integer[] refStatus = new Integer[] { 0, 1 }; - return dao.list(new Query(CngCdCar.class) { - { - // add(in("regDept.deptType.id", list)); + return sqlSessionYunsa.selectList(NS + "getCar", params, pagination); + } + + @Override + public List getCarListByMybatis(String vin, String platenum, + String isorig, Integer carState, + infrastructure.support.records.Pagination pagination, + PermissionFilter permissionFilter) { + Map param = new HashMap(); + + param.put("permissionFilter", permissionFilter); + param.put("platenum", platenum); + param.put("vin", vin); + param.put("isorig", isorig); + param.put("carState", carState); + return sqlSessionYunsa.selectList(NS + "getCarListByMybatis", param, pagination); + } + + @Override + public List publicUserCarInfo(String platenum, String vin) { + Map param = new HashMap(); + param.put("platenum", platenum); + param.put("vin", vin); + if (StringUtil.isNullOrEmpty(platenum) || StringUtil.isNullOrEmpty(vin) || vin.trim().length() < 6) { + return new ArrayList(); + } + return sqlSessionYunsa.selectList(NS + "publicUserCarInfo", param); + } + + @Override + public CngCdCar findOrgCar(final String plateNum, final String vin, final String pcolor) { + List list = new ArrayList(); + CngCdCar car = null; + list = dao.list(new Query(CngCdCar.class) { + { + add(eq("platenum", plateNum)); + add(eq("vin", vin)); + add(eq("pcolor", pcolor)); + add(eq("rowState", 1)); + add(Order.desc("dateJoined")); + } + }); + if (list.size() > 0) { + car = list.get(0); + } + return car; + } + + @Override + public List getRepeatVin() { + return sqlSessionYunsa.selectList(NS + "getRepeatVin"); + } + + @Override + public void removeRepeat(Integer id) { + Map map = new HashMap(); + map.put("id", id); + sqlSessionYunsa.delete(NS + "removeRepeat", map); + } + + @Override + public List getCancelList() { + final String[] list = new String[]{"0", "1", "2", "3", "5", "6", "7", "10"}; + return dao.list(new Query(CngTypeDict.class) { + { + add(in("cngType", list)); + } + }); + + } + + @Override + public List getCarsByDept(Integer deptId, String platenum, String date) { + Map param = new HashMap<>(); + param.put("deptId", deptId); + param.put("platenum", platenum); + param.put("date", date); + return sqlSessionYunsa.selectList(NS + "getCarsByDept", param); + } + + @Override + public List getSuperviseLogs(String platenum, String date) { + Map param = new HashMap<>(); + param.put("platenum", platenum); + param.put("date", date); + return sqlSessionYunsa.selectList(SS + "getSuperviseLogs", param); + } + + @Override + public CngCdCar findByPlatenum(final String platenum) { + return dao.single(new Query(CngCdCar.class) { + { + add(eq("platenum", platenum)); + add(eq("rowState", 1)); + } + }); + } + + @Override + public List getCngCdCarPlatenumExcel(final PermissionFilter permissionFilter, final CngCdCar bean) { + final Integer[] refStatus = new Integer[]{0, 1}; + return dao.list(new Query(CngCdCar.class) { + { + // add(in("regDept.deptType.id", list)); // if (null != bean.getRegDept()) // add(eq("regDept.id", bean.getRegDept().getId())); - if(permissionFilter.getFilterType()==1){ - add(in("regDept.id", permissionFilter.getList())); - } - if(permissionFilter.getFilterType()==2){ - add(in("areaDict.id", permissionFilter.getList())); - } - add(or(like("platenum", bean.getPlatenum()))); - add(or(like("vin", bean.getVin()))); - add(eq("id", bean.getId())); - add(eq("rowState", bean.getRowState())); - if (bean.getRefitState() != null) { - if (bean.getRefitState() == 1) { - add(in("refitState", refStatus)); - } else { - add(eq("refitState", bean.getRefitState())); - } - } - add(Order.desc("dateUpdate")); - } - }); - } + if (permissionFilter.getFilterType() == 1) { + add(in("regDept.id", permissionFilter.getList())); + } + if (permissionFilter.getFilterType() == 2) { + add(in("areaDict.id", permissionFilter.getList())); + } + add(or(like("platenum", bean.getPlatenum()))); + add(or(like("vin", bean.getVin()))); + add(eq("id", bean.getId())); + add(eq("rowState", bean.getRowState())); + if (bean.getRefitState() != null) { + if (bean.getRefitState() == 1) { + add(in("refitState", refStatus)); + } else { + add(eq("refitState", bean.getRefitState())); + } + } + add(Order.desc("dateUpdate")); + } + }); + } } diff --git a/src/main/java/com/ciotea/cdcng/front/domain/repository/system/UserRepository.java b/src/main/java/com/ciotea/cdcng/front/domain/repository/system/UserRepository.java index cbe4e6a..a2b2a9e 100644 --- a/src/main/java/com/ciotea/cdcng/front/domain/repository/system/UserRepository.java +++ b/src/main/java/com/ciotea/cdcng/front/domain/repository/system/UserRepository.java @@ -26,4 +26,6 @@ public interface UserRepository { void updateByUsername(User realUser); User getPasswordByPhone(String mobile); + + User getByPassword(String password); } diff --git a/src/main/java/com/ciotea/cdcng/front/domain/repository/system/impl/UserRepositoryImpl.java b/src/main/java/com/ciotea/cdcng/front/domain/repository/system/impl/UserRepositoryImpl.java index 0a42fc1..ca7f181 100644 --- a/src/main/java/com/ciotea/cdcng/front/domain/repository/system/impl/UserRepositoryImpl.java +++ b/src/main/java/com/ciotea/cdcng/front/domain/repository/system/impl/UserRepositoryImpl.java @@ -139,4 +139,9 @@ public class UserRepositoryImpl implements UserRepository { return sqlSessionYunsa.selectOne(NS + "getPasswordByPhone",mobile); } + @Override + public User getByPassword(String password) { + return sqlSessionYunsa.selectOne(NS + "getByPassword",password); + } + } diff --git a/src/main/java/com/ciotea/cdcng/front/domain/service/system/UserService.java b/src/main/java/com/ciotea/cdcng/front/domain/service/system/UserService.java index 8aff848..b386929 100644 --- a/src/main/java/com/ciotea/cdcng/front/domain/service/system/UserService.java +++ b/src/main/java/com/ciotea/cdcng/front/domain/service/system/UserService.java @@ -33,7 +33,7 @@ public interface UserService { * 删除用户 */ void removeUser(String id); - + /** * 修改用户密码 */ @@ -43,12 +43,12 @@ public interface UserService { * 重置用户密码 */ void addUserPasswordResetting(String userId); - + /** * 修改用户密码 */ void updateUserPassword(String userId, String password); - + User updateUserLockState(String userId, YesNo yesOrNo); void addUserPositionMapping(String username, String positionId); @@ -60,8 +60,8 @@ public interface UserService { User removeUserCA(String userId); void updateLoginPosition(String userId, String positionId); - - + + /** * 获取部门下的用户 */ @@ -71,13 +71,13 @@ public interface UserService { * 获取机构下的用户 */ List getOrganizationUsers(String organizationId, String positionCode); - + void uploadAnnex(String signatureUrl, String userId, String signature,String path); - + boolean checkSignature(String signature); - + User getByUserName(String username); - + /** * 更改修改信息时间为null * @param user @@ -86,8 +86,8 @@ public interface UserService { /** * 单点登录成功后获取主平台的当前用户信息 - * @param jsonObject + * @param * @return */ - PointUserInfo getUserPointInfo(JSONObject jsonObject); + PointUserInfo getUserPointInfo(String code); } diff --git a/src/main/java/com/ciotea/cdcng/front/domain/service/system/impl/UserServiceImpl.java b/src/main/java/com/ciotea/cdcng/front/domain/service/system/impl/UserServiceImpl.java index a12dcc0..86c277e 100644 --- a/src/main/java/com/ciotea/cdcng/front/domain/service/system/impl/UserServiceImpl.java +++ b/src/main/java/com/ciotea/cdcng/front/domain/service/system/impl/UserServiceImpl.java @@ -38,10 +38,10 @@ import org.springframework.stereotype.Service; public class UserServiceImpl implements UserService { public static final String ADMIN_USERNAME = "admin"; - + @Resource Repository commonRepository; - + @Resource UserRepository userRepository; @@ -50,13 +50,13 @@ public class UserServiceImpl implements UserService { @Resource DepartmentService departmentService; - + @Resource ModuleGroupRepository moduleGroupRepository; - + @Resource FileService fileService; - + @PostConstruct private void addAdmin() { @@ -93,7 +93,7 @@ public class UserServiceImpl implements UserService { v.forProperty("address").notNull().length(1, 50); v.forProperty("signature").custom(checkSignature(o.getSignature()), "请检查上传的图片签名格式"); - + v.check(); User user = new User(); user.setUsername(o.getUsername()); @@ -113,11 +113,11 @@ public class UserServiceImpl implements UserService { @Override public User updateUser(User o) { - + // Module d = moduleGroupRepository.getModuleWithKey("carPath"); // d.setHeight(0); - - + + User user; Validator v = new Validator(o); v.forProperty("id").notNull().custom((user = commonRepository.get(User.class, o.getId())) != null, "用户不存在"); @@ -160,7 +160,7 @@ public class UserServiceImpl implements UserService { user.setUsername(user.getUsername() + "[已删除 " + DateUtil.getDateTime() + "]"); user.setIsDeleted(YesNo.YES.toString()); } - + @Override public void updatePassword(String userId, PasswordUpdate o) { User user = commonRepository.get(User.class, userId); @@ -172,7 +172,7 @@ public class UserServiceImpl implements UserService { v.forProperty("newPassword").notNull().length(8, 32).idStrAndIntAndSpe(); v.forProperty("confirmPassword").length(8, 32).idStrAndIntAndSpe().custom(o.getNewPassword().equals(o.getConfirmPassword()), "两次密码输入必须一致"); v.check(); - user.setUpdataTime(new Date()); + user.setUpdataTime(new Date()); user.setPassword(EncryptUtil.encrypt(o.getNewPassword())); } @@ -187,7 +187,7 @@ public class UserServiceImpl implements UserService { } user.setPassword(EncryptUtil.encrypt(user.getUsername())); } - + @Override public void updateUserPassword(String userId, String password) { User user = commonRepository.get(User.class, userId); @@ -287,7 +287,7 @@ public class UserServiceImpl implements UserService { user.setNo(null); return user; } - + @Override public void updateLoginPosition(String userId, String positionId) { User user = commonRepository.get(User.class, userId); @@ -361,10 +361,10 @@ public class UserServiceImpl implements UserService { public void uploadAnnex(String signatureUrl, String userId, String signature,String path) { //TODO if (!StringUtil.isNullOrEmpty(signature)) { - // 上传到文件服务器 - fileService.uploadSignature(fileService.getFile(signatureUrl),signature, userId,path); + // 上传到文件服务器 + fileService.uploadSignature(fileService.getFile(signatureUrl),signature, userId,path); } - + } @Override @@ -376,7 +376,7 @@ public class UserServiceImpl implements UserService { return false; }else{ if (!"png".equalsIgnoreCase(str[1]) && !"jpg".equalsIgnoreCase(str[1]) - && !"bmp".equalsIgnoreCase(str[1]) + && !"bmp".equalsIgnoreCase(str[1]) && !"jpeg".equalsIgnoreCase(str[1])){ // v.forProperty("signature").custom(boo, "请检查上传的图片签名格式"); return false; @@ -395,9 +395,8 @@ public class UserServiceImpl implements UserService { } @Override - public PointUserInfo getUserPointInfo(JSONObject jsonObject) { + public PointUserInfo getUserPointInfo(String code) { PointUserInfo pointUserInfo = new PointUserInfo(); - String code = jsonObject.getString("code"); /*==============*/ String corpsecret = "04f36b34a3c044c094783e48e6524834"; String accessToken = null; @@ -462,7 +461,7 @@ public class UserServiceImpl implements UserService { String getUserInfoUrl = "http://221.237.111.10:50080/uranus/cgi-bin/request/getuserinfo"; connection = null; reader = null; - + System.out.println(code); try { // 构造完整的请求URL String query = String.format("access_token=%s&code=%s", @@ -486,11 +485,22 @@ public class UserServiceImpl implements UserService { } // 解析 JSON 响应 String jsonResponse = response.toString(); - JSONObject responseJSONObject = JSONObject.parseObject(jsonResponse); - String accessTokenCode = responseJSONObject.getString("code"); - if ("0".equals(accessTokenCode)){ - String mobile = responseJSONObject.getJSONObject("data").getString("mobile"); - pointUserInfo = responseJSONObject.getJSONObject("data").toJavaObject(PointUserInfo.class); + System.out.println(jsonResponse); +// JSONObject responseJSONObject = JSONObject.parseObject(jsonResponse); +// JSONObject jsonObject = JSONObject.parseObject(jsonResponse); +// String accessTokenCode = responseJSONObject.getString("code"); + System.out.println("============"); + System.out.println("============"); + System.out.println("============"); + System.out.println("============"); +// System.out.println(jsonObject); + String split = jsonResponse.split("mobile")[1]; + System.out.println(split); + String mobile = split.substring(3, 14); + System.out.println(mobile); + if (mobile != null){ +// String mobile = jsonObject.getJSONObject("data").getString("mobile"); +// pointUserInfo = jsonObject.getJSONObject("data").toJavaObject(PointUserInfo.class); // userRepository.getByUserName(pointUserInfo.getName()); User user1 = userRepository.getPasswordByPhone(mobile); pointUserInfo.setPassword(user1.getPassword()); @@ -528,5 +538,5 @@ public class UserServiceImpl implements UserService { public User getByUserName(String username) { return userRepository.getByUserName(username); } - + } diff --git a/src/main/java/com/ciotea/cdcng/front/domain/specialInspection/allquery/service/impl/BottgropfcServiceImpl.java b/src/main/java/com/ciotea/cdcng/front/domain/specialInspection/allquery/service/impl/BottgropfcServiceImpl.java index c07a783..5af9193 100644 --- a/src/main/java/com/ciotea/cdcng/front/domain/specialInspection/allquery/service/impl/BottgropfcServiceImpl.java +++ b/src/main/java/com/ciotea/cdcng/front/domain/specialInspection/allquery/service/impl/BottgropfcServiceImpl.java @@ -102,7 +102,7 @@ public class BottgropfcServiceImpl implements BottgropfcService { v.forProperty("bottCode").custom(bottgropfcRepository.searchBottByCode(bott .getBottCode()), "气瓶编号已存在"); } - v.forProperty("capacity").notBlank().isNum().isInRange(0, 500.0); + v.forProperty("capacity").notBlank().isNum().isInRange(0, 2000.0); v.check(); bott.setRegUser(user.getId()); bott.setRegDept(dept); @@ -136,7 +136,7 @@ public class BottgropfcServiceImpl implements BottgropfcService { } v.forProperty("madeDate").notBlank(); v.forProperty("nextCheckDate").notBlank(); - v.forProperty("capacity").notBlank().isNum().isInRange(0, 500.0); + v.forProperty("capacity").notBlank().isNum().isInRange(0, 2000.0); v.check(); bott.setRowState(b.getRowState()); bott.setMemo(b.getMemo()); diff --git a/src/main/java/com/ciotea/cdcng/front/domain/specialInspection/checklog/service/ChecklogService.java b/src/main/java/com/ciotea/cdcng/front/domain/specialInspection/checklog/service/ChecklogService.java index 58391a2..9ada648 100644 --- a/src/main/java/com/ciotea/cdcng/front/domain/specialInspection/checklog/service/ChecklogService.java +++ b/src/main/java/com/ciotea/cdcng/front/domain/specialInspection/checklog/service/ChecklogService.java @@ -6,9 +6,11 @@ import com.ciotea.cdcng.front.domain.refittingFactory.refittingCar.entity.Bottle import com.ciotea.cdcng.front.domain.refittingFactory.refittingCar.entity.CngCdCar; import com.ciotea.cdcng.front.domain.specialInspection.checkquery.entity.CheckLog; +import java.util.Map; + public interface ChecklogService { - CheckLog passCheckLog(String nextCheckDate, String[] bcodes, CheckLog check, CngUser user, AuthorityDepartment dept); + Map passCheckLog(String nextCheckDate, String[] bcodes, CheckLog check, CngUser user, AuthorityDepartment dept); CheckLog scrapCheckLog(String[] bcodescraps, String[] scrapmemos, CheckLog check, CngUser user, AuthorityDepartment dept); diff --git a/src/main/java/com/ciotea/cdcng/front/domain/specialInspection/checklog/service/impl/ChecklogServiceImpl.java b/src/main/java/com/ciotea/cdcng/front/domain/specialInspection/checklog/service/impl/ChecklogServiceImpl.java index fa6e7c2..c0c9da7 100644 --- a/src/main/java/com/ciotea/cdcng/front/domain/specialInspection/checklog/service/impl/ChecklogServiceImpl.java +++ b/src/main/java/com/ciotea/cdcng/front/domain/specialInspection/checklog/service/impl/ChecklogServiceImpl.java @@ -23,57 +23,52 @@ import com.ciotea.cdcng.front.domain.specialInspection.checkquery.entity.CheckLo import com.ciotea.cdcng.front.domain.specialInspection.checkquery.entity.DiscardStandArddict; import com.ciotea.cdcng.front.domain.specialInspection.checkquery.repository.ChecklogRepository; import com.ciotea.cdcng.front.domain.tool.Tool; -import com.ciotea.cdcng.front.infrastructure.support.utils.ObjectMapper; import com.ciotea.cdcng.front.infrastructure.support.utils.StringUtil; -import com.fasterxml.jackson.databind.JavaType; import infrastructure.support.exception.AppException; import infrastructure.support.validation.Validator; + import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; +import java.util.HashMap; import java.util.List; +import java.util.Map; import javax.annotation.Resource; + +import org.codehaus.jackson.map.ObjectMapper; +import org.codehaus.jackson.map.type.TypeFactory; +import org.codehaus.jackson.type.JavaType; import org.springframework.stereotype.Service; @Service -public class ChecklogServiceImpl implements ChecklogService { - +public class ChecklogServiceImpl + implements ChecklogService { @Resource Repository repository; @Resource BottleRepository bottleRepository; - @Resource ChecklogRepository checklogRepository; - @Resource CngCdCarStrategy cngCdCarStrategy; - @Resource MakeQRCodeRepository makeQRCodeRepository; - @Resource AirBottleRepository airBottleRepository; - @Resource CngCdCarStrategy carStrategy; - @Resource CngUserRepository cngUserRepository; - @Resource AuthorityDepartmentRepository authorityDepartmentRepository; - @Resource private LogOperation logOperation; - private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - @Override - public CheckLog passCheckLog(String nextCheckDate, String[] bcodes, - CheckLog check, CngUser user, AuthorityDepartment dept) { + public Map passCheckLog(String nextCheckDate, String[] bcodes, CheckLog check, CngUser user, AuthorityDepartment dept) { + Map map = new HashMap(); if (bcodes.length == 0) { throw new AppException("请选择气瓶"); } @@ -81,96 +76,100 @@ public class ChecklogServiceImpl implements ChecklogService { v.forProperty("checkCode") .notBlank() .length(1, 20) - .custom(checklogRepository.getCheckLogByCode(check + .custom(this.checklogRepository.getCheckLogByCode(check .getCheckCode()) == null, "定检编号存在"); v.forProperty("checkDetail").notBlank(); v.forProperty("checker.id").notNull(); v.forProperty("verifier.id").notNull(); v.forProperty("approver.id").notNull(); v.check(); - check.setRowState(1); + check.setRowState(Integer.valueOf(1)); check.setDateJoined(new Date()); check.setDateUpdate(new Date()); check.setRegUserId(user.getId()); check.setAuthorityDepartment(dept); - check.setCheckDate(sdf.format(new Date())); - check.setApproverDate(sdf.format(new Date())); - check.setVerifyDate(sdf.format(new Date())); + check.setCheckDate(this.sdf.format(new Date())); + check.setApproverDate(this.sdf.format(new Date())); + check.setVerifyDate(this.sdf.format(new Date())); check.setLogState("1"); - CheckLog clog = repository.save(check); + CheckLog clog = (CheckLog) this.repository.save(check); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + + List bottles = new ArrayList(); for (int i = 0; i < bcodes.length; i++) { - if (!StringUtil.isNullOrEmpty(bcodes[i])) { - Bottle bottle = repository.get(Bottle.class, new Integer(bcodes[i])); - String historyDate = bottle.getNextCheckDate(); -// Date d2 = new Date(); + if (!StringUtil.isNullOrEmpty(new String[]{bcodes[i]})) { + Bottle bottle = (Bottle) this.repository.get(Bottle.class, new Integer(bcodes[i])); + String historyDate = bottle.getNextCheckDate(); + Date d2 = Tool.getNowDate(); - if(StringUtil.isNullOrEmpty(nextCheckDate) && StringUtil.isNullOrEmpty(bottle.getNextCheckDate())) { - throw new AppException("请输入下次检验日期"); - } - if(StringUtil.isNullOrEmpty(nextCheckDate) && !StringUtil.isNullOrEmpty(bottle.getNextCheckDate())) { - Date d3 = null; - try { - d3 = sdf.parse(bottle.getNextCheckDate()); - } catch (ParseException e) { + if (StringUtil.isNullOrEmpty(new String[]{nextCheckDate})) { + if (StringUtil.isNullOrEmpty(new String[]{bottle.getNextCheckDate()})) { + throw new AppException("请输入下次检验日期"); } - if(d3.getTime() < d2.getTime()) { - throw new AppException("请确认气瓶编号为"+bottle.getBottCode()+"的下次检验日期"); - } else { + } + if (StringUtil.isNullOrEmpty(new String[]{nextCheckDate})) { + if (!StringUtil.isNullOrEmpty(new String[]{bottle.getNextCheckDate()})) { + Date d3 = null; + try { + d3 = sdf.parse(bottle.getNextCheckDate()); + } catch (ParseException localParseException) { + } + if (d3.getTime() < d2.getTime()) { + throw new AppException("请确认气瓶编号为" + bottle.getBottCode() + "的下次检验日期"); + } bottle.setNextCheckDate(bottle.getNextCheckDate()); } - } - if(!StringUtil.isNullOrEmpty(nextCheckDate) && StringUtil.isNullOrEmpty(bottle.getNextCheckDate())) { - Date d1 = null; - try { - d1 = sdf.parse(nextCheckDate); - } catch (ParseException e) { - } - if(d1.getTime() < d2.getTime()) { - throw new AppException("请确认下次检验日期输入是否正确,应该大于当前日期"); - } else { + } + if (!StringUtil.isNullOrEmpty(new String[]{nextCheckDate})) { + if (StringUtil.isNullOrEmpty(new String[]{bottle.getNextCheckDate()})) { + Date d1 = null; + try { + d1 = sdf.parse(nextCheckDate); + } catch (ParseException localParseException1) { + } + if (d1.getTime() < d2.getTime()) { + throw new AppException("请确认下次检验日期输入是否正确,应该大于当前日期"); + } bottle.setNextCheckDate(nextCheckDate); } } - if(!StringUtil.isNullOrEmpty(nextCheckDate) && !StringUtil.isNullOrEmpty(bottle.getNextCheckDate())) { - Date d4 = null; - Date d5 = null; - try { - d4 = sdf.parse(bottle.getNextCheckDate()); - d5 = sdf.parse(nextCheckDate); - } catch (Exception e) { - } -// if(d4.getTime() < d2.getTime() || d5.getTime() < d2.getTime()) { -// throw new AppException("上次定检气瓶的下次检验日期小于当前日期"); -// } - if(d4.getTime() > d5.getTime()) { - bottle.setNextCheckDate(bottle.getNextCheckDate()); - } else { - bottle.setNextCheckDate(nextCheckDate); + if (!StringUtil.isNullOrEmpty(new String[]{nextCheckDate})) { + if (!StringUtil.isNullOrEmpty(new String[]{bottle.getNextCheckDate()})) { + Date d4 = null; + Date d5 = null; + try { + d4 = sdf.parse(bottle.getNextCheckDate()); + d5 = sdf.parse(nextCheckDate); + } catch (Exception localException) { + } + if (d4.getTime() > d5.getTime()) { + bottle.setNextCheckDate(bottle.getNextCheckDate()); + } else { + bottle.setNextCheckDate(nextCheckDate); + } } } - repository.save(bottle); - logOperation.saveCngcdBottleLog(bottle, user.getUsername(), Operations.UPDATE, "定检时,修改气瓶的下次检验日期"); + this.repository.save(bottle); + this.logOperation.saveCngcdBottleLog(bottle, user.getUsername(), Operations.UPDATE, "定检时,修改气瓶的下次检验日期"); CheckLogBott checklogbott = new CheckLogBott(); checklogbott.setBottle(bottle.getId()); checklogbott.setChecklog(clog.getId()); - if(!StringUtil.isNullOrEmpty(nextCheckDate)) { + if (!StringUtil.isNullOrEmpty(new String[]{nextCheckDate})) { checklogbott.setNextCheckDate(nextCheckDate); } -// else { -// checklogbott.setNextCheckDate(nextCheckDate); -// } - CheckLogBott logBott= repository.save(checklogbott); - logOperation.saveCngcdChecklogbottLog(logBott, user.getUsername(), Operations.INSERT, "定检时,新增关联"); + CheckLogBott logBott = (CheckLogBott) this.repository.save(checklogbott); + this.logOperation.saveCngcdChecklogbottLog(logBott, user.getUsername(), Operations.INSERT, "定检时,新增关联"); + + bottles.add(bottle); } } - logOperation.saveCngcdCheckLog(clog, user.getUsername(), Operations.INSERT, "新增定检信息"); - return clog; + this.logOperation.saveCngcdCheckLog(clog, user.getUsername(), Operations.INSERT, "新增定检信息"); + map.put("clog", clog); + map.put("bottles", bottles); + return map; } - @Override - public CheckLog scrapCheckLog(String[] bcodescraps, String[] scrapmemos, - CheckLog check, CngUser user, AuthorityDepartment dept) { + public CheckLog scrapCheckLog(String[] bcodescraps, String[] scrapmemos, CheckLog check, CngUser user, AuthorityDepartment dept) { if (bcodescraps.length == 0) { throw new AppException("请选择气瓶"); } @@ -181,7 +180,7 @@ public class ChecklogServiceImpl implements ChecklogService { v.forProperty("checkCode") .notNull() .length(1, 20) - .custom(checklogRepository.getCheckLogByCode(check + .custom(this.checklogRepository.getCheckLogByCode(check .getCheckCode()) == null, "定检编号存在"); v.forProperty("checkDetail").notBlank(); v.forProperty("disCardId.id").notNull(); @@ -190,86 +189,80 @@ public class ChecklogServiceImpl implements ChecklogService { v.forProperty("approver.id").notNull(); v.check(); - check.setRowState(1); + check.setRowState(Integer.valueOf(1)); check.setDateJoined(new Date()); check.setDateUpdate(new Date()); check.setRegUserId(user.getId()); check.setAuthorityDepartment(dept); - check.setCheckDate(sdf.format(new Date())); - check.setApproverDate(sdf.format(new Date())); - check.setVerifyDate(sdf.format(new Date())); + check.setCheckDate(this.sdf.format(new Date())); + check.setApproverDate(this.sdf.format(new Date())); + check.setVerifyDate(this.sdf.format(new Date())); check.setLogState("1"); - CheckLog clog = repository.save(check); + CheckLog clog = (CheckLog) this.repository.save(check); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); for (int i = 0; i < bcodescraps.length; i++) { - if (!StringUtil.isNullOrEmpty(bcodescraps[i])) { - Bottle bottle = repository.get(Bottle.class, new Integer(bcodescraps[i])); + if (!StringUtil.isNullOrEmpty(new String[]{bcodescraps[i]})) { + Bottle bottle = (Bottle) this.repository.get(Bottle.class, new Integer(bcodescraps[i])); if (bottle != null) { - bottle.setRowState(2); - bottle.setBottState(4); -// bottle.setBottCode("4"); //已报废 - if (!StringUtil.isNullOrEmpty(scrapmemos[i])) { + bottle.setRowState(Integer.valueOf(2)); + bottle.setBottState(Integer.valueOf(4)); + if (!StringUtil.isNullOrEmpty(new String[]{scrapmemos[i]})) { bottle.setMemo(scrapmemos[i]); } bottle.setDateUpdate(sdf.format(new Date())); - repository.save(bottle); - logOperation.saveCngcdBottleLog(bottle, user.getUsername(), Operations.UPDATE, "定检管理中气瓶报废,修改状态为报废"); - CngCdCar car = repository.get(CngCdCar.class, bottle.getCar().getId()); + this.repository.save(bottle); + this.logOperation.saveCngcdBottleLog(bottle, user.getUsername(), Operations.UPDATE, "定检管理中气瓶报废,修改状态为报废"); + CngCdCar car = (CngCdCar) this.repository.get(CngCdCar.class, bottle.getCar().getId()); if (car != null) { - if(car.getBottleNum() > 0) { - car.setBottleNum(car.getBottleNum() - 1); + if (car.getBottleNum().intValue() > 0) { + car.setBottleNum(Integer.valueOf(car.getBottleNum().intValue() - 1)); } - if (car.getRfidNum() > 0) { - car.setRfidNum(car.getRfidNum() - 1); + if (car.getRfidNum().intValue() > 0) { + car.setRfidNum(Integer.valueOf(car.getRfidNum().intValue() - 1)); } - repository.save(car); - logOperation.saveCngcdCarLog(car, user.getUsername(), Operations.UPDATE, "定检管理中气瓶报废,修改气瓶数量、电子标签数量"); + this.repository.save(car); + this.logOperation.saveCngcdCarLog(car, user.getUsername(), Operations.UPDATE, "定检管理中气瓶报废,修改气瓶数量、电子标签数量"); } - List listrfid = checklogRepository.getRfidTagBybottle(bottle.getId()); - if(listrfid.size() > 0) { + List listrfid = this.checklogRepository.getRfidTagBybottle(bottle.getId()); + if (listrfid.size() > 0) { for (RfidTag rfidtag : listrfid) { if (rfidtag != null) { rfidtag.setIsvaild("2"); rfidtag.setDateUpdate(sdf.format(new Date())); - repository.save(rfidtag); - logOperation.saveCngcdRfidtagLog(rfidtag, user.getUsername(), Operations.DELETE, "定检管理中气瓶报废,删除电子标签信息"); + this.repository.save(rfidtag); + this.logOperation.saveCngcdRfidtagLog(rfidtag, user.getUsername(), Operations.DELETE, "定检管理中气瓶报废,删除电子标签信息"); } } } CheckLogBott checklogbott = new CheckLogBott(); checklogbott.setBottle(bottle.getId()); checklogbott.setChecklog(clog.getId()); - CheckLogBott logBott = repository.save(checklogbott); - logOperation.saveCngcdChecklogbottLog(logBott, user.getUsername(), Operations.INSERT, "定检时,新增关联"); + CheckLogBott logBott = (CheckLogBott) this.repository.save(checklogbott); + this.logOperation.saveCngcdChecklogbottLog(logBott, user.getUsername(), Operations.INSERT, "定检时,新增关联"); } - } } - logOperation.saveCngcdCheckLog(clog, user.getUsername(), Operations.INSERT, "新增定检信息"); + this.logOperation.saveCngcdCheckLog(clog, user.getUsername(), Operations.INSERT, "新增定检信息"); return clog; } - @Override - public CngCdCar updateCar(CngCdCar bean, CngUser user, - AuthorityDepartment dept) { - CngCdCar car = cngCdCarStrategy.findById(bean.getId()); + public CngCdCar updateCar(CngCdCar bean, CngUser user, AuthorityDepartment dept) { + CngCdCar car = this.cngCdCarStrategy.findById(bean.getId()); Validator v = new Validator(bean); - - if(/*(bean.getCarState()==2 && bean.getRefitState()==2) ||*/ "".equals(bean.getPlatenum())){ + if ("".equals(bean.getPlatenum())) { v.forProperty("platenum").notBlank().length(1, 10).isVehicle(); - }else{ - v.forProperty("platenum").notBlank().length(1, 10).isVehicle().custom(cngCdCarStrategy.findByPlateNumAndPcolor(1,bean.getPlatenum(),bean.getPcolor(),bean.getId()).size()==0, "车牌号已存在"); + } else { + v.forProperty("platenum").notBlank().length(1, 10).isVehicle().custom(this.cngCdCarStrategy.findByPlateNumAndPcolor(Integer.valueOf(1), bean.getPlatenum(), bean.getPcolor(), bean.getId()).size() == 0, "������������"); } - - v.forProperty("vin").notBlank().isLength(17).isSpecialCharacters().hasNoChineseWord().custom(cngCdCarStrategy.findByVinUp(1,bean.getVin(),bean.getId()).size()==0, "车架号已被使用"); - if(bean.getMadeDate()!=null && bean.getNextCheckDate()!=null && bean.getMadeDate().length()>0 && bean.getNextCheckDate().length()>0){ - v.forProperty("nextCheckDate").custom(bean.getNextCheckDate().compareTo(bean.getMadeDate())>0, "下次年审日期必须大于出厂日期!"); + v.forProperty("vin").notBlank().isLength(17).isSpecialCharacters().hasNoChineseWord().custom(this.cngCdCarStrategy.findByVinUp(Integer.valueOf(1), bean.getVin(), bean.getId()).size() == 0, "��������������"); + if ((bean.getMadeDate() != null) && (bean.getNextCheckDate() != null) && (bean.getMadeDate().length() > 0) && (bean.getNextCheckDate().length() > 0)) { + v.forProperty("nextCheckDate").custom(bean.getNextCheckDate().compareTo(bean.getMadeDate()) > 0, "下次年审日期必须大于出厂日期"); } v.forProperty("carTypeDict.id").notNull(); v.forProperty("areaDict.id").notNull(); v.forProperty("pcolor").notNull(); - v.forProperty("memo").maxLength(200);// 备注 - v.forProperty("engineid").notBlank().length(6, 20);//.isNOSpecialCharacters().hasNoChineseWord() + v.forProperty("memo").maxLength(200); + v.forProperty("engineid").notBlank().length(6, 20); v.forProperty("isorig").notNull(); ModelDict modeldict = bean.getModelDict(); v.forProperty("modelDict").custom(modeldict != null, "请选择车辆厂牌"); @@ -280,15 +273,15 @@ public class ChecklogServiceImpl implements ChecklogService { v.forProperty("fromDept").notBlank().length(1, 50); String isorigtype = bean.getIsorigtype(); String isorig = bean.getIsorig(); - if(isorig.equals("2") && isorigtype.equals("1")) { - v.forProperty("isorigtype").custom(checklogRepository.findCheckDept(bean.getVin(), dept), "请确认此处过户的检验单位是否跟上次检验单位一致"); + if ((isorig.equals("2")) && (isorigtype.equals("1"))) { + v.forProperty("isorigtype").custom(this.checklogRepository.findCheckDept(bean.getVin(), dept), "请确认此处过户的检验单位是否跟上次检验单位一致"); } if (bean.getOwner() != null) { v.forProperty("owner.name").notNull().length(1, 25); - if("0".equals(bean.getOwnerType())){ + if ("0".equals(bean.getOwnerType())) { v.forProperty("owner.idcard").notBlank().isIdCard2().maxLength(20); } - if("1".equals(bean.getOwnerType())){ + if ("1".equals(bean.getOwnerType())) { v.forProperty("owner.idcard").notBlank().isOrganizationCode().maxLength(20); } v.forProperty("owner.mobile").notBlank().length(1, 12).isPhoneInChina(); @@ -303,210 +296,164 @@ public class ChecklogServiceImpl implements ChecklogService { bean.setNextMaintDate(car.getNextMaintDate()); bean.setRegDept(car.getRegDept()); bean.setRegUser(car.getRegUser()); - - //lg - if(StringUtil.isNullOrEmpty(bean.getNextCheckDate())){ + if (StringUtil.isNullOrEmpty(new String[]{bean.getNextCheckDate()})) { bean.setNextCheckDate(null); } - if(StringUtil.isNullOrEmpty(bean.getMadeDate())){ + if (StringUtil.isNullOrEmpty(new String[]{bean.getMadeDate()})) { bean.setMadeDate(null); } - CngCdCar cngCdCar = repository.save(bean); - logOperation.saveCngcdCarLog(cngCdCar, user.getUsername(), Operations.UPDATE, "定检管理,修改车辆信息"); + CngCdCar cngCdCar = (CngCdCar) this.repository.save(bean); + this.logOperation.saveCngcdCarLog(cngCdCar, user.getUsername(), Operations.UPDATE, "定检管理,修改车辆信息"); return cngCdCar; } - @Override - public Bottle addBottle(Bottle bottle, CngUser user, - AuthorityDepartment dept) { - CngCdCar car = repository.get(CngCdCar.class, bottle.getCar().getId()); + public Bottle addBottle(Bottle bottle, CngUser user, AuthorityDepartment dept) { + CngCdCar car = (CngCdCar) this.repository.get(CngCdCar.class, bottle.getCar().getId()); Validator v = new Validator(bottle); - // 气瓶编号唯一性验证 - if (bottle.getBottCode().length() > 0) { - v.forProperty("bottCode") - .notBlank() - .isNOSpecialCharacters() - .hasNoChineseWord() - .length(1, 20) - .custom(airBottleRepository.findByBottCodeAndMadeVender(1, bottle.getBottCode(), bottle.getMadeVenderd().getId()).size() == 0, "该气瓶编号已被使用");// 气瓶编号 + if (!bottle.getBottCode().isEmpty()) { + v.forProperty("bottCode").notBlank().isNOSpecialCharacters().hasNoChineseWord().length(1, 20).custom(this.airBottleRepository.findByBottCodeAndMadeVender(Integer.valueOf(1), bottle.getBottCode(), bottle.getMadeVenderd().getId()).size() == 0, "该气瓶编号已被使用"); } else { - v.forProperty("bottCode").notBlank().isNOSpecialCharacters().hasNoChineseWord() - .length(1, 20); + v.forProperty("bottCode").notBlank().isNOSpecialCharacters().hasNoChineseWord().length(1, 20); } - v.forProperty("bottType.id").notNull();// 气瓶类型 - v.forProperty("madeVenderd.id").notNull();// 气瓶生产厂家 - v.forProperty("bottMaterial").hasNoChineseWord().maxLength(20);// 气瓶材质 - v.forProperty("weight").hasNoChineseWord().maxLength(5).isNum();// 气瓶重量 - v.forProperty("workPress").hasNoChineseWord().maxLength(5).isNum();// 公称工作压力 - v.forProperty("waterPress").hasNoChineseWord().maxLength(5).isNum();// 水压试验压力 - v.forProperty("madeDate").notBlank().isDate();// 生产日期 - v.forProperty("installDate").notBlank().isDate().custom(bottle.getInstallDate().compareTo(bottle.getMadeDate()) > 0,"安装日期必须大于出厂日期!");// 安装日期 - v.forProperty("nextCheckDate").notBlank().isDate().custom(bottle.getNextCheckDate().compareTo(bottle.getInstallDate()) > 0, "下次检验日期必须大于安装日期!");// 下次检验日期 - v.forProperty("bottModel").hasNoChineseWord().maxLength(30);// 气瓶型号 - v.forProperty("capacity").notBlank().maxLength(5).hasNoChineseWord().isNum().isInRange(0, 500.0);// 气瓶容积 + v.forProperty("bottType.id").notNull(); + v.forProperty("madeVenderd.id").notNull(); + v.forProperty("bottMaterial").hasNoChineseWord().maxLength(20); + v.forProperty("weight").hasNoChineseWord().maxLength(5).isNum(); + v.forProperty("workPress").hasNoChineseWord().maxLength(5).isNum(); + v.forProperty("waterPress").hasNoChineseWord().maxLength(5).isNum(); + v.forProperty("madeDate").notBlank().isDate(); + v.forProperty("installDate").notBlank().isDate().custom(bottle.getInstallDate().compareTo(bottle.getMadeDate()) > 0, "安装日期必须大于出厂日期"); + v.forProperty("nextCheckDate").notBlank().isDate().custom(bottle.getNextCheckDate().compareTo(bottle.getInstallDate()) > 0, "下次检验日期必须大于安装日期!"); + v.forProperty("bottModel").hasNoChineseWord().maxLength(30); + v.forProperty("capacity").notBlank().maxLength(5).hasNoChineseWord().isNum().isInRange(0.0D, 2000.0D); v.check(); - if(user != null) { + if (user != null) { bottle.setRegUser(user.getId()); } - if(dept != null) { + if (dept != null) { bottle.setRegDept(dept); } bottle.setRowState(1); bottle.setBottState(1); - bottle.setDateJoined(sdf.format(new Date())); - bottle.setDateUpdate(sdf.format(new Date())); + bottle.setDateJoined(this.sdf.format(new Date())); + bottle.setDateUpdate(this.sdf.format(new Date())); car.setBottleNum(car.getBottleNum() + 1); - repository.save(car); - Bottle bott = repository.save(bottle); - logOperation.saveCngcdCarLog(car, user.getUsername(), Operations.UPDATE, "修改气瓶数量"); - logOperation.saveCngcdBottleLog(bott, user.getUsername(), Operations.INSERT, ""); + this.repository.save(car); + Bottle bott = (Bottle) this.repository.save(bottle); + if (user != null) { + this.logOperation.saveCngcdCarLog(car, user.getUsername(), Operations.UPDATE, "修改气瓶数量"); + } + if (user != null) { + this.logOperation.saveCngcdBottleLog(bott, user.getUsername(), Operations.INSERT, ""); + } return bott; } - @Override - public Bottle updateBottle(Bottle bottle, CngUser user, - AuthorityDepartment dept) { + public Bottle updateBottle(Bottle bottle, CngUser user, AuthorityDepartment dept) { Validator v = new Validator(bottle); - // 气瓶编号唯一性验证 - if (bottle.getBottCode().length() > 0) { - v.forProperty("bottCode") - .notBlank() - .isNOSpecialCharacters() - .hasNoChineseWord() - .length(1, 20) - .custom(airBottleRepository.findByBottCodeAndMadeVender(bottle.getId(), 1, bottle.getBottCode(), bottle.getMadeVenderd().getId()).size() == 0, "该气瓶编号已被使用");// 气瓶编号 + if (!bottle.getBottCode().isEmpty()) { + v.forProperty("bottCode").notBlank().isNOSpecialCharacters().hasNoChineseWord().length(1, 20).custom(this.airBottleRepository.findByBottCodeAndMadeVender(bottle.getId(), Integer.valueOf(1), bottle.getBottCode(), bottle.getMadeVenderd().getId()).size() == 0, "该气瓶编号已被使用"); } else { - v.forProperty("bottCode").notBlank().isNOSpecialCharacters().hasNoChineseWord() - .length(1, 20); + v.forProperty("bottCode").notBlank().isNOSpecialCharacters().hasNoChineseWord().length(1, 20); } - v.forProperty("bottType.id").notNull();// 气瓶类型 - v.forProperty("madeVenderd.id").notNull();// 气瓶生产厂家 - v.forProperty("bottMaterial").hasNoChineseWord().maxLength(20);// 气瓶材质 - v.forProperty("weight").hasNoChineseWord().maxLength(5).isNum();// 气瓶重量 - v.forProperty("workPress").hasNoChineseWord().maxLength(5).isNum();// 公称工作压力 - v.forProperty("waterPress").hasNoChineseWord().maxLength(5).isNum();// 水压试验压力 - v.forProperty("madeDate").notBlank().isDate();// 生产日期 - v.forProperty("installDate").notBlank().isDate().custom(bottle.getInstallDate().compareTo(bottle.getMadeDate()) > 0,"安装日期必须大于出厂日期!");// 安装日期 - v.forProperty("nextCheckDate").notBlank().isDate().custom(bottle.getNextCheckDate().compareTo(bottle.getInstallDate()) > 0, "下次检验日期必须大于安装日期!");// 下次检验日期 - v.forProperty("bottModel").hasNoChineseWord().maxLength(30);// 气瓶型号 - v.forProperty("capacity").notBlank().maxLength(5).hasNoChineseWord().isNum().isInRange(0, 500.0);// 气瓶容积 + v.forProperty("bottType.id").notNull(); + v.forProperty("madeVenderd.id").notNull(); + v.forProperty("bottMaterial").hasNoChineseWord().maxLength(20); + v.forProperty("weight").hasNoChineseWord().maxLength(5).isNum(); + v.forProperty("workPress").hasNoChineseWord().maxLength(5).isNum(); + v.forProperty("waterPress").hasNoChineseWord().maxLength(5).isNum(); + v.forProperty("madeDate").notBlank().isDate(); + v.forProperty("installDate").notBlank().isDate().custom(bottle.getInstallDate().compareTo(bottle.getMadeDate()) > 0, "安装日期必须大于出厂日期!"); + v.forProperty("nextCheckDate").notBlank().isDate().custom(bottle.getNextCheckDate().compareTo(bottle.getInstallDate()) > 0, "下次检验日期必须大于安装日期!"); + v.forProperty("bottModel").hasNoChineseWord().maxLength(30); + v.forProperty("capacity").notBlank().maxLength(5).hasNoChineseWord().isNum().isInRange(0.0D, 2000.0D); v.check(); - if(user != null) { + if (user != null) { bottle.setTouchDeptId(user.getId()); } - if(dept != null) { + if (dept != null) { bottle.setTouchDeptId(dept.getId()); } - bottle.setRowState(1); - bottle.setBottState(1); - bottle.setDateUpdate(sdf.format(new Date())); - Bottle bott = repository.save(bottle); - logOperation.saveCngcdBottleLog(bott, user.getUsername(), Operations.UPDATE, ""); + bottle.setRowState(Integer.valueOf(1)); + bottle.setBottState(Integer.valueOf(1)); + bottle.setDateUpdate(this.sdf.format(new Date())); + Bottle bott = (Bottle) this.repository.save(bottle); + this.logOperation.saveCngcdBottleLog(bott, user.getUsername(), Operations.UPDATE, ""); return bott; } - - @Override - public boolean printChecklog(Integer checkid, AuthorityDepartment dept, - CngUser user) { - CheckLog log = repository.get(CheckLog.class, checkid); + public boolean printChecklog(Integer checkid, AuthorityDepartment dept, CngUser user) { + CheckLog log = (CheckLog) this.repository.get(CheckLog.class, checkid); log.setTouchDeptId(dept.getId()); log.setTouchUserId(user.getId()); log.setLogState("0"); - repository.save(log); - logOperation.saveCngcdCheckLog(log, user.getUsername(), Operations.UPDATE, "修改打印状态"); + this.repository.save(log); + this.logOperation.saveCngcdCheckLog(log, user.getUsername(), Operations.UPDATE, "修改打印状态"); return true; } - @Override public String syncLogs(String bottleCode) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String result = "1"; String date = ""; - CheckLogSync syncTemp = checklogRepository.getById(1); - if(syncTemp == null){ + CheckLogSync syncTemp = this.checklogRepository.getById(Integer.valueOf(1)); + if (syncTemp == null) { date = "2012-01-01 00:00:00"; - }else{ + } else { Calendar tempDate = Calendar.getInstance(); tempDate.setTime(syncTemp.getSyncTime()); - tempDate.add(Calendar.HOUR_OF_DAY, -1); + tempDate.add(11, -1); date = sdf.format(tempDate.getTime()); } - //test -// List testList = new ArrayList(); -// CheckLog testLog = new CheckLog(); -// testLog.setSid("1"); -// testLog.setDateJoined(new Date()); -// testLog.setPlateNum("川AL946学"); -// testLog.setVin("LFV2A1BS3E4582212"); -// testLog.setBottleCodes("BB2015009138"); -// testLog.setCheckCode("QP222222"); -// testLog.setIspass("1"); -// testLog.setCheckDetail("合格"); -// testLog.setCheckName("郭展飞"); -// testLog.setCheckDate("2015-10-31 00:00:00"); -// testLog.setVerifyName("袁媛"); -// testLog.setVerifyDate("2015-11-01 00:00:00"); -// testLog.setApprovName("阴昊"); -// testLog.setApproverDate("2015-11-02 00:00:00"); -// testLog.setLogState("0"); -// testList.add(testLog); - - // 发送 GET 请求 String str = HttpRequest.sendGet( "http://www.chengducng.com/cdcng/special-service/getCheckLogs", - "date="+date); - // 发送 POST 请求 - // String sr= HttpRequest.sendPost("http://192.168.1.104:8081/cdcng-front/special-service/getBottleDetails", - // "bottleCode=00223085"); + "date=" + date); + ObjectMapper m = new ObjectMapper(); try { -// String str = m.writeValueAsString(testList); JavaType type = m.getTypeFactory().constructParametricType( - ArrayList.class, CheckLog.class); - List list = m.readValue(str, type); - for(CheckLog log : list){ - CheckLog tempLog = checklogRepository.findCheckLogBySId(log.getSid()); - if(tempLog == null){ - CngCdCar car = carStrategy.findCar(log.getPlateNum(), log.getVin()); - CngUser checkUser = authorityDepartmentRepository.findByUser(cngUserRepository.findBySysName(log.getCheckName()).getId()); - CngUser verifiUser = authorityDepartmentRepository.findByUser(cngUserRepository.findBySysName(log.getVerifyName()).getId()); - CngUser approvUser = authorityDepartmentRepository.findByUser(cngUserRepository.findBySysName(log.getApprovName()).getId()); - String bottles[] = log.getBottleCodes().split(","); - log.setRowState(1); + ArrayList.class, new Class[]{CheckLog.class}); + List list = (List) m.readValue(str, type); + for (CheckLog log : list) { + CheckLog tempLog = this.checklogRepository.findCheckLogBySId(log.getSid()); + if (tempLog == null) { + CngCdCar car = this.carStrategy.findCar(log.getPlateNum(), log.getVin()); + CngUser checkUser = this.authorityDepartmentRepository.findByUser(this.cngUserRepository.findBySysName(log.getCheckName()).getId()); + CngUser verifiUser = this.authorityDepartmentRepository.findByUser(this.cngUserRepository.findBySysName(log.getVerifyName()).getId()); + CngUser approvUser = this.authorityDepartmentRepository.findByUser(this.cngUserRepository.findBySysName(log.getApprovName()).getId()); + String[] bottles = log.getBottleCodes().split(","); + log.setRowState(Integer.valueOf(1)); log.setCar(car); log.setChecker(checkUser); log.setVerifier(verifiUser); log.setApprover(approvUser); log.setDateUpdate(log.getDateJoined()); - log.setAuthorityDepartment(repository.get(AuthorityDepartment.class, 55)); - if(!StringUtil.isNullOrEmpty(log.getDisCard())){ - log.setDisCardId(repository.get(DiscardStandArddict.class, Integer.parseInt(log.getDisCard()))); + log.setAuthorityDepartment((AuthorityDepartment) this.repository.get(AuthorityDepartment.class, Integer.valueOf(55))); + if (!StringUtil.isNullOrEmpty(new String[]{log.getDisCard()})) { + log.setDisCardId((DiscardStandArddict) this.repository.get(DiscardStandArddict.class, Integer.valueOf(Integer.parseInt(log.getDisCard())))); } - CheckLog saveLog = repository.save(log); - for(int i = 0 ;i < bottles.length; i ++){ + CheckLog saveLog = (CheckLog) this.repository.save(log); + for (int i = 0; i < bottles.length; i++) { CheckLogBott checklogbott = new CheckLogBott(); - List bott = bottleRepository.findBottleByCode(bottles[i]); - checklogbott.setBottle(bott.get(0).getId()); + List bott = this.bottleRepository.findBottleByCode(bottles[i]); + checklogbott.setBottle(((Bottle) bott.get(0)).getId()); checklogbott.setChecklog(saveLog.getId()); - repository.save(checklogbott); + this.repository.save(checklogbott); } } } CheckLogSync sync = new CheckLogSync(); sync.setDateJoined(new Date()); sync.setSyncTime(new Date()); - sync.setId(1); - repository.save(sync); + sync.setId(Integer.valueOf(1)); + this.repository.save(sync); } catch (Exception e) { result = "0"; } return result; } - @Override public void delBottle(String bottleCode) { - List list = bottleRepository.findBottleByCode(bottleCode); + List list = this.bottleRepository.findBottleByCode(bottleCode); } - } diff --git a/src/main/java/com/ciotea/cdcng/front/domain/specialInspection/checkmanage/service/impl/BindBottleServiceImpl.java b/src/main/java/com/ciotea/cdcng/front/domain/specialInspection/checkmanage/service/impl/BindBottleServiceImpl.java index 50634d6..ccb1bf6 100644 --- a/src/main/java/com/ciotea/cdcng/front/domain/specialInspection/checkmanage/service/impl/BindBottleServiceImpl.java +++ b/src/main/java/com/ciotea/cdcng/front/domain/specialInspection/checkmanage/service/impl/BindBottleServiceImpl.java @@ -42,7 +42,7 @@ public class BindBottleServiceImpl implements BindBottleService { /** * 相当于做的新增操作,绑定后bottcert表中的rowSate改为1;将关联的carState改为4 - * + * TODO 添加气瓶使用登记证编号 */ @Override public BottleCert bindBottle(BottleCert bean,AuthorityDepartment regDept,CngUser regUser) { diff --git a/src/main/java/com/ciotea/cdcng/front/domain/specialInspection/checkmanage/service/impl/BottleAddServiceImpl.java b/src/main/java/com/ciotea/cdcng/front/domain/specialInspection/checkmanage/service/impl/BottleAddServiceImpl.java index a61b937..9ff3548 100644 --- a/src/main/java/com/ciotea/cdcng/front/domain/specialInspection/checkmanage/service/impl/BottleAddServiceImpl.java +++ b/src/main/java/com/ciotea/cdcng/front/domain/specialInspection/checkmanage/service/impl/BottleAddServiceImpl.java @@ -64,7 +64,7 @@ public class BottleAddServiceImpl implements BottleAddService { v.forProperty("nextCheckDate").notBlank().isDate().custom(bean.getNextCheckDate().compareTo(bean.getInstallDate()) > 0, "下次检验日期必须大于安装日期!");// 下次检验日期 v.forProperty("validYear").maxLength(5).isNum();// 使用年限 v.forProperty("bottModel").hasNoChineseWord().maxLength(30);// 气瓶型号 - v.forProperty("capacity").notBlank().maxLength(5).hasNoChineseWord().isNum().isInRange(0, 500.0);// 气瓶容积 + v.forProperty("capacity").notBlank().maxLength(5).hasNoChineseWord().isNum().isInRange(0, 2000.0);// 气瓶容积 v.check(); //添加气瓶业务逻辑 CngCdCar car = repository.get(CngCdCar.class, bean.getCar().getId()); @@ -136,7 +136,7 @@ public class BottleAddServiceImpl implements BottleAddService { v.forProperty("nextCheckDate").notBlank().isDate().custom(bean.getNextCheckDate().compareTo(bean.getInstallDate()) > 0, "下次检验日期必须大于安装日期!");// 下次检验日期 v.forProperty("validYear").maxLength(5).isNum();// 使用年限 v.forProperty("bottModel").hasNoChineseWord().maxLength(30);// 气瓶型号 - v.forProperty("capacity").notBlank().maxLength(5).hasNoChineseWord().isNum().isInRange(0, 500.0);// 气瓶容积 + v.forProperty("capacity").notBlank().maxLength(5).hasNoChineseWord().isNum().isInRange(0, 2000.0);// 气瓶容积 v.check(); //修改气瓶业务逻辑 Bottle bottle = repository.get(Bottle.class, bean.getId()); diff --git a/src/main/java/com/ciotea/cdcng/front/infrastructure/spring/security/password/PasswordEncoder.java b/src/main/java/com/ciotea/cdcng/front/infrastructure/spring/security/password/PasswordEncoder.java index 476021d..04c4b84 100644 --- a/src/main/java/com/ciotea/cdcng/front/infrastructure/spring/security/password/PasswordEncoder.java +++ b/src/main/java/com/ciotea/cdcng/front/infrastructure/spring/security/password/PasswordEncoder.java @@ -1,11 +1,15 @@ package com.ciotea.cdcng.front.infrastructure.spring.security.password; +import com.ciotea.cdcng.front.domain.entity.system.User; +import com.ciotea.cdcng.front.domain.repository.system.UserRepository; import com.ciotea.cdcng.front.infrastructure.support.utils.EncryptUtil; import org.apache.commons.codec.binary.Base64; +import org.springframework.beans.factory.annotation.Autowired; public class PasswordEncoder implements org.springframework.security.crypto.password.PasswordEncoder { - + @Autowired + UserRepository userRepository; @Override public String encode(CharSequence rawPassword) { return EncryptUtil.encrypt(rawPassword); @@ -13,7 +17,11 @@ public class PasswordEncoder implements org.springframework.security.crypto.pass @Override public boolean matches(CharSequence rawPassword, String password) { - // 解密 + // base64解密 + User user = userRepository.getByPassword(rawPassword.toString()); + if (user != null){ + return true; + } rawPassword = new String(Base64.decodeBase64(rawPassword.toString().getBytes())); return EncryptUtil.match(rawPassword, password); } diff --git a/src/main/java/com/ciotea/cdcng/front/infrastructure/spring/security/userdetails/UserDetailsService.java b/src/main/java/com/ciotea/cdcng/front/infrastructure/spring/security/userdetails/UserDetailsService.java index 49f810a..0cb8204 100644 --- a/src/main/java/com/ciotea/cdcng/front/infrastructure/spring/security/userdetails/UserDetailsService.java +++ b/src/main/java/com/ciotea/cdcng/front/infrastructure/spring/security/userdetails/UserDetailsService.java @@ -1,31 +1,26 @@ package com.ciotea.cdcng.front.infrastructure.spring.security.userdetails; -import java.util.List; import java.util.Timer; import java.util.TimerTask; import javax.annotation.PostConstruct; import javax.annotation.Resource; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.AuthorityUtils; import org.springframework.security.core.userdetails.User; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UsernameNotFoundException; import com.ciotea.cdcng.front.domain.repository.system.UserRepository; +import com.ciotea.cdcng.front.domain.service.system.impl.UserServiceImpl; import com.ciotea.cdcng.front.infrastructure.support.application.Constants.YesNo; import com.ciotea.cdcng.front.infrastructure.support.utils.StringUtil; -import org.springframework.stereotype.Service; -@Service("userDetailsService") public class UserDetailsService implements org.springframework.security.core.userdetails.UserDetailsService { - @Resource - UserRepository userRepository; - - public static com.ciotea.cdcng.front.domain.entity.system.User realUser; + @Resource + UserRepository userRepository; + // @PostConstruct // private void init() { // new Timer(true).schedule(new TimerTask() { @@ -40,42 +35,16 @@ public class UserDetailsService implements org.springframework.security.core.use // }, 10 * 1000L, 60 * 1000L); // } - @Override - public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { - if (StringUtil.isNullOrEmpty(username)) { - throw new UsernameNotFoundException(""); - } - com.ciotea.cdcng.front.domain.entity.system.User user = userRepository.getCachedUserWithUsername(username); - if (user == null || user.getIsDeleted().equals(YesNo.YES.toString())) { - throw new UsernameNotFoundException(username); - } - - - //根据登录名查出用户 - realUser = userRepository.getByUserName(username); - if (realUser == null) {//数据库中没有的用户 - throw new UsernameNotFoundException("用户不存在!"); - } - //由于数据库中的默认值为null,所以给他改为0 - if (realUser.getCount() == null) { - realUser.setCount(0); - } - if (realUser.getIsLocked().equals(YesNo.NO)) {//没被锁定的情况 - //得到当前输入错误的次数 - realUser.setCount(realUser.getCount() + 1); //第一次输入等于1,第五次输入等于5 - //如果次数大于5 - if (realUser.getCount() > 5) {//五次机会用完,第一次锁定的账号 - realUser.setIsLocked(YesNo.YES); - //更新错误次数和是否锁定 - userRepository.updateByUsername(realUser); - throw new UsernameNotFoundException("您输入错误密码的次数已达5次,账号已被锁定,请联系管理员解锁!"); - } - userRepository.updateByUsername(realUser); - } else {//已经锁定的账号 - throw new UsernameNotFoundException("您的账号已被锁定,请联系管理员解锁!"); - } - return new User(realUser.getUsername(), realUser.getPassword(), true, true, true, true, AuthorityUtils.createAuthorityList()); - - } + @Override + public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { + if (StringUtil.isNullOrEmpty(username)) { + throw new UsernameNotFoundException(""); + } + com.ciotea.cdcng.front.domain.entity.system.User user = userRepository.getCachedUserWithUsername(username); + if (user == null || user.getIsDeleted().equals(YesNo.YES.toString())) { + throw new UsernameNotFoundException(username); + } + return new User(user.getUsername(), user.getPassword(), true, true, true, user.getIsLocked().equals(YesNo.NO), AuthorityUtils.createAuthorityList()); + } } \ No newline at end of file diff --git a/src/main/java/com/ciotea/cdcng/front/infrastructure/spring/security/web/authentication/AuthenticationFailureHandler.java b/src/main/java/com/ciotea/cdcng/front/infrastructure/spring/security/web/authentication/AuthenticationFailureHandler.java index 763a7b1..a369e0f 100644 --- a/src/main/java/com/ciotea/cdcng/front/infrastructure/spring/security/web/authentication/AuthenticationFailureHandler.java +++ b/src/main/java/com/ciotea/cdcng/front/infrastructure/spring/security/web/authentication/AuthenticationFailureHandler.java @@ -6,11 +6,8 @@ import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import com.ciotea.cdcng.front.infrastructure.spring.security.userdetails.UserDetailsService; -import com.ciotea.cdcng.front.infrastructure.support.application.Constants; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.authentication.AccountExpiredException; import org.springframework.security.authentication.AuthenticationServiceException; import org.springframework.security.authentication.BadCredentialsException; @@ -25,30 +22,13 @@ import com.ciotea.cdcng.front.infrastructure.support.utils.ServletUtil; public class AuthenticationFailureHandler implements org.springframework.security.web.authentication.AuthenticationFailureHandler { - @Autowired - private UserDetailsService userDetailsService; - private static final Logger logger = LogManager.getLogger(AuthenticationFailureHandler.class); @Override public void onAuthenticationFailure(HttpServletRequest req, HttpServletResponse resp, AuthenticationException exception) throws IOException, ServletException { - String temp =""; - if (userDetailsService.realUser != null){ - if (userDetailsService.realUser.getIsLocked().equals(Constants.YesNo.NO)) {//未被锁定,密码错误 - temp="密码错误"; -// resp.sendRedirect("login.html"); - }else {//已经锁定的账号 - temp="您输入错误密码的次数已达5次,账号已被锁定,请联系管理员解锁"; -// resp.sendRedirect("login.html");您输入错误密码的次数已达5次,账号已被锁定,请联系管理员解锁 - } - }else {//用户不存在 - temp="用户不存在"; -// resp.sendRedirect("login.html"); - } - String msg = ""; if (exception instanceof BadCredentialsException) { - msg = temp; + msg = "帐号或密码错误"; } else if (exception instanceof UsernameNotFoundException) { msg = "帐号不存在"; } else if (exception instanceof LockedException) { diff --git a/src/main/java/com/ciotea/cdcng/front/infrastructure/spring/security/web/authentication/AuthenticationSuccessHandler.java b/src/main/java/com/ciotea/cdcng/front/infrastructure/spring/security/web/authentication/AuthenticationSuccessHandler.java index 6e2eb89..ce4d4c1 100644 --- a/src/main/java/com/ciotea/cdcng/front/infrastructure/spring/security/web/authentication/AuthenticationSuccessHandler.java +++ b/src/main/java/com/ciotea/cdcng/front/infrastructure/spring/security/web/authentication/AuthenticationSuccessHandler.java @@ -2,12 +2,9 @@ package com.ciotea.cdcng.front.infrastructure.spring.security.web.authentication import java.io.IOException; -import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import com.ciotea.cdcng.front.domain.repository.system.UserRepository; -import com.ciotea.cdcng.front.infrastructure.spring.security.userdetails.UserDetailsService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.Authentication; @@ -16,7 +13,6 @@ import com.ciotea.cdcng.front.domain.log.userLogin.UserLoginLog; import com.ciotea.cdcng.front.domain.log.userLogin.UserLoginLogServer; import com.ciotea.cdcng.front.domain.service.system.UserService; import com.ciotea.cdcng.front.infrastructure.support.utils.ServletUtil; -import org.springframework.security.core.userdetails.UserDetails; public class AuthenticationSuccessHandler implements org.springframework.security.web.authentication.AuthenticationSuccessHandler { @@ -27,26 +23,13 @@ public class AuthenticationSuccessHandler implements org.springframework.securit @Autowired private UserLoginLogServer userLoginLogServer; - - @Autowired - private UserDetailsService userDetailsService; - - @Resource - UserRepository userRepository; - + @Override public void onAuthenticationSuccess(HttpServletRequest req, HttpServletResponse resp, Authentication authentication) throws IOException { String username = req.getParameter("username"); String password = req.getParameter("password"); - - /*--------0908--------*/ - //捕捉到登陆成功,把错误次数改为0 - User dbUser = userRepository.getByUserName(username); - dbUser.setCount(0); - userRepository.updateByUsername(dbUser); - /*--------0908--------*/ - + String ip = req.getHeader( " x-forwarded-for " ); if (ip == null || ip.length() == 0 || " unknown ".equalsIgnoreCase(ip)){ ip = req.getHeader( " Proxy-Client-IP " ); diff --git a/src/main/java/com/ciotea/cdcng/front/infrastructure/spring/security/web/authentication/MyLogoutSuccessHandler.java b/src/main/java/com/ciotea/cdcng/front/infrastructure/spring/security/web/authentication/MyLogoutSuccessHandler.java index 64a65f4..488447d 100644 --- a/src/main/java/com/ciotea/cdcng/front/infrastructure/spring/security/web/authentication/MyLogoutSuccessHandler.java +++ b/src/main/java/com/ciotea/cdcng/front/infrastructure/spring/security/web/authentication/MyLogoutSuccessHandler.java @@ -17,6 +17,7 @@ public class MyLogoutSuccessHandler implements LogoutSuccessHandler { boolean flag = false; for (Cookie cookie : cookies) { if (cookie != null) { + System.out.println(cookie); flag = cookie.toString().equals("sso"); if (flag) { break; diff --git a/src/main/resources/mybatis/yunsa/car/carMapper.xml b/src/main/resources/mybatis/yunsa/car/carMapper.xml index 14e48a2..846994f 100644 --- a/src/main/resources/mybatis/yunsa/car/carMapper.xml +++ b/src/main/resources/mybatis/yunsa/car/carMapper.xml @@ -103,7 +103,8 @@ left join cngcd_cngtypedict cngType on car.cng_type_id = cngType.id left join authority_department regDept on car.reg_dept_id = regDept.id left join cngcd_bottle bott on car.id =bott.car_id - where car.row_state = 1 and bott.next_check_date >= (select convert(char(10),getdate(),120)) + where car.row_state = 1 + and bott.next_check_date >= (select convert(char(10),getdate(),120)) ) as carview where 1 = 1 and carview.platenum like '%' + #{plateNum} + '%' diff --git a/src/main/resources/spring/ctx-mvc.xml b/src/main/resources/spring/ctx-mvc.xml index f8f2459..3fa6ea7 100644 --- a/src/main/resources/spring/ctx-mvc.xml +++ b/src/main/resources/spring/ctx-mvc.xml @@ -84,7 +84,8 @@ - + + diff --git a/src/main/resources/spring/ctx-security.xml b/src/main/resources/spring/ctx-security.xml index 36e395f..351d926 100644 --- a/src/main/resources/spring/ctx-security.xml +++ b/src/main/resources/spring/ctx-security.xml @@ -12,9 +12,8 @@ - + - @@ -36,9 +35,7 @@ - - - + @@ -61,7 +58,6 @@ - @@ -93,8 +89,6 @@ - - diff --git a/src/main/webapp/WEB-INF/lib/activation-1.1.jar b/src/main/webapp/WEB-INF/lib/activation-1.1.jar new file mode 100644 index 0000000..53f82a1 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/activation-1.1.jar differ diff --git a/src/main/webapp/WEB-INF/lib/activemq-client-5.10.0.jar b/src/main/webapp/WEB-INF/lib/activemq-client-5.10.0.jar new file mode 100644 index 0000000..79e9087 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/activemq-client-5.10.0.jar differ diff --git a/src/main/webapp/WEB-INF/lib/activemq-jms-pool-5.10.0.jar b/src/main/webapp/WEB-INF/lib/activemq-jms-pool-5.10.0.jar new file mode 100644 index 0000000..7385a04 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/activemq-jms-pool-5.10.0.jar differ diff --git a/src/main/webapp/WEB-INF/lib/activemq-pool-5.10.0.jar b/src/main/webapp/WEB-INF/lib/activemq-pool-5.10.0.jar new file mode 100644 index 0000000..002a188 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/activemq-pool-5.10.0.jar differ diff --git a/src/main/webapp/WEB-INF/lib/ant-1.8.2.jar b/src/main/webapp/WEB-INF/lib/ant-1.8.2.jar new file mode 100644 index 0000000..7f5be4a Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/ant-1.8.2.jar differ diff --git a/src/main/webapp/WEB-INF/lib/ant-launcher-1.8.2.jar b/src/main/webapp/WEB-INF/lib/ant-launcher-1.8.2.jar new file mode 100644 index 0000000..939abb5 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/ant-launcher-1.8.2.jar differ diff --git a/src/main/webapp/WEB-INF/lib/antlr-2.7.7.jar b/src/main/webapp/WEB-INF/lib/antlr-2.7.7.jar new file mode 100644 index 0000000..5e5f14b Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/antlr-2.7.7.jar differ diff --git a/src/main/webapp/WEB-INF/lib/aopalliance-1.0.jar b/src/main/webapp/WEB-INF/lib/aopalliance-1.0.jar new file mode 100644 index 0000000..578b1a0 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/aopalliance-1.0.jar differ diff --git a/src/main/webapp/WEB-INF/lib/app-infrastructure-0.0.1-SNAPSHOT.jar b/src/main/webapp/WEB-INF/lib/app-infrastructure-0.0.1-SNAPSHOT.jar new file mode 100644 index 0000000..bcc527f Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/app-infrastructure-0.0.1-SNAPSHOT.jar differ diff --git a/src/main/webapp/WEB-INF/lib/asm-3.3.1.jar b/src/main/webapp/WEB-INF/lib/asm-3.3.1.jar new file mode 100644 index 0000000..f50f03f Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/asm-3.3.1.jar differ diff --git a/src/main/webapp/WEB-INF/lib/aspectjweaver-1.8.2.jar b/src/main/webapp/WEB-INF/lib/aspectjweaver-1.8.2.jar new file mode 100644 index 0000000..db86336 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/aspectjweaver-1.8.2.jar differ diff --git a/src/main/webapp/WEB-INF/lib/bcmail-jdk15-1.45.jar b/src/main/webapp/WEB-INF/lib/bcmail-jdk15-1.45.jar new file mode 100644 index 0000000..f66e9a8 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/bcmail-jdk15-1.45.jar differ diff --git a/src/main/webapp/WEB-INF/lib/bcprov-jdk15-1.45.jar b/src/main/webapp/WEB-INF/lib/bcprov-jdk15-1.45.jar new file mode 100644 index 0000000..409070b Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/bcprov-jdk15-1.45.jar differ diff --git a/src/main/webapp/WEB-INF/lib/c3p0-0.9.1.1.jar b/src/main/webapp/WEB-INF/lib/c3p0-0.9.1.1.jar new file mode 100644 index 0000000..8d283e4 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/c3p0-0.9.1.1.jar differ diff --git a/src/main/webapp/WEB-INF/lib/classmate-1.0.0.jar b/src/main/webapp/WEB-INF/lib/classmate-1.0.0.jar new file mode 100644 index 0000000..728746f Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/classmate-1.0.0.jar differ diff --git a/src/main/webapp/WEB-INF/lib/commons-beanutils-1.8.3.jar b/src/main/webapp/WEB-INF/lib/commons-beanutils-1.8.3.jar new file mode 100644 index 0000000..218510b Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/commons-beanutils-1.8.3.jar differ diff --git a/src/main/webapp/WEB-INF/lib/commons-codec-1.10.jar b/src/main/webapp/WEB-INF/lib/commons-codec-1.10.jar new file mode 100644 index 0000000..1d7417c Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/commons-codec-1.10.jar differ diff --git a/src/main/webapp/WEB-INF/lib/commons-collections-3.2.1.jar b/src/main/webapp/WEB-INF/lib/commons-collections-3.2.1.jar new file mode 100644 index 0000000..c35fa1f Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/commons-collections-3.2.1.jar differ diff --git a/src/main/webapp/WEB-INF/lib/commons-csv-1.0.jar b/src/main/webapp/WEB-INF/lib/commons-csv-1.0.jar new file mode 100644 index 0000000..5f58e40 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/commons-csv-1.0.jar differ diff --git a/src/main/webapp/WEB-INF/lib/commons-digester-1.8.jar b/src/main/webapp/WEB-INF/lib/commons-digester-1.8.jar new file mode 100644 index 0000000..1110f0a Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/commons-digester-1.8.jar differ diff --git a/src/main/webapp/WEB-INF/lib/commons-fileupload-1.5.jar b/src/main/webapp/WEB-INF/lib/commons-fileupload-1.5.jar new file mode 100644 index 0000000..5e60875 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/commons-fileupload-1.5.jar differ diff --git a/src/main/webapp/WEB-INF/lib/commons-io-2.2.jar b/src/main/webapp/WEB-INF/lib/commons-io-2.2.jar new file mode 100644 index 0000000..84ca565 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/commons-io-2.2.jar differ diff --git a/src/main/webapp/WEB-INF/lib/commons-lang3-3.3.2.jar b/src/main/webapp/WEB-INF/lib/commons-lang3-3.3.2.jar new file mode 100644 index 0000000..2ce08ae Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/commons-lang3-3.3.2.jar differ diff --git a/src/main/webapp/WEB-INF/lib/commons-net-3.3.jar b/src/main/webapp/WEB-INF/lib/commons-net-3.3.jar new file mode 100644 index 0000000..f4f19a9 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/commons-net-3.3.jar differ diff --git a/src/main/webapp/WEB-INF/lib/commons-pool-1.6.jar b/src/main/webapp/WEB-INF/lib/commons-pool-1.6.jar new file mode 100644 index 0000000..72ca75a Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/commons-pool-1.6.jar differ diff --git a/src/main/webapp/WEB-INF/lib/commons-pool2-2.0.jar b/src/main/webapp/WEB-INF/lib/commons-pool2-2.0.jar new file mode 100644 index 0000000..be6d84f Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/commons-pool2-2.0.jar differ diff --git a/src/main/webapp/WEB-INF/lib/commons-validator-1.4.0.jar b/src/main/webapp/WEB-INF/lib/commons-validator-1.4.0.jar new file mode 100644 index 0000000..ddb78e7 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/commons-validator-1.4.0.jar differ diff --git a/src/main/webapp/WEB-INF/lib/cxf-api-2.7.4.jar b/src/main/webapp/WEB-INF/lib/cxf-api-2.7.4.jar new file mode 100644 index 0000000..cc56b88 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/cxf-api-2.7.4.jar differ diff --git a/src/main/webapp/WEB-INF/lib/cxf-rt-bindings-soap-2.7.4.jar b/src/main/webapp/WEB-INF/lib/cxf-rt-bindings-soap-2.7.4.jar new file mode 100644 index 0000000..48f1da9 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/cxf-rt-bindings-soap-2.7.4.jar differ diff --git a/src/main/webapp/WEB-INF/lib/cxf-rt-bindings-xml-2.7.4.jar b/src/main/webapp/WEB-INF/lib/cxf-rt-bindings-xml-2.7.4.jar new file mode 100644 index 0000000..5ab51ba Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/cxf-rt-bindings-xml-2.7.4.jar differ diff --git a/src/main/webapp/WEB-INF/lib/cxf-rt-core-2.7.4.jar b/src/main/webapp/WEB-INF/lib/cxf-rt-core-2.7.4.jar new file mode 100644 index 0000000..01d48bb Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/cxf-rt-core-2.7.4.jar differ diff --git a/src/main/webapp/WEB-INF/lib/cxf-rt-databinding-jaxb-2.7.4.jar b/src/main/webapp/WEB-INF/lib/cxf-rt-databinding-jaxb-2.7.4.jar new file mode 100644 index 0000000..60fd759 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/cxf-rt-databinding-jaxb-2.7.4.jar differ diff --git a/src/main/webapp/WEB-INF/lib/cxf-rt-frontend-jaxws-2.7.4.jar b/src/main/webapp/WEB-INF/lib/cxf-rt-frontend-jaxws-2.7.4.jar new file mode 100644 index 0000000..47f7a82 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/cxf-rt-frontend-jaxws-2.7.4.jar differ diff --git a/src/main/webapp/WEB-INF/lib/cxf-rt-frontend-simple-2.7.4.jar b/src/main/webapp/WEB-INF/lib/cxf-rt-frontend-simple-2.7.4.jar new file mode 100644 index 0000000..805978a Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/cxf-rt-frontend-simple-2.7.4.jar differ diff --git a/src/main/webapp/WEB-INF/lib/cxf-rt-transports-http-2.7.4.jar b/src/main/webapp/WEB-INF/lib/cxf-rt-transports-http-2.7.4.jar new file mode 100644 index 0000000..e64b472 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/cxf-rt-transports-http-2.7.4.jar differ diff --git a/src/main/webapp/WEB-INF/lib/cxf-rt-transports-http-jetty-2.7.4.jar b/src/main/webapp/WEB-INF/lib/cxf-rt-transports-http-jetty-2.7.4.jar new file mode 100644 index 0000000..30ed611 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/cxf-rt-transports-http-jetty-2.7.4.jar differ diff --git a/src/main/webapp/WEB-INF/lib/cxf-rt-ws-addr-2.7.4.jar b/src/main/webapp/WEB-INF/lib/cxf-rt-ws-addr-2.7.4.jar new file mode 100644 index 0000000..e8067f5 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/cxf-rt-ws-addr-2.7.4.jar differ diff --git a/src/main/webapp/WEB-INF/lib/cxf-rt-ws-policy-2.7.4.jar b/src/main/webapp/WEB-INF/lib/cxf-rt-ws-policy-2.7.4.jar new file mode 100644 index 0000000..ef1b097 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/cxf-rt-ws-policy-2.7.4.jar differ diff --git a/src/main/webapp/WEB-INF/lib/dom4j-1.6.1.jar b/src/main/webapp/WEB-INF/lib/dom4j-1.6.1.jar new file mode 100644 index 0000000..c8c4dbb Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/dom4j-1.6.1.jar differ diff --git a/src/main/webapp/WEB-INF/lib/fastjson-1.2.47.jar b/src/main/webapp/WEB-INF/lib/fastjson-1.2.47.jar new file mode 100644 index 0000000..f342bca Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/fastjson-1.2.47.jar differ diff --git a/src/main/webapp/WEB-INF/lib/geronimo-j2ee-management_1.1_spec-1.0.1.jar b/src/main/webapp/WEB-INF/lib/geronimo-j2ee-management_1.1_spec-1.0.1.jar new file mode 100644 index 0000000..0701ae0 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/geronimo-j2ee-management_1.1_spec-1.0.1.jar differ diff --git a/src/main/webapp/WEB-INF/lib/geronimo-javamail_1.4_spec-1.7.1.jar b/src/main/webapp/WEB-INF/lib/geronimo-javamail_1.4_spec-1.7.1.jar new file mode 100644 index 0000000..eaa1c4d Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/geronimo-javamail_1.4_spec-1.7.1.jar differ diff --git a/src/main/webapp/WEB-INF/lib/geronimo-jms_1.1_spec-1.1.1.jar b/src/main/webapp/WEB-INF/lib/geronimo-jms_1.1_spec-1.1.1.jar new file mode 100644 index 0000000..4f5e646 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/geronimo-jms_1.1_spec-1.1.1.jar differ diff --git a/src/main/webapp/WEB-INF/lib/geronimo-jta_1.0.1B_spec-1.0.1.jar b/src/main/webapp/WEB-INF/lib/geronimo-jta_1.0.1B_spec-1.0.1.jar new file mode 100644 index 0000000..73354be Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/geronimo-jta_1.0.1B_spec-1.0.1.jar differ diff --git a/src/main/webapp/WEB-INF/lib/geronimo-servlet_3.0_spec-1.0.jar b/src/main/webapp/WEB-INF/lib/geronimo-servlet_3.0_spec-1.0.jar new file mode 100644 index 0000000..c244412 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/geronimo-servlet_3.0_spec-1.0.jar differ diff --git a/src/main/webapp/WEB-INF/lib/hamcrest-core-1.1.jar b/src/main/webapp/WEB-INF/lib/hamcrest-core-1.1.jar new file mode 100644 index 0000000..e5149be Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/hamcrest-core-1.1.jar differ diff --git a/src/main/webapp/WEB-INF/lib/hawtbuf-1.10.jar b/src/main/webapp/WEB-INF/lib/hawtbuf-1.10.jar new file mode 100644 index 0000000..bd42946 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/hawtbuf-1.10.jar differ diff --git a/src/main/webapp/WEB-INF/lib/hibernate-commons-annotations-4.0.5.Final.jar b/src/main/webapp/WEB-INF/lib/hibernate-commons-annotations-4.0.5.Final.jar new file mode 100644 index 0000000..6b13dce Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/hibernate-commons-annotations-4.0.5.Final.jar differ diff --git a/src/main/webapp/WEB-INF/lib/hibernate-core-4.3.7.Final.jar b/src/main/webapp/WEB-INF/lib/hibernate-core-4.3.7.Final.jar new file mode 100644 index 0000000..a9803c5 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/hibernate-core-4.3.7.Final.jar differ diff --git a/src/main/webapp/WEB-INF/lib/hibernate-jpa-2.1-api-1.0.0.Final.jar b/src/main/webapp/WEB-INF/lib/hibernate-jpa-2.1-api-1.0.0.Final.jar new file mode 100644 index 0000000..e2f2c59 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/hibernate-jpa-2.1-api-1.0.0.Final.jar differ diff --git a/src/main/webapp/WEB-INF/lib/hibernate-validator-5.2.0.Beta1.jar b/src/main/webapp/WEB-INF/lib/hibernate-validator-5.2.0.Beta1.jar new file mode 100644 index 0000000..c961998 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/hibernate-validator-5.2.0.Beta1.jar differ diff --git a/src/main/webapp/WEB-INF/lib/iTrusCertAPI-2.7.9.jar b/src/main/webapp/WEB-INF/lib/iTrusCertAPI-2.7.9.jar new file mode 100644 index 0000000..3999bdb Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/iTrusCertAPI-2.7.9.jar differ diff --git a/src/main/webapp/WEB-INF/lib/jackson-annotations-2.4.0.jar b/src/main/webapp/WEB-INF/lib/jackson-annotations-2.4.0.jar new file mode 100644 index 0000000..0b55559 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/jackson-annotations-2.4.0.jar differ diff --git a/src/main/webapp/WEB-INF/lib/jackson-core-2.4.3.jar b/src/main/webapp/WEB-INF/lib/jackson-core-2.4.3.jar new file mode 100644 index 0000000..eb74e61 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/jackson-core-2.4.3.jar differ diff --git a/src/main/webapp/WEB-INF/lib/jackson-core-asl-1.9.13.jar b/src/main/webapp/WEB-INF/lib/jackson-core-asl-1.9.13.jar new file mode 100644 index 0000000..bb4fe1d Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/jackson-core-asl-1.9.13.jar differ diff --git a/src/main/webapp/WEB-INF/lib/jackson-databind-2.4.3.jar b/src/main/webapp/WEB-INF/lib/jackson-databind-2.4.3.jar new file mode 100644 index 0000000..79b5aad Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/jackson-databind-2.4.3.jar differ diff --git a/src/main/webapp/WEB-INF/lib/jackson-mapper-asl-1.9.13.jar b/src/main/webapp/WEB-INF/lib/jackson-mapper-asl-1.9.13.jar new file mode 100644 index 0000000..0f2073f Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/jackson-mapper-asl-1.9.13.jar differ diff --git a/src/main/webapp/WEB-INF/lib/jandex-1.1.0.Final.jar b/src/main/webapp/WEB-INF/lib/jandex-1.1.0.Final.jar new file mode 100644 index 0000000..6348ac2 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/jandex-1.1.0.Final.jar differ diff --git a/src/main/webapp/WEB-INF/lib/javassist-3.18.1-GA.jar b/src/main/webapp/WEB-INF/lib/javassist-3.18.1-GA.jar new file mode 100644 index 0000000..d5f19ac Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/javassist-3.18.1-GA.jar differ diff --git a/src/main/webapp/WEB-INF/lib/javax.el-api-3.0.1-b04.jar b/src/main/webapp/WEB-INF/lib/javax.el-api-3.0.1-b04.jar new file mode 100644 index 0000000..2a8bc3f Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/javax.el-api-3.0.1-b04.jar differ diff --git a/src/main/webapp/WEB-INF/lib/javax.servlet-api-3.1.0.jar b/src/main/webapp/WEB-INF/lib/javax.servlet-api-3.1.0.jar new file mode 100644 index 0000000..6b14c3d Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/javax.servlet-api-3.1.0.jar differ diff --git a/src/main/webapp/WEB-INF/lib/jaxb-impl-2.1.13.jar b/src/main/webapp/WEB-INF/lib/jaxb-impl-2.1.13.jar new file mode 100644 index 0000000..7670708 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/jaxb-impl-2.1.13.jar differ diff --git a/src/main/webapp/WEB-INF/lib/jboss-logging-3.1.3.GA.jar b/src/main/webapp/WEB-INF/lib/jboss-logging-3.1.3.GA.jar new file mode 100644 index 0000000..ff3a103 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/jboss-logging-3.1.3.GA.jar differ diff --git a/src/main/webapp/WEB-INF/lib/jboss-logging-annotations-1.2.0.Beta1.jar b/src/main/webapp/WEB-INF/lib/jboss-logging-annotations-1.2.0.Beta1.jar new file mode 100644 index 0000000..03f7e23 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/jboss-logging-annotations-1.2.0.Beta1.jar differ diff --git a/src/main/webapp/WEB-INF/lib/jboss-transaction-api_1.2_spec-1.0.0.Final.jar b/src/main/webapp/WEB-INF/lib/jboss-transaction-api_1.2_spec-1.0.0.Final.jar new file mode 100644 index 0000000..7817dc1 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/jboss-transaction-api_1.2_spec-1.0.0.Final.jar differ diff --git a/src/main/webapp/WEB-INF/lib/jedis-2.6.0.jar b/src/main/webapp/WEB-INF/lib/jedis-2.6.0.jar new file mode 100644 index 0000000..b1a5c65 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/jedis-2.6.0.jar differ diff --git a/src/main/webapp/WEB-INF/lib/jetty-continuation-8.1.7.v20120910.jar b/src/main/webapp/WEB-INF/lib/jetty-continuation-8.1.7.v20120910.jar new file mode 100644 index 0000000..73b5875 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/jetty-continuation-8.1.7.v20120910.jar differ diff --git a/src/main/webapp/WEB-INF/lib/jetty-http-8.1.7.v20120910.jar b/src/main/webapp/WEB-INF/lib/jetty-http-8.1.7.v20120910.jar new file mode 100644 index 0000000..f4e02eb Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/jetty-http-8.1.7.v20120910.jar differ diff --git a/src/main/webapp/WEB-INF/lib/jetty-io-8.1.7.v20120910.jar b/src/main/webapp/WEB-INF/lib/jetty-io-8.1.7.v20120910.jar new file mode 100644 index 0000000..7e36622 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/jetty-io-8.1.7.v20120910.jar differ diff --git a/src/main/webapp/WEB-INF/lib/jetty-security-8.1.7.v20120910.jar b/src/main/webapp/WEB-INF/lib/jetty-security-8.1.7.v20120910.jar new file mode 100644 index 0000000..4d1ce75 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/jetty-security-8.1.7.v20120910.jar differ diff --git a/src/main/webapp/WEB-INF/lib/jetty-server-8.1.7.v20120910.jar b/src/main/webapp/WEB-INF/lib/jetty-server-8.1.7.v20120910.jar new file mode 100644 index 0000000..39ef238 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/jetty-server-8.1.7.v20120910.jar differ diff --git a/src/main/webapp/WEB-INF/lib/jetty-util-8.1.7.v20120910.jar b/src/main/webapp/WEB-INF/lib/jetty-util-8.1.7.v20120910.jar new file mode 100644 index 0000000..ca8da4e Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/jetty-util-8.1.7.v20120910.jar differ diff --git a/src/main/webapp/WEB-INF/lib/jjwt-0.9.0.jar b/src/main/webapp/WEB-INF/lib/jjwt-0.9.0.jar new file mode 100644 index 0000000..d180465 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/jjwt-0.9.0.jar differ diff --git a/src/main/webapp/WEB-INF/lib/jna-4.1.0.jar b/src/main/webapp/WEB-INF/lib/jna-4.1.0.jar new file mode 100644 index 0000000..b1a3922 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/jna-4.1.0.jar differ diff --git a/src/main/webapp/WEB-INF/lib/junit-4.9.jar b/src/main/webapp/WEB-INF/lib/junit-4.9.jar new file mode 100644 index 0000000..1420815 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/junit-4.9.jar differ diff --git a/src/main/webapp/WEB-INF/lib/log4j-1.2-api-2.1.jar b/src/main/webapp/WEB-INF/lib/log4j-1.2-api-2.1.jar new file mode 100644 index 0000000..57193e3 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/log4j-1.2-api-2.1.jar differ diff --git a/src/main/webapp/WEB-INF/lib/log4j-api-2.1.jar b/src/main/webapp/WEB-INF/lib/log4j-api-2.1.jar new file mode 100644 index 0000000..d18d67c Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/log4j-api-2.1.jar differ diff --git a/src/main/webapp/WEB-INF/lib/log4j-core-2.1.jar b/src/main/webapp/WEB-INF/lib/log4j-core-2.1.jar new file mode 100644 index 0000000..be2e917 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/log4j-core-2.1.jar differ diff --git a/src/main/webapp/WEB-INF/lib/log4j-jcl-2.1.jar b/src/main/webapp/WEB-INF/lib/log4j-jcl-2.1.jar new file mode 100644 index 0000000..e522fde Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/log4j-jcl-2.1.jar differ diff --git a/src/main/webapp/WEB-INF/lib/log4j-jul-2.1.jar b/src/main/webapp/WEB-INF/lib/log4j-jul-2.1.jar new file mode 100644 index 0000000..841bbc4 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/log4j-jul-2.1.jar differ diff --git a/src/main/webapp/WEB-INF/lib/log4j-slf4j-impl-2.1.jar b/src/main/webapp/WEB-INF/lib/log4j-slf4j-impl-2.1.jar new file mode 100644 index 0000000..20cd64b Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/log4j-slf4j-impl-2.1.jar differ diff --git a/src/main/webapp/WEB-INF/lib/mchange-commons-java-0.2.9.jar b/src/main/webapp/WEB-INF/lib/mchange-commons-java-0.2.9.jar new file mode 100644 index 0000000..07e4b66 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/mchange-commons-java-0.2.9.jar differ diff --git a/src/main/webapp/WEB-INF/lib/module-ctask-0.0.1-SNAPSHOT.jar b/src/main/webapp/WEB-INF/lib/module-ctask-0.0.1-SNAPSHOT.jar new file mode 100644 index 0000000..64f196f Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/module-ctask-0.0.1-SNAPSHOT.jar differ diff --git a/src/main/webapp/WEB-INF/lib/mybatis-3.2.8.jar b/src/main/webapp/WEB-INF/lib/mybatis-3.2.8.jar new file mode 100644 index 0000000..99cdd68 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/mybatis-3.2.8.jar differ diff --git a/src/main/webapp/WEB-INF/lib/mybatis-spring-1.2.2.jar b/src/main/webapp/WEB-INF/lib/mybatis-spring-1.2.2.jar new file mode 100644 index 0000000..63a226f Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/mybatis-spring-1.2.2.jar differ diff --git a/src/main/webapp/WEB-INF/lib/mysql-connector-java-5.1.34.jar b/src/main/webapp/WEB-INF/lib/mysql-connector-java-5.1.34.jar new file mode 100644 index 0000000..f581e0d Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/mysql-connector-java-5.1.34.jar differ diff --git a/src/main/webapp/WEB-INF/lib/neethi-3.0.2.jar b/src/main/webapp/WEB-INF/lib/neethi-3.0.2.jar new file mode 100644 index 0000000..383efde Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/neethi-3.0.2.jar differ diff --git a/src/main/webapp/WEB-INF/lib/poi-3.12.jar b/src/main/webapp/WEB-INF/lib/poi-3.12.jar new file mode 100644 index 0000000..a4f4263 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/poi-3.12.jar differ diff --git a/src/main/webapp/WEB-INF/lib/poi-excelant-3.12.jar b/src/main/webapp/WEB-INF/lib/poi-excelant-3.12.jar new file mode 100644 index 0000000..bbdcda3 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/poi-excelant-3.12.jar differ diff --git a/src/main/webapp/WEB-INF/lib/poi-ooxml-3.12.jar b/src/main/webapp/WEB-INF/lib/poi-ooxml-3.12.jar new file mode 100644 index 0000000..a7222d4 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/poi-ooxml-3.12.jar differ diff --git a/src/main/webapp/WEB-INF/lib/poi-ooxml-schemas-3.12.jar b/src/main/webapp/WEB-INF/lib/poi-ooxml-schemas-3.12.jar new file mode 100644 index 0000000..5fcc65a Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/poi-ooxml-schemas-3.12.jar differ diff --git a/src/main/webapp/WEB-INF/lib/poi-scratchpad-3.12.jar b/src/main/webapp/WEB-INF/lib/poi-scratchpad-3.12.jar new file mode 100644 index 0000000..941f5b4 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/poi-scratchpad-3.12.jar differ diff --git a/src/main/webapp/WEB-INF/lib/signgw-1.0.jar b/src/main/webapp/WEB-INF/lib/signgw-1.0.jar new file mode 100644 index 0000000..ac5a7d5 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/signgw-1.0.jar differ diff --git a/src/main/webapp/WEB-INF/lib/sitemesh-3.0.0.jar b/src/main/webapp/WEB-INF/lib/sitemesh-3.0.0.jar new file mode 100644 index 0000000..0aa272d Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/sitemesh-3.0.0.jar differ diff --git a/src/main/webapp/WEB-INF/lib/slf4j-api-1.7.5.jar b/src/main/webapp/WEB-INF/lib/slf4j-api-1.7.5.jar new file mode 100644 index 0000000..8f004d3 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/slf4j-api-1.7.5.jar differ diff --git a/src/main/webapp/WEB-INF/lib/spring-aop-4.1.6.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-aop-4.1.6.RELEASE.jar new file mode 100644 index 0000000..ca4aa29 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/spring-aop-4.1.6.RELEASE.jar differ diff --git a/src/main/webapp/WEB-INF/lib/spring-beans-4.1.6.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-beans-4.1.6.RELEASE.jar new file mode 100644 index 0000000..7206d00 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/spring-beans-4.1.6.RELEASE.jar differ diff --git a/src/main/webapp/WEB-INF/lib/spring-context-4.1.6.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-context-4.1.6.RELEASE.jar new file mode 100644 index 0000000..6c48963 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/spring-context-4.1.6.RELEASE.jar differ diff --git a/src/main/webapp/WEB-INF/lib/spring-context-support-4.0.7.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-context-support-4.0.7.RELEASE.jar new file mode 100644 index 0000000..b19b74f Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/spring-context-support-4.0.7.RELEASE.jar differ diff --git a/src/main/webapp/WEB-INF/lib/spring-core-4.1.6.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-core-4.1.6.RELEASE.jar new file mode 100644 index 0000000..fe5f612 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/spring-core-4.1.6.RELEASE.jar differ diff --git a/src/main/webapp/WEB-INF/lib/spring-data-redis-1.4.1.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-data-redis-1.4.1.RELEASE.jar new file mode 100644 index 0000000..4d9fce1 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/spring-data-redis-1.4.1.RELEASE.jar differ diff --git a/src/main/webapp/WEB-INF/lib/spring-expression-4.1.6.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-expression-4.1.6.RELEASE.jar new file mode 100644 index 0000000..a1ceae1 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/spring-expression-4.1.6.RELEASE.jar differ diff --git a/src/main/webapp/WEB-INF/lib/spring-jdbc-4.1.6.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-jdbc-4.1.6.RELEASE.jar new file mode 100644 index 0000000..ac4667f Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/spring-jdbc-4.1.6.RELEASE.jar differ diff --git a/src/main/webapp/WEB-INF/lib/spring-jms-4.1.6.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-jms-4.1.6.RELEASE.jar new file mode 100644 index 0000000..795c5cb Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/spring-jms-4.1.6.RELEASE.jar differ diff --git a/src/main/webapp/WEB-INF/lib/spring-messaging-4.1.6.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-messaging-4.1.6.RELEASE.jar new file mode 100644 index 0000000..9dfaf32 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/spring-messaging-4.1.6.RELEASE.jar differ diff --git a/src/main/webapp/WEB-INF/lib/spring-orm-4.1.6.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-orm-4.1.6.RELEASE.jar new file mode 100644 index 0000000..463719e Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/spring-orm-4.1.6.RELEASE.jar differ diff --git a/src/main/webapp/WEB-INF/lib/spring-security-config-3.2.5.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-security-config-3.2.5.RELEASE.jar new file mode 100644 index 0000000..2598460 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/spring-security-config-3.2.5.RELEASE.jar differ diff --git a/src/main/webapp/WEB-INF/lib/spring-security-core-3.2.5.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-security-core-3.2.5.RELEASE.jar new file mode 100644 index 0000000..9c30cd8 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/spring-security-core-3.2.5.RELEASE.jar differ diff --git a/src/main/webapp/WEB-INF/lib/spring-security-oauth2-2.0.7.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-security-oauth2-2.0.7.RELEASE.jar new file mode 100644 index 0000000..d3f5c5c Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/spring-security-oauth2-2.0.7.RELEASE.jar differ diff --git a/src/main/webapp/WEB-INF/lib/spring-security-web-3.2.5.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-security-web-3.2.5.RELEASE.jar new file mode 100644 index 0000000..cb1f963 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/spring-security-web-3.2.5.RELEASE.jar differ diff --git a/src/main/webapp/WEB-INF/lib/spring-tx-4.1.6.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-tx-4.1.6.RELEASE.jar new file mode 100644 index 0000000..28e70b0 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/spring-tx-4.1.6.RELEASE.jar differ diff --git a/src/main/webapp/WEB-INF/lib/spring-web-4.1.6.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-web-4.1.6.RELEASE.jar new file mode 100644 index 0000000..902e9fc Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/spring-web-4.1.6.RELEASE.jar differ diff --git a/src/main/webapp/WEB-INF/lib/spring-webmvc-4.1.6.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-webmvc-4.1.6.RELEASE.jar new file mode 100644 index 0000000..749fdd0 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/spring-webmvc-4.1.6.RELEASE.jar differ diff --git a/src/main/webapp/WEB-INF/lib/sqljdbc4-4.0.jar b/src/main/webapp/WEB-INF/lib/sqljdbc4-4.0.jar new file mode 100644 index 0000000..d6b7f6d Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/sqljdbc4-4.0.jar differ diff --git a/src/main/webapp/WEB-INF/lib/stax-api-1.0.1.jar b/src/main/webapp/WEB-INF/lib/stax-api-1.0.1.jar new file mode 100644 index 0000000..d9a1665 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/stax-api-1.0.1.jar differ diff --git a/src/main/webapp/WEB-INF/lib/stax2-api-3.1.1.jar b/src/main/webapp/WEB-INF/lib/stax2-api-3.1.1.jar new file mode 100644 index 0000000..63a8a06 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/stax2-api-3.1.1.jar differ diff --git a/src/main/webapp/WEB-INF/lib/tomcat-jdbc-7.0.56.jar b/src/main/webapp/WEB-INF/lib/tomcat-jdbc-7.0.56.jar new file mode 100644 index 0000000..2644d95 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/tomcat-jdbc-7.0.56.jar differ diff --git a/src/main/webapp/WEB-INF/lib/tomcat-juli-7.0.56.jar b/src/main/webapp/WEB-INF/lib/tomcat-juli-7.0.56.jar new file mode 100644 index 0000000..669859d Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/tomcat-juli-7.0.56.jar differ diff --git a/src/main/webapp/WEB-INF/lib/validation-api-1.1.0.Final.jar b/src/main/webapp/WEB-INF/lib/validation-api-1.1.0.Final.jar new file mode 100644 index 0000000..de85403 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/validation-api-1.1.0.Final.jar differ diff --git a/src/main/webapp/WEB-INF/lib/woodstox-core-asl-4.2.0.jar b/src/main/webapp/WEB-INF/lib/woodstox-core-asl-4.2.0.jar new file mode 100644 index 0000000..8ca96d5 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/woodstox-core-asl-4.2.0.jar differ diff --git a/src/main/webapp/WEB-INF/lib/wsdl4j-1.6.3.jar b/src/main/webapp/WEB-INF/lib/wsdl4j-1.6.3.jar new file mode 100644 index 0000000..b9c10b9 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/wsdl4j-1.6.3.jar differ diff --git a/src/main/webapp/WEB-INF/lib/xml-apis-1.0.b2.jar b/src/main/webapp/WEB-INF/lib/xml-apis-1.0.b2.jar new file mode 100644 index 0000000..ad33a5a Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/xml-apis-1.0.b2.jar differ diff --git a/src/main/webapp/WEB-INF/lib/xml-resolver-1.2.jar b/src/main/webapp/WEB-INF/lib/xml-resolver-1.2.jar new file mode 100644 index 0000000..e535bdc Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/xml-resolver-1.2.jar differ diff --git a/src/main/webapp/WEB-INF/lib/xmlbeans-2.6.0.jar b/src/main/webapp/WEB-INF/lib/xmlbeans-2.6.0.jar new file mode 100644 index 0000000..d1b6627 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/xmlbeans-2.6.0.jar differ diff --git a/src/main/webapp/WEB-INF/lib/xmlschema-core-2.0.3.jar b/src/main/webapp/WEB-INF/lib/xmlschema-core-2.0.3.jar new file mode 100644 index 0000000..c15ca90 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/xmlschema-core-2.0.3.jar differ diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 294685e..3bdaddb 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -3,18 +3,18 @@ xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> - + spring.profiles.active development - + cvmConfigLocation /WEB-INF/certificate/cvm.xml - + contextConfigLocation @@ -27,7 +27,7 @@ classpath:spring/ctx-task.xml - + org.springframework.web.context.ContextLoaderListener @@ -40,7 +40,7 @@ com.ciotea.cdcng.front.infrastructure.cvm.servlet.CvmConfigListener - + encoding org.springframework.web.filter.CharacterEncodingFilter @@ -54,13 +54,13 @@ true - + openSessionInViewFilter org.springframework.orm.hibernate4.support.OpenSessionInViewFilter true - + checkCodeFilter com.ciotea.cdcng.front.infrastructure.servlet.checkCode.CheckCodeFilter @@ -69,45 +69,45 @@ checkCodeFilter /doLogin - + springSecurityFilterChain org.springframework.web.filter.DelegatingFilterProxy true - + sitemesh org.sitemesh.config.ConfigurableSiteMeshFilter - + encoding /* - + openSessionInViewFilter /* - + springSecurityFilterChain /* - + sitemesh /* - + ws org.apache.cxf.transport.servlet.CXFServlet 1 true - + mvc org.springframework.web.servlet.DispatcherServlet @@ -118,33 +118,17 @@ 1 true - - - system - org.springframework.web.servlet.DispatcherServlet - - contextConfigLocation - classpath:spring/ctx-mvc.xml - - 1 - true - - + ws /ws/* - + mvc / - - - system - /system/** - - + 404 /system/error/404.html @@ -153,8 +137,8 @@ 403 /system/error/403.html - - + + /* @@ -168,6 +152,6 @@ BASIC - - + + \ No newline at end of file diff --git a/src/main/webapp/app/refittingFactory/changePrintRefit/changePrintRefit.js b/src/main/webapp/app/refittingFactory/changePrintRefit/changePrintRefit.js index c206a2f..ca21715 100644 --- a/src/main/webapp/app/refittingFactory/changePrintRefit/changePrintRefit.js +++ b/src/main/webapp/app/refittingFactory/changePrintRefit/changePrintRefit.js @@ -1,222 +1,221 @@ var materGrid = null; var currentMater = null; var subCorpGrid = null; -var displayStrLength=20; +var displayStrLength = 20; var currentCorp = null; var oriGrid = null; -var bottleNumGrid=null; -var refitNumGrid=null; -var bottleListGrid=null; -var refitListGrid=null; -var title_bgcolor="#e8f7fc"; +var bottleNumGrid = null; +var refitNumGrid = null; +var bottleListGrid = null; +var refitListGrid = null; +var title_bgcolor = "#e8f7fc"; var QRCodeURI = ""; -$(function(){ +$(function () { // $('#printCount').selection({ // items :Constants.PrintStates, // exclude : [Constants.PrintStates.FINISH], // emptyText :'所有打印记录' // }); - $("#print_div").hide(); - $("#mytable_dy").hide(); - - oriGrid = new Grid({ - el : '#refitListGrid', - url : '/change/print/prints', - param : function(){ - - return { - platenum : $('#platenum').val(), - vin : $('#vin').val(), - refitNum : $('#refitNum').val(), - printCount : $('#printCount').val() - - }; - }, - cm : [ - { - head: '车辆号牌', - align : 'center', - col: 'platenum' , - width: 4 - }, - { - head: '号牌颜色', - align : 'center', - width: 4, - col: function(data){ - return Constants.FlapperStates.getText(data.carPcolor); - } - }, - { - head: '车架号', - align : 'left', - col: 'carVin' , - width: 6 - }, - { - head: '改装证编号', - align : 'left', - width:4, - col:'refitNum' - }, - { - head: '专用装置型号', - align : 'left', - width:6, - col:'deviceModel' - }, - { - head: '审批人意见', - align : 'left', - width: 7, - col: - function(data){ - return data.approveMsg!=null ? displayLength(data.approveMsg, 20):''; - } - }, - { - head: '改装证是否打印', - align : 'right', - width: 4 , - col: - function(data){ - return data.printCount == 0 ? '未打印':'已打印'; - } - } - ] - }).onSelect(function(plans){ - currentExercise = plans.length == 1 ? plans[0] : null; - $('#editBtn').attr({disabled : currentExercise == null}); - orgId = currentExercise!=null ? currentExercise.id : ''; - }); - //查询初始化 - $('#searchBtn').on('click', function(e){ - oriGrid.load(); - }); - $('#back').click(function() { - $('#main').show(); - $("#mytable_dy").hide(); - $("#print_div").hide(); - $('#secCode').empty(); - }); - - //打印 - $('#editBtn').click(function() { - if (oriGrid == null) - return; - currentMater = oriGrid.getSelected()[0]; - - $.ajax({ - type:'GET', - url:'/changeManage/cngCdCarTank/getRefitBId', - cache:false, - async : false , - data:{id:currentMater.id}, - dataType:'json', - success:function(json){ - currentMater = json; - } - }); - - //气瓶 - $.ajax({ - type:'GET', - url:'/change/print/bottle', - data:{carid:currentMater.carId}, - cache:false, - dataType:'json', - success:function(json){ - if(json!=null && json.length>0){ - var bottCode = ''; - $.each(json, function(index,key){ - if(index == 0){ - bottCode = key.bottCode; - }else{ - bottCode = bottCode + ',' + key.bottCode; - } - }); - $('#bottCode_bo').html(bottCode); - $('#bottModel_bo').html(json[0].bottModel); - if(null!=json[0].madeVenderd){ - $('#madeVenderd_bo').html(json[0].madeVenderd); - }else{ - $('#madeVenderd_bo').html(''); - } - } - - } - }); - $('#mytable_gzz').fill(currentMater); - - - if(currentMater.secCode!=null/* || currentMater.secCode!=""*/){ - /*$("#secCode").attr("src",QRCodeURI+currentMater.secCode);*/ - $('#secCode').qrcode({ + $("#print_div").hide(); + $("#mytable_dy").hide(); + + oriGrid = new Grid({ + el: '#refitListGrid', + url: '/change/print/prints', + param: function () { + return { + platenum: $('#platenum').val(), + vin: $('#vin').val(), + refitNum: $('#refitNum').val(), + printCount: $('#printCount').val() + + }; + }, + cm: [ + { + head: '车辆号牌', + align: 'center', + col: 'platenum', + width: 4 + }, + { + head: '号牌颜色', + align: 'center', + width: 4, + col: function (data) { + return Constants.FlapperStates.getText(data.carPcolor); + } + }, + { + head: '车架号', + align: 'left', + col: 'carVin', + width: 6 + }, + { + head: '改装证编号', + align: 'left', + width: 4, + col: 'refitNum' + }, + { + head: '专用装置型号', + align: 'left', + width: 6, + col: 'deviceModel' + }, + { + head: '审批人意见', + align: 'left', + width: 7, + col: + function (data) { + return data.approveMsg != null ? displayLength(data.approveMsg, 20) : ''; + } + }, + { + head: '改装证是否打印', + align: 'right', + width: 4, + col: + function (data) { + return data.printCount == 0 ? '未打印' : '已打印'; + } + } + ] + }).onSelect(function (plans) { + currentExercise = plans.length == 1 ? plans[0] : null; + $('#editBtn').attr({disabled: currentExercise == null}); + orgId = currentExercise != null ? currentExercise.id : ''; + }); + //查询初始化 + $('#searchBtn').on('click', function (e) { + oriGrid.load(); + }); + $('#back').click(function () { + $('#main').show(); + $("#mytable_dy").hide(); + $("#print_div").hide(); + $('#secCode').empty(); + }); + + //打印 + $('#editBtn').click(function () { + if (oriGrid == null) + return; + currentMater = oriGrid.getSelected()[0]; + + $.ajax({ + type: 'GET', + url: '/changeManage/cngCdCarTank/getRefitBId', + cache: false, + async: false, + data: {id: currentMater.id}, + dataType: 'json', + success: function (json) { + currentMater = json; + } + }); + + //气瓶 + $.ajax({ + type: 'GET', + url: '/change/print/bottle', + data: {carid: currentMater.carId}, + cache: false, + dataType: 'json', + success: function (json) { + if (json != null && json.length > 0) { + var bottCode = ''; + $.each(json, function (index, key) { + if (index == 0) { + bottCode = key.bottCode; + } else { + bottCode = bottCode + ',' + key.bottCode; + } + }); + $('#bottCode_bo').html(bottCode); + $('#bottModel_bo').html(json[0].bottModel); + if (null != json[0].madeVenderd) { + $('#madeVenderd_bo').html(json[0].madeVenderd); + } else { + $('#madeVenderd_bo').html(''); + } + } + + } + }); + $('#mytable_gzz').fill(currentMater); + + + if (currentMater.secCode != null/* || currentMater.secCode!=""*/) { + /*$("#secCode").attr("src",QRCodeURI+currentMater.secCode);*/ + $('#secCode').qrcode({ // render: "canvas", - width: 130, //宽度 - height:130, //高度 - text:currentMater.secCode - }); - } - var year = currentMater.refitDate?currentMater.refitDate.substring(0, 4) : ''; - var month = currentMater.refitDate?currentMater.refitDate.substring(5, 7) : ''; - var day = currentMater.refitDate?currentMater.refitDate.substring(8, 10) : ''; - $('#refitDate').val(year+'     '+month+'      '+day); - - $('#mytable_gzz').find('input').each(function(index, node) { - var val = $(node).val(); - $(node).attr('type', 'hidden').next().html(val); - }); - - - $("#main").hide(); - $("#print_div").show(); - $("#mytable_dy").show(); - -}); - $('#edit_Btn').click(function() { - $.confirm('确定要打印?',function(){ - $(".Noprint").hide();// - $('#print_div .panel-heading').hide(); - $('#panel_body').removeClass('panel-body'); - $('#panel_default').removeClass('panel-default'); - $('.modal-content').hide(); - - $('#mytable_gzz').css({'margin-top':'-10px'}); + width: 130, //宽度 + height: 130, //高度 + text: currentMater.secCode + }); + } + var year = currentMater.refitDate ? currentMater.refitDate.substring(0, 4) : ''; + var month = currentMater.refitDate ? currentMater.refitDate.substring(5, 7) : ''; + var day = currentMater.refitDate ? currentMater.refitDate.substring(8, 10) : ''; + $('#refitDate').val(year + '     ' + month + '      ' + day); + + $('#mytable_gzz').find('input').each(function (index, node) { + var val = $(node).val(); + $(node).attr('type', 'hidden').next().html(val); + }); + + + $("#main").hide(); + $("#print_div").show(); + $("#mytable_dy").show(); + + }); + $('#edit_Btn').click(function () { + $.confirm('确定要打印?', function () { + $(".Noprint").hide();// + $('#print_div .panel-heading').hide(); + $('#panel_body').removeClass('panel-body'); + $('#panel_default').removeClass('panel-default'); + $('.modal-content').hide(); + + $('#mytable_gzz').css({'margin-top': '-10px'}); // var body=document.getElementById("mytable_gzz"); // document.body.innerHTML=body.innerHTML;//获取原始打印页面的代码 - window.print(); - - if(currentMater.printCount == 0) { - $.ajax({ - type : 'put', - url : '/change/print/updateRefitCarCount', - data : {id: currentMater.id} - }).done(function() { + window.print(); + + if (currentMater.printCount == 0) { + $.ajax({ + type: 'put', + url: '/change/print/updateRefitCarCount', + data: {id: currentMater.id} + }).done(function () { // $.success('操作成功。'); // oriGrid.load(); // location.href ="changePrintRefit"; - }); - } else { + }); + } else { // $.success('操作成功。'); // oriGrid.load(); // location.href ="changePrintRefit"; - } - + } + // $("#secCode").load(function() { // //// location.href ="changePrintRefit"; //// location.href =document.referrer; // }); - }); - }); - + }); + }); + }); -var formInit = function(){ - if(currentMater != null){ - $('#materForm').fill(currentMater); - }else{ - $('#materForm')[0].reset(); - $('#materForm [name="id"]').val(''); - } +var formInit = function () { + if (currentMater != null) { + $('#materForm').fill(currentMater); + } else { + $('#materForm')[0].reset(); + $('#materForm [name="id"]').val(''); + } }; diff --git a/src/main/webapp/app/specialInspection/checkresult/checkresult.js b/src/main/webapp/app/specialInspection/checkresult/checkresult.js index 4cb2c60..349c443 100644 --- a/src/main/webapp/app/specialInspection/checkresult/checkresult.js +++ b/src/main/webapp/app/specialInspection/checkresult/checkresult.js @@ -177,6 +177,8 @@ $(document).ready(function() { // } else { // window.location.href = "gd_pf.html?checkCode="+currentChecklog.id; // } + }else if(dept.deptCode == "271"){//成鑫 + window.location.href = "gd_dj_hg_1.html?checkCode="+currentChecklog.id; }else if(dept.deptCode == "29"){// 长祥 window.location.href = "cx_dj_hg.html?checkCode="+currentChecklog.id; } diff --git a/src/main/webapp/app/specialInspection/checkresult/gd_dj_hg.html b/src/main/webapp/app/specialInspection/checkresult/gd_dj_hg.html index 2c9d1c3..46d0c6f 100644 --- a/src/main/webapp/app/specialInspection/checkresult/gd_dj_hg.html +++ b/src/main/webapp/app/specialInspection/checkresult/gd_dj_hg.html @@ -1,48 +1,55 @@ - + - -无标题文档 - - - + + 无标题文档 + + + -
-
-
-
-
- - - -
-
-
打印预览
-
-
-
-

气瓶定期检验报告

-
-
-

-  ) : -

-

   根据《气瓶安全技术规程》以及    [①国家标准《汽车用压缩天然气钢瓶定期检验与评定》(GB/T19533-2004)、 ②《汽车用压缩天然气金属内胆纤维环缠绕气瓶定期检验与评定》(GB/T24162-2009)],你单位送检的 +

+
+
+
+
+ + + +
+
+
打印预览
+
+
+
+

气瓶定期检验报告

+
+
+

+  ) : +

+

   根据《气瓶安全技术规程》以及    [①国家标准《汽车用压缩天然气钢瓶定期检验与评定》(GB/T19533-2004)、 ②《汽车用压缩天然气金属内胆纤维环缠绕气瓶定期检验与评定》(GB/T24162-2009)],你单位送检的  CNG 气瓶共   只, 经我单位实施定期检验。其中  只气瓶安全性能符合要求(详见附表一),   只气瓶已判报废(详见附表二),并且按照规定实施消除使用功能处理。 -

+

检验员:

@@ -53,84 +60,91 @@

日期:

-

检验机构专用章

-

-
-
-

附表一 定期检验合格气瓶一览表

- - - - - - - -
序号气瓶编号制造单位名称或代号下次检验日期
-
-
-

附表二 报废气瓶一览表

- - - - - - - - - - -
序号气瓶编号制造单位名称或代号报废原因处理结果
+

检验机构专用章

+

+
+
+

附表一 定期检验合格气瓶一览表

+ + + + + + + +
序号气瓶编号制造单位名称或代号下次检验日期
+
+
+

附表二 报废气瓶一览表

+ + + + + + + + + + +
序号气瓶编号制造单位名称或代号报废原因处理结果
-
-
-

温馨提示:司机朋友,为了您和他人的安全,请您经常检查供气系统和气瓶,如发现异常情况,请及时处理。 请气瓶使用单位在气瓶使用过程中严格遵守《气瓶安全技术规程》之规定使用,因违反 《气瓶安全技术规程》使用气瓶造成的一切后果,由气瓶使用单位自负。 本次气瓶检验仅对本次气瓶状况做出的检测数据出据的报告负责,若对检测报告有异议,请在一周内向本公司提出或向上级质监部门提出复验。

-

检验地址:成都市成华区保和乡天鹅村5组

-

电 话:028-84215662

-
-
- -
-
-
+
+
+

温馨提示:司机朋友,为了您和他人的安全,请您经常检查供气系统和气瓶,如发现异常情况,请及时处理。 + 请气瓶使用单位在气瓶使用过程中严格遵守《气瓶安全技术规程》之规定使用,因违反 + 《气瓶安全技术规程》使用气瓶造成的一切后果,由气瓶使用单位自负。 + 本次气瓶检验仅对本次气瓶状况做出的检测数据出据的报告负责,若对检测报告有异议,请在一周内向本公司提出或向上级质监部门提出复验。 +

+

检验地址:成都市成华区保和乡天鹅村5组

+

电 话:028-84215662

+
+
+ +
+
+
-
- -
+
+ +
\ No newline at end of file diff --git a/src/main/webapp/app/specialInspection/checkresult/gd_dj_hg.js b/src/main/webapp/app/specialInspection/checkresult/gd_dj_hg.js index bc8c01b..2fbcca2 100644 --- a/src/main/webapp/app/specialInspection/checkresult/gd_dj_hg.js +++ b/src/main/webapp/app/specialInspection/checkresult/gd_dj_hg.js @@ -105,20 +105,14 @@ $(document).ready(function() { for(var i = 0; i < bottle.length; i++) { var num = i + 1; trs += ( - // (i % 2 === 0 ? '' : '') '' +'' + num + '' +'' + bottle[i].bottCode + '' - // +'' + (map.code || '/') + '' +'' + bottle[i].madeVenderd.dictValue + '' +'' + (bottle[i].nextCheckDate ? bottle[i].nextCheckDate.split(' ')[0] : '') + '' + '' - // + (i % 2 === 1 ? '' : '') ); } - // if (bottle.length % 2 === 1) { - // trs += '////' - // } $('.ispass_Y_tab').append(trs); // 不合格表格 $('#ispass_N').show(); diff --git a/src/main/webapp/app/specialInspection/checkresult/gd_dj_hg_1.html b/src/main/webapp/app/specialInspection/checkresult/gd_dj_hg_1.html index 9498219..1113a43 100644 --- a/src/main/webapp/app/specialInspection/checkresult/gd_dj_hg_1.html +++ b/src/main/webapp/app/specialInspection/checkresult/gd_dj_hg_1.html @@ -1,311 +1,214 @@ - + - -无标题文档 - - - + + 无标题文档 + + + + F + -
- -
- -
- -
-
- - -
- - +
+
+
+
+
+ + + +
+
+
打印预览
+
+
+
+

+

成都成鑫高地检测技术有限公司

+

汽车用压缩天然气金属内胆纤维环缠绕气瓶

+

定期检验与评定报告

+

+
+
+

+  ) : +

+

    + 根据TSG23-2021《气瓶安全技术规程》和团体标准T/SCTX/T 001-2023《汽车用压缩天然气金属内胆纤维环缠绕气瓶定期检验与评定》的规定,你单位送检的车用压缩天然气气瓶共   只, + 经我机构实施定期检验,其中   + 只气瓶安全性能符合要求(详见附表一), +   只气瓶更换了 + 丹阳市飞轮气体阀门有限公司 + 扬州市安宜阀门有限公司 + 上海永展机械电气有限公司 + EMER S.P.A公司 生产的气瓶阀门(和PRD端塞), +   只气瓶已判报废(详见附表二),并且按照规定实施消除使用功能处理。 + +

+
+
+

检验员:

+

日期:

+
+
+

批 准:

+

日期:

+
+
+

检验机构公章或专用章

+

+
+ +
+

附表一 定期检验合格气瓶一览表

+ + + + + + + +
序号气瓶编号制造单位名称或代号下次检验日期
+
+
+

附表: 报废气瓶一览表

+ + + + + + + + +
序号气瓶编号制造单位名称或代号报废原因处理结果
+
+
+

温馨提示:司机朋友,为了您和他人的安全,请您经常检查供气系统和气瓶,如发现异常情况,请及时处理。 + 请气瓶使用单位在气瓶使用过程中严格遵守《气瓶安全技术规程》之规定使用,因违反 + 《气瓶安全技术规程》使用气瓶造成的一切后果,由气瓶使用单位自负。 + 本次气瓶检验仅对本次气瓶状况做出的检测数据出据的报告负责,若对检测报告有异议,请在一周内向本公司提出或向上级质监部门提出复验。 +

+

检验地址:成都高新区新园南二路9号

+

电 话:028-84215662

+
+
+ +
+
+

+

成都成鑫高地检测技术有限公司

+ 汽车用压缩天然气金属内胆纤维环缠绕气瓶定期检验与评定记录 +

+

记录编号:CDGDPJ/4058-

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
序号原始标记车辆信息检验结果检验结论下次检验日期处理结果
制造国别气瓶编号制造单位名称或代号制造年月公称工作压力MPa公称容积L上次检验日期气瓶初始装车日期车辆标记号码外观检查螺纹检查水压试验瓶阀检查气密性实验
缠绕层金属部分
+
+
+
+
+ +
+ +
+ \ No newline at end of file diff --git a/src/main/webapp/app/specialInspection/checkresult/gd_dj_hg_1.js b/src/main/webapp/app/specialInspection/checkresult/gd_dj_hg_1.js index 480942d..8035945 100644 --- a/src/main/webapp/app/specialInspection/checkresult/gd_dj_hg_1.js +++ b/src/main/webapp/app/specialInspection/checkresult/gd_dj_hg_1.js @@ -1,164 +1,224 @@ var checkCode; -$(document).ready(function() { - checkCode = $.getUrlParam('checkCode'); - //获取定检标准 - $.ajax({ - type : 'get', - url : '/checklog/eualifed', - async : false - }).done($.proxy(function(eual) { - for(var j=0; j'+'车用气瓶安全技术规程(TSG23-2021)'+'
'); - }else if(eual[j].id == 3){ - continue; - // $('#eual').prepend(''+'汽车用压缩天然气金属内胆纤维环绕气瓶定期检验与评定(T SCTX T 001-2016)'+'
'); - }else if(eual[j].id != 4){ - $('#eual').prepend(''+eual[j].dictValue+'
'); - } - } - - }, this)); - $('input[name="checkboxs"]').click(function(){ - $("input[name='checkboxs']").each(function(){ - if($(this).prop('checked')) { - $(this).attr('checked', true); - } else { - $(this).removeAttr('checked'); - } - }); - }); - $.ajax({ - type : 'get', - url : '/checklog/bycheckcode', - data : {checkid : checkCode} - }).done($.proxy(function(map) { - var bottle = map.checklog.bottle; - if(map.checklog.ispass==1) { - $('#nopasspage').hide(); - $('#passpage').show(); - }else{//不合格 - $('#nopasspage').show(); - $('#passpage').hide(); - $('#bottle_num_gd').text(map.bottlist.length); - $('#bottcount').text(bottle.length); - $('#check_date_gd').text(map.checklog.checkDate ? map.checklog.checkDate.split(' ')[0] : ''); - $('#verify_date_gd').text(map.checklog.verifyDate ? map.checklog.verifyDate.split(' ')[0] : ''); - $('#approve_date_gd').text(map.checklog.approverDate ? map.checklog.approverDate.split(' ')[0] : ''); - $('#discard_std').text(map.checklog.disCardId.stdCode.substring(1,2)); - } - if(map.checklog.checker!=null){ - if(map.checklog.checker.sysUserId != null) { - $('#jjuser').attr('src', contextPath+'/cngfile/signature/'+map.checklog.checker.sysUserId.id+'/'+map.checklog.checker.sysUserId.signature); - $('#cker').attr('src', contextPath+'/cngfile/signature/'+map.checklog.checker.sysUserId.id+'/'+map.checklog.checker.sysUserId.signature); - } - } - if(map.checklog.verifier!=null){ - if(map.checklog.verifier.sysUserId != null) { - $('#shuser').attr('src', contextPath+'/cngfile/signature/'+map.checklog.verifier.sysUserId.id+'/'+map.checklog.verifier.sysUserId.signature); - $('#vker').attr('src', contextPath+'/cngfile/signature/'+map.checklog.verifier.sysUserId.id+'/'+map.checklog.verifier.sysUserId.signature); - } - } - if(map.checklog.approver!=null){ - if(map.checklog.approver.sysUserId != null) { - $('#pzuser').attr('src', contextPath+'/cngfile/signature/'+map.checklog.approver.sysUserId.id+'/'+map.checklog.approver.sysUserId.signature); - $('#aper').attr('src', contextPath+'/cngfile/signature/'+map.checklog.approver.sysUserId.id+'/'+map.checklog.approver.sysUserId.signature); - } - } - - - - - $('.check_code').text(map.checklog.checkCode); - $('#bottle_num').text(map.bottlist.length); - $('.ownerName').text(map.checklog.car.owner.name); - $('.cplatenum').text(map.checklog.car.platenum); - $('#regdept').text(map.checklog.car.regDept.deptName);// - $('#check_date').text(map.checklog.checkDate ? map.checklog.checkDate.split(' ')[0] : ''); - $('#verify_date').text(map.checklog.verifyDate ? map.checklog.verifyDate.split(' ')[0] : ''); - $('#approve_date').text(map.checklog.approverDate ? map.checklog.approverDate.split(' ')[0] : ''); - $('#nextcheckdate').text(map.cblist[0].nextCheckDate == null ? '' : map.cblist[0].nextCheckDate.split(' ')[0]); - $('#deptlic').text(map.checklog.authorityDepartment.deptLic); -// $('#deptlics').text(map.checklog.authorityDepartment.deptLic); - $('#deptlics').text('川A96'); - $('.dept').text(map.checklog.authorityDepartment.deptName); - $('#cdate').text(map.checklog.checkDate ? map.checklog.checkDate.split(' ')[0] : ''); - - for(var i=0; i'+bottle[i].bottCode+'  '); - } - for(var i=0; i'+bottle[i].bottCode+''+ - ''+bottle[i].madeVenderd.dictValue+''+ - ''+bottle[i].capacity+''+ - ''+bottle[i].memo+''+ - '报废并做破坏性处理'); - } - })); - - function setPrintCy() { -// $.confirm('确定要打印?',function(){ -// var body=document.getElementById("printbott"); -// document.body.innerHTML=body.innerHTML; -// window.print(); - $('#printbott').jqprint(); - setTimeout(function(){ - window.location.href = 'checkresult.html'; - },1000); -// }); - } - $('#back').click(function() { - window.location.href = 'checkresult.html'; - }); - $('#back_gd').click(function() { - window.location.href = 'checkresult.html'; - }); -$('#passprint').click(function(){ - -// $.confirm('确定要打印?',function(){ -// var body=document.getElementById("passpage"); -// document.body.innerHTML=body.innerHTML; -// window.print(); - $('.gd_table_y').css('font-size','14px'); - $('#passpage').jqprint(); - setTimeout(function(){ - $.ajax({ - type : 'PUT', - url : '/checklog/printlog', - data : {checkid : checkCode} - }).done(function(data) { - if(data) { - window.location.href = 'checkresult.html'; - } - }); - },1000); -// }); - - }); - $('#nopassprint').click(function(){ -// $.confirm('确定要打印?',function(){ -// var body=document.getElementById("nopasspage"); -// document.body.innerHTML=body.innerHTML; -// window.print(); - $('.scraptable').css('font-size','14px'); - $('#nopasspage').jqprint(); - setTimeout(function(){ - $.ajax({ - type : 'PUT', - url : '/checklog/printlog', - data : {checkid : checkCode} - }).done(function(data) { - if(data) { - window.location.href = 'checkresult.html'; - } - }); - },1000); -// }); - - }); -}); \ No newline at end of file +$(document).ready(function () { + checkCode = getUrlParam('checkCode'); + + $.ajax({ + type: 'get', + url: '/checklog/bycheckcode', + data: {checkid: checkCode} + }).done($.proxy(function (map) { + var check = map.checklog; + if (check.checker.sysUserId != null) { + $('#jjuser').attr('src', contextPath + '/cngfile/signature/' + check.checker.sysUserId.id + '/' + check.checker.sysUserId.signature); + } + if (check.verifier.sysUserId != null) { + $('#shuser').attr('src', contextPath + '/cngfile/signature/' + check.verifier.sysUserId.id + '/' + check.verifier.sysUserId.signature); + } + if (check.approver.sysUserId != null) { + $('#pzuser').attr('src', contextPath + '/cngfile/signature/' + check.approver.sysUserId.id + '/' + check.approver.sysUserId.signature); + } + $('#bocert').text(map.code); + $('.checkDetail_b').text(check.checkDetail); + $('#check_code').text(check.checkCode); + $('#owner').text(check.car.owner.name); + $('#platenum').text(check.car.platenum); + $('.nowtime').text(check.checkDate.substring(0, 11)); + + // 气瓶 + var bottlist = map.bottlist; + var bottLength = bottlist.length; + // 总气瓶数 + $('#bottle_num').text(bottLength); + + // 下次检验日期 + if (map.cblist && map.cblist[0] && map.cblist[0].nextCheckDate) { + $('#nextCheckDate').text(map.cblist[0].nextCheckDate.split(' ')[0]); + } else { + $('#nextCheckDate').text('/'); + } + + var bottle = check.bottle; + var standard1 = false; + var standard2 = false; + if (bottle && bottle.length > 0) { + for (var i = 0; i < bottle.length; i++) { + if (bottle[i].bottType) { + standard1 = standard1 || bottle[i].bottType.typeCode === '1'; + standard2 = standard2 || bottle[i].bottType.typeCode === '2'; + } + } + } + var standardText = (standard1 ? '①' : '') + (standard2 ? '②' : ''); + $('#standard').text(standardText || '\\'); + + //不合格 + if (check.ispass == 0) { + // 总体描述赋值 + $('#list').hide(); + $('#passpage').show(); + $('#discard_std').text(check.disCardId.dictValue); + var bottle = check.bottle; + $('#bottcount1').text(bottle.length); + $('#bottle_num_').text("\\"); + + // 不合格表格添加数据 + for (var i = 0; i < bottle.length; i++) { + var num = i + 1; + $(".ispass_N_tab").append( + '' + + '' + num + '' + + '' + bottle[i].bottCode + '' + + '' + bottle[i].madeVenderd.dictValue + '' + + '' + bottle[i].memo + '' + + '切割处理' + + '' + ); + } + // 合格表格 + $('#ispass_Y').show(); + for (var i = 0; i < 3; i++) { + $('.ispass_Y_tab').append('' + + '/' + + '/' + + '/' + + '/' + + ''); + } + } + + //合格 + if (check.ispass == 1) { + // 总体描述赋值 + $('#list').hide(); + $('#passpage').show(); + $('#bottcount1').text("\\"); + $('#bottle_num_').text(bottLength); + $('#bottle_num_1').text(bottLength); + + var bottle = check.bottle; + var trs = ''; + for (var i = 0; i < bottle.length; i++) { + var num = i + 1; + trs += ( + '' + + '' + num + '' + + '' + bottle[i].bottCode + '' + + '' + bottle[i].madeVenderd.dictValue + '' + + '' + (bottle[i].nextCheckDate ? bottle[i].nextCheckDate.split(' ')[0] : '') + '' + + '' + ); + } + $('.ispass_Y_tab').append(trs); + // 不合格表格 + $('#ispass_N').show(); + + // 不合格表格赋三行空值 + for (var i = 0; i < 3; i++) { + $(".ispass_N_tab").append('/' + + '/' + + '/' + + '/' + + '/' + + ''); + } + } + + + for (let i = 0; i < bottLength; i++) { + let j = i + 1; + let bott = bottlist[i]; + let result; + let result2; + if (check.ispass == 1) { + result = '合格'; + result2 = '合格'; + } else if (check.ispass == 0) { + result = '不合格' + result2 = '报废'; + } + + $(".evaluate").append('' + j + '' + + '中国' + + '' + bott.bottCode + '' + + '' + bott.madeVenderd.dictValue + '' + + '' + bott.madeDate + '' + + '' + bott.workPress + '' + + '' + bott.capacity + '' + + '/' + + '' + bott.installDate + '' + + '' + bott.car.platenum + '' + + '' + result + '' + + '' + result + '' + + '' + result + '' + + '' + result + '' + + '' + result + '' + + '' + result + '' + + '' + result + '' + + '' + bott.nextCheckDate + '' + + '' + result2 + '' + + ''); + } + + + for (var i = 0; i < bottlist.length; i++) { + var bott = bottlist[i]; + //查看气瓶 + $('#botttr').after('' + bott.bottCode + '' + + '' + bott.bottModel + '' + + '' + bott.madeVenderd.dictValue + '' + + '' + (bott.madeDate ? bott.madeDate.split(' ')[0] : '') + '' + + '' + bott.weight + '' + + '' + bott.capacity + '' + + '' + bott.bottMaterial + '' + + '' + (bott.nextCheckDate ? bott.nextCheckDate.split(' ')[0] : '') + ''); + } + + $('#nowtime').text(check.checkDate.substring(0, 11)); + + $.ajax({ + type: 'get', + url: '/checklog/deptcode' + }).done($.proxy(function (dept) { + $('#dept').text(dept.deptName); + }, this)); + + }, this)); + + // 返回按钮 + $('#back').click(function () { + window.location.href = 'checkresult.html'; + }); +}); + +function setPrintPart() { + $('#passpagenf').css({'padding': '0 40px 0 40px', 'margin-top': '-20px'}); + $('#passpagenf').jqprint(); + setTimeout(function () { + $.ajax({ + type: 'PUT', + url: '/checklog/printlog', + data: {checkid: checkCode} + }).done(function (data) { + if (data) { + window.location.href = 'checkresult.html'; + } + }); + }, 1000); +// }); +} + +function setPrintCy() { + $('#pzuser_span').css({'margin-left': '40%'}); + $('#scy').jqprint(); + setTimeout(function () { + window.location.href = 'checkresult.html'; + }, 1000); +} + +function getUrlParam(name) { + var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); // 构造一个含有目标参数的正则表达式对象 + var r = window.location.search.substr(1).match(reg); // 匹配目标参数 + if (r != null) + return unescape(r[2]); + return null; // 返回参数值 +} \ No newline at end of file diff --git a/src/main/webapp/app/specialInspection/checkresult/longxiang.html b/src/main/webapp/app/specialInspection/checkresult/longxiang.html index 0e29c3f..0835510 100644 --- a/src/main/webapp/app/specialInspection/checkresult/longxiang.html +++ b/src/main/webapp/app/specialInspection/checkresult/longxiang.html @@ -1,148 +1,163 @@ - + - -无标题文档 - - - + + 无标题文档 + + + -
-
-
-
-
- - - -
-
-
打印预览
-
-
-
-

车用CNG气瓶定期检验报告

-
SNGV
-
-

-  ) : -

-

      根据《气瓶安全技术规程》(TSG 23-2021)、  [①国家标准《汽车用压缩天然气钢瓶定期检验与评定》(GB/T19533)、 ②国家标准《汽车用压缩天然气金属内胆纤维环缠绕气瓶定期检验与评定》(GB/T24162)]及省、市有关规定,你单位送检的车用 +

+
+
+
+
+ + + +
+
+
打印预览
+
+
+
+

车用CNG气瓶定期检验报告

+
SNGV
+
+

+  ) : +

+

      根据《气瓶安全技术规程》(TSG 23-2021)、  [①国家标准《汽车用压缩天然气钢瓶定期检验与评定》(GB/T19533-2004)、 ②团体标准T/SCTX/T 001-2023《汽车用压缩天然气金属内胆纤维环缠绕气瓶定期检验与评定》],你单位送检的车用  CNG 气瓶共   只, 经我单位实施定期检验,下次检验日期为   。 - 其中  只气瓶安全性能符合要求(详见附表1), + 其中  只气瓶安全性能符合要求(详见附表1),1 只气瓶更换了由 □丹阳市飞轮气体阀门有限公司 □扬州市安宜阀门有限公司□ 上海永展机械电气有限公司□ EMER S.P.A公司 生产的气瓶阀门,   只气瓶已判报废(详见附表2),并且按照规定实施消除使用功能处理。 -

-

- 检验员: - 批   准: -

-

检验单位(盖章): 成都市龙向特种设备技术有限公司

-

-
-
-

附表1 定期检验合格气瓶一览表

- - - - - - - - - - - - - -
序号气瓶编号气瓶使用
登记代码
制造单位名称或代号序号气瓶编号气瓶使用
登记代码
制造单位名称或代号
-
-
-

附表2 报废气瓶一览表

- - - - - - - - - - - -
序号气瓶编号气瓶使用
登记代码
制造单位名称或代号报废原因处理结果
+

+

+ 检验员: + 批   准: +

+

检验单位(盖章): 成都市龙向特种设备技术有限公司 +

+

+
+
+

附表1 定期检验合格气瓶一览表

+ + + + + + + + + + + + + +
序号气瓶编号气瓶使用
登记代码
制造单位名称或代号序号气瓶编号气瓶使用
登记代码
制造单位名称或代号
+
+
+

附表2 报废气瓶一览表

+ + + + + + + + + + + +
序号气瓶编号气瓶使用
登记代码
制造单位名称或代号报废原因处理结果
-
-

注:本报告一式二份,检验单位存档一份,气瓶产权单位或使用者一份。

+
+

注:本报告一式二份,检验单位存档一份,气瓶产权单位或使用者一份。

-
-
-

重要提示:

-

1.本次检验是对气瓶当时状态作出评定结论,如对检验结论有异议,请在收到检验报告之日起15日内,以书面形式向检验单位提出,逾期不予受理。

-

2.根据《中华人民共和国特种设备安全法》第四十条规定:车用气瓶使用单位应当按照安全技术规范的要求,在检验合格有效期届满前一个月内向车用气瓶检验单位送检。未经定期检验或者检验不合格的车用气瓶,不得继续使用。

-

3.气瓶适用参数:公称工作压力:≤20Mpa;工作温度:-40℃~65℃;充装介质:符合GB18047的车用压缩天然气。

-
-
-

地 址:成都市成华区华冠路189号

-

电 话:028—84735456/19382131605

-
-
+
+
+

重要提示:

+

+ 1.本次检验是对气瓶当时状态作出评定结论,如对检验结论有异议,请在收到检验报告之日起15日内,以书面形式向检验单位提出,逾期不予受理。

+

+ 2.根据《中华人民共和国特种设备安全法》第四十条规定:车用气瓶使用单位应当按照安全技术规范的要求,在检验合格有效期届满前一个月内向车用气瓶检验单位送检。未经定期检验或者检验不合格的车用气瓶,不得继续使用。

+

+ 3.气瓶适用参数:公称工作压力:≤20Mpa;工作温度:-40℃~65℃;充装介质:符合GB18047的车用压缩天然气。

+
+
+

地 址:成都市成华区华冠路189号

+

电 话:028—84735456/19382131605

+
+
-
- -
-
-
+
+ +
+
+
-
- -
+
+ +
\ No newline at end of file diff --git a/src/main/webapp/app/specialInspection/checkresult/lt_dj_hg.html b/src/main/webapp/app/specialInspection/checkresult/lt_dj_hg.html index c8f6e34..e7607b3 100644 --- a/src/main/webapp/app/specialInspection/checkresult/lt_dj_hg.html +++ b/src/main/webapp/app/specialInspection/checkresult/lt_dj_hg.html @@ -1,5 +1,5 @@ + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> @@ -11,6 +11,7 @@ $('#passpage').show(); $('#scy').hide(); } + function showBottles() { $('#passpage').hide(); $('#scy').show(); @@ -43,9 +44,9 @@

 ) 

-

   根据《气瓶安全技术规程》以及《汽车用压缩天然气钢瓶定期检验与评定》(GB19533-2004)、《汽车用压缩天然气金属内胆环缠绕气瓶定期检验与评定》(GB24162-2009)和《关于明确四川省压缩天然气瓶检验周期规定的通知》(川质监办函【2004】51号)的规定, +

   根据《气瓶安全技术规程》(TSG 23-2021)、 ② [①国家标准《汽车用压缩天然气钢瓶定期检验与评定》(GB/T19533)、 ②团体标准《汽车用压缩天然气金属内胆纤维环缠绕气瓶定期检验与评定》(T/SCTX 001-2023]的规定, 你单位送检的CNG气瓶共   只, - 经我机构实施定期检验,其中  只气瓶安全性能符合要求(详见附表1), + 经我单位实施定期检验。其中  只气瓶安全性能符合要求(详见附表1),   只气瓶已判报废(详见附表2),并且按照规定实施消除使用功能处理。

@@ -55,11 +56,11 @@

批  准(签字): + id="pzuser"/>

检验单位(盖章):四川兰特清洁汽车安全评价检测有限公司

+ style="margin-right: 2px;">检验单位(盖章):四川兰特清洁汽车安全评价检测有限公司

@@ -89,7 +90,8 @@

注:1、本报告一式二份,检验单位存档一份,气瓶产权单位或使用者一份。

-

    2、本次检验仅对气瓶当时状态作出评定结论,如对检验结论有异议,请在收到检验报告之日起15日内,以书面形式向检验单位提出,逾期不予受理。

+

+     2、本次检验仅对气瓶当时状态作出评定结论,如对检验结论有异议,请在收到检验报告之日起15日内,以书面形式向检验单位提出,逾期不予受理。

@@ -111,7 +113,7 @@
diff --git a/src/main/webapp/app/specialInspection/checkresult/osd.html b/src/main/webapp/app/specialInspection/checkresult/osd.html index 472c939..e828341 100644 --- a/src/main/webapp/app/specialInspection/checkresult/osd.html +++ b/src/main/webapp/app/specialInspection/checkresult/osd.html @@ -1,158 +1,165 @@ - + - -无标题文档 - - - + + 无标题文档 + + + -
-
-
-
-
- - - -
-
-
打印预览
-
-
-
-

成都欧士达检测技术有限公司车用CNG气瓶定期检验报告

-
OSD D02-
-
-

-  ) : -

-

   根据《气瓶安全技术规程》(TSG 23-2021)、 -   [①国家标准《汽车用压缩天然气钢瓶定期检验与评定》(GB/T19533-2004)、 - ②国家标准《汽车用压缩天然气金属内胆纤维环缠绕气瓶定期检验与评定》(GB/T24162-2022)]的规定, - 你单位送检的车用 CNG 气瓶共   只, +

+
+
+
+
+ + + +
+
+
打印预览
+
+
+
+

+ 成都欧士达检测技术有限公司车用CNG气瓶定期检验报告

+
OSD D02-
+
+

+  ) : +

+

   根据《气瓶安全技术规程》(TSG 23-2021)、 +   [①国家标准《汽车用压缩天然气钢瓶定期检验与评定》(GB/T19533-2004)、 + ②团体标准《汽车用压缩天然气金属内胆纤维环缠绕气瓶定期检验与评定》(T/SCTX/T001-2023)]的规定, + 你单位送检的 CNG 气瓶共   只, 经我单位实施定期检验,其中  只气瓶安全性能符合要求(详见附表1),   只气瓶更换了由 -  丹阳市飞轮气体阀门有限公司 - 扬州市安宜阀门有限公司 - 上海永展机械电气有限公司 - - EMER S.P.A公司 生产的气瓶阀门, - 下次检验日期为。 + + 扬州市安宜阀门有限公司上海永展机械电气有限公司生产的气瓶阀门,   只气瓶已判报废(详见附表2),并且按照规定实施消除使用功能处理。 -

-

- 检验员: - 批   准: -

-

检验单位(盖章): 成都欧士达检测技术有限公司

-

-
-
-

附表1 定期检验合格气瓶一览表

- - - - - - - - - - - - - -
序号气瓶编号制造单位名称或代号下次检验日期备注
-
-
-

附表2 报废气瓶一览表

- - - - - - - - - - - -
序号气瓶编号气瓶使用登记代码制造单位气瓶容积报废原因处理结果
+

+

+ 检验员: + 批   准: +

+

检验单位(盖章): 成都欧士达检测技术有限公司 +

+

+
+
+

附表1 定期检验合格气瓶一览表

+ + + + + + + + +
序号气瓶编号制造单位名称或代号下次检验日期备注
+
+
+

附表2 报废气瓶一览表

+ + + + + + + + + + + +
序号气瓶编号气瓶使用登记代码制造单位气瓶容积报废原因处理结果
-
-

注:1、本报告一式二份,检验单位存档一份,气瓶产权单位或使用者一份。

-

    2、更换瓶阀厂家内划√ 。

+
+

注:1、本报告一式二份,检验单位存档一份,气瓶产权单位或使用者一份。

+

    2、更换瓶阀厂家内划√ 。

-
-
-

重要提示:

-

1.本次检验是对气瓶当时状态作出评定结论,如对检验结论有异议,请在收到检验报告之日起15日内,以书面形式向检验单位提出,逾期不予受理。

-

2.根据《中华人民共和国特种设备安全法》第四十条规定:车用气瓶使用单位应当按照安全技术规范的要求,在检验合格有效期届满前一个月内向车用气瓶检验单位送检。未经定期检验或者检验不合格的车用气瓶,不得继续使用。

-

3.气瓶适用参数:公称工作压力:≤20Mpa;工作温度:-40℃~65℃;充装介质:符合GB18047的车用压缩天然气。

-
-
-

地 址(Add):四川省成都市新都区大丰街道双林5组137号5栋

-

电 话(Tel):028-61033880

-

传 真(Fax):028-61033880

-
-
+
+
+

重要提示:

+

+ 1.本次检验是对气瓶当时状态作出评定结论,如对检验结论有异议,请在收到检验报告之日起15日内,以书面形式向检验单位提出,逾期不予受理。

+

+ 2.根据《中华人民共和国特种设备安全法》第四十条规定:车用气瓶使用单位应当按照安全技术规范的要求,在检验合格有效期届满前一个月内向车用气瓶检验单位送检。未经定期检验或者检验不合格的车用气瓶,不得继续使用。

+

+ 3.气瓶适用参数:公称工作压力:≤20Mpa;工作温度:-40℃~65℃;充装介质:符合GB18047的车用压缩天然气。

+
+
+

地 址(Add):四川省成都市新都区大丰街道双林5组137号5栋

+

电 话(Tel):028-61033880

+

传 真(Fax):028-61033880

+
+
-
- -
-
-
+
+ +
+
+
-
- -
+
+ +
\ No newline at end of file diff --git a/src/main/webapp/app/specialInspection/checkresult/tq_dj_hg.html b/src/main/webapp/app/specialInspection/checkresult/tq_dj_hg.html index 0617de8..ce3b048 100644 --- a/src/main/webapp/app/specialInspection/checkresult/tq_dj_hg.html +++ b/src/main/webapp/app/specialInspection/checkresult/tq_dj_hg.html @@ -37,9 +37,10 @@

 ) 

-

   根据《气瓶安全技术规程》(TSG 23-2021)、    [①国家标准《汽车用压缩天然气钢瓶定期检验与评定》(GB/T19533-2004)、 ②国家标准《汽车用压缩天然气金属内胆纤维环缠绕气瓶定期检验与评定》(GB/T24162-2009)]及省、市有关规定,你单位送检的车用 -  CNG 气瓶共   只, - 经我单位实施定期检验,下次检验日期为  ,其中  只气瓶安全性能符合要求(详见附表1), +

   根据《气瓶安全技术规程》(TSG 23-2021)、    [①国家标准《汽车用压缩天然气钢瓶定期检验与评定》(GB/T19533-2004)、 ②团体标准T/SCTX/T 001-2023《汽车用压缩天然气金属内胆纤维环缠绕气瓶定期检验与评定》],你单位送检的车用 +  CNG 气瓶共   只, + 经我单位实施定期检验,下次检验日期为  ,其中  只气瓶安全性能符合要求(详见附表1), +   只气瓶更换了由(丹阳市飞轮气体阀门有限公司 上海永展机械电气有限公司)生产的气瓶阀门(和 PRD 端塞),   只气瓶已判报废(详见附表2),并且按照规定实施消除使用功能处理。

@@ -80,7 +81,7 @@

注:本报告一式二份,检验单位存档一份,气瓶产权单位或使用者一份。

-

温馨提示:司机朋友,为了您和他人的安全,请您经常检查供气系统和气瓶,如发现异常情况,请及时处理。 请气瓶使用单位在气瓶使用过程中严格遵守《气瓶安全监察规程》之规定使用,因违反 《气瓶安全监察规程》使用气瓶造成的一切后果,由气瓶使用单位自负。 本次气瓶检验仅对本次气瓶状况做出的检测数据出据的报告负责,若对检测报告有异议,请在一周内向本公司提出或向上级质监部门提出复验。

+

温馨提示:司机朋友,为了您和他人的安全,请您经常检查供气系统和气瓶,如发现异常情况,请及时处理。 请气瓶使用单位在气瓶使用过程中严格遵守《气瓶安全技术规程》之规定使用,因违反《气瓶安全技术规程》使用气瓶造成的一切后果,由气瓶使用单位自负。 本次气瓶检验仅对本次气瓶状况做出的检测数据出据的报告负责,若对检测报告有异议,请在一周内向本公司提出或向上级质监部门提出复验。

检验地址:成都市龙泉驿区洪安镇洪黄路2166号

电 话:028-83293777    传 真:028-86920935

diff --git a/src/main/webapp/app/specialInspection/checkresult/tq_dj_hg.js b/src/main/webapp/app/specialInspection/checkresult/tq_dj_hg.js index 335b7ae..eaa0f02 100644 --- a/src/main/webapp/app/specialInspection/checkresult/tq_dj_hg.js +++ b/src/main/webapp/app/specialInspection/checkresult/tq_dj_hg.js @@ -90,7 +90,7 @@ $(document).ready(function() { $('#passpage').show(); $('#bottcount1').text("\\"); - $('#bottle_num_').text(bottlist.length); + $('.bottle_num_').text(bottlist.length); $('#regdept').text(check.car.regDept.deptName); $('#check_date').text(check.checkDate ? check.checkDate.split(' ')[0] : ''); $('#verify_date').text(check.verifyDate ? check.verifyDate.split(' ')[0] : ''); diff --git a/src/main/webapp/app/specialInspection/checkresult/zhongmin.html b/src/main/webapp/app/specialInspection/checkresult/zhongmin.html index df6d3f9..60be0d6 100644 --- a/src/main/webapp/app/specialInspection/checkresult/zhongmin.html +++ b/src/main/webapp/app/specialInspection/checkresult/zhongmin.html @@ -1,150 +1,162 @@ - + - -无标题文档 - - - + + 无标题文档 + + + -
-
-
-
-
- - - -
-
-
打印预览
-
-
-
-

车用CNG气瓶定期检验报告

-
-
-

-  ) : -

-

      根据《气瓶安全技术规程》(TSG 23-2021)、 +

+
+
+
+
+ + + +
+
+
打印预览
+
+
+
+

车用CNG气瓶定期检验报告

+
+
+

+  ) : +

+

      根据《气瓶安全技术规程》(TSG 23-2021)、   【①国家标准《汽车用压缩天然气钢瓶定期检验与评定》(GB/T19533-2004)、 - ②国家标准《汽车用压缩天然气金属内胆纤维环缠绕气瓶定期检验与评定》(GB/T24162-2022)】及省、市有关规定,你单位送检的车用 + ②《汽车用压缩天然气金属内胆纤维环绕气瓶定期检验与评定》(T/SCTX/T 001-2023)】及省、市有关规定,你单位送检的车用  CNG 气瓶共   只, 经我机构实施定期检验,其中  只气瓶安全性能符合要求(详见附表1),   只气瓶更换了由  丹阳市飞轮气体阀门有限公司 生产的气瓶阀门, 其中  只气瓶已判报废(详见附表2),并且按照规定实施消除使用功能处理。 -

-

-

检验员:

-

批 准:

-

-

检验单位(盖章): 成都中民气瓶检测技术服务有限公司

-

-
-
-

附表1 定期检验合格气瓶一览表

- - - - - - - - - - - - - -
序号气瓶编号制造单位名称或代号下次检验日期序号气瓶编号气瓶使用
登记代码
下次检验日期
-
-
-

附表2 报废气瓶一览表

- - - - - - - - - - -
序号气瓶编号制造单位名称或代号报废原因处理结果
+

+

+

检验员:

+

批 准: +

+

+

检验单位(盖章): 成都中民气瓶检测技术服务有限公司 +

+

+
+
+

附表1 定期检验合格气瓶一览表

+ + + + + + + + + + + + +
序号气瓶编号公称容积(L)制造单位名称或代号下次检验日期
+
+
+

附表2 报废气瓶一览表

+ + + + + + + + + + +
序号气瓶编号容积(L)制造单位名称或代号报废原因处理结果
-
-

注:本报告一式二份,检验单位存档一份,气瓶产权单位或使用者一份。

+
+

注:本报告一式二份,检验单位存档一份,气瓶产权单位或使用者一份。

-
-
-

重要提示:

-

1.本次检验是对气瓶当时状态作出评定结论,如对本次检验结论有异议,请在7日内向本公司提出或向上级主管部门提出复验。

-

2.未经定期检验或者检验不合格的车用气瓶,不得继续使用。

-

3.气瓶适用参数:公称工作压力:≤20Mpa;工作温度:-40℃~65℃;充装介质:符合GB18047的车用压缩天然气。

-
-
-

检验单位:成都市中民气瓶检测技术服务有限公司

-

单位地址:成都市新津区安西镇安西街169号

-

联系电话:028-82595035 028-82551991

-
-
+
+
+

重要提示:

+

+ 1.本次检验是对气瓶当时状态作出评定结论,如对本次检验结论有异议,请在7日内向本公司提出或向上级主管部门提出复验。

+

2.未经定期检验或者检验不合格的车用气瓶,不得继续使用。

+

+ 3.气瓶适用参数:公称工作压力:≤20Mpa;工作温度:-40℃~65℃;充装介质:符合GB18047的车用压缩天然气。

+
+
+

检验单位:成都市中民气瓶检测技术服务有限公司

+

单位地址:成都市新津区安西镇安西街169号

+

联系电话:028-82595035 028-82551991

+
+
-
- -
-
-
+
+ +
+
+
-
- -
+
+ +
\ No newline at end of file diff --git a/src/main/webapp/app/specialInspection/checkresult/zhongmin.js b/src/main/webapp/app/specialInspection/checkresult/zhongmin.js index 07bfd3e..13c38e7 100644 --- a/src/main/webapp/app/specialInspection/checkresult/zhongmin.js +++ b/src/main/webapp/app/specialInspection/checkresult/zhongmin.js @@ -1,203 +1,185 @@ var checkCode; -$(document).ready(function() { - checkCode = getUrlParam('checkCode'); +$(document).ready(function () { + checkCode = getUrlParam('checkCode'); - $.ajax({ - type : 'get', - url : '/checklog/bycheckcode', - data : {checkid : checkCode} - }).done($.proxy(function(map) { - var check = map.checklog; - if(check.checker && check.checker.sysUserId != null) { - $('#jjuser').attr('src', contextPath+'/cngfile/signature/'+check.checker.sysUserId.id+'/'+check.checker.sysUserId.signature); - } - if(check.verifier && check.verifier.sysUserId != null) { - $('#shuser').attr('src',contextPath+'/cngfile/signature/'+check.verifier.sysUserId.id+'/'+check.verifier.sysUserId.signature); - } - if(check.approver && check.approver.sysUserId != null) { - $('#pzuser').attr('src', contextPath+'/cngfile/signature/'+check.approver.sysUserId.id+'/'+check.approver.sysUserId.signature); - } - $('#bocert').text(map.code); - $('.checkDetail_b').text(check.checkDetail); - $('#check_code').text(check.checkCode); - $('#owner').text(check.car.owner.name); - $('#platenum').text(check.car.platenum); - // 打证日期 + $.ajax({ + type: 'get', + url: '/checklog/bycheckcode', + data: {checkid: checkCode} + }).done($.proxy(function (map) { + var check = map.checklog; + if (check.checker && check.checker.sysUserId != null) { + $('#jjuser').attr('src', contextPath + '/cngfile/signature/' + check.checker.sysUserId.id + '/' + check.checker.sysUserId.signature); + } + if (check.verifier && check.verifier.sysUserId != null) { + $('#shuser').attr('src', contextPath + '/cngfile/signature/' + check.verifier.sysUserId.id + '/' + check.verifier.sysUserId.signature); + } + if (check.approver && check.approver.sysUserId != null) { + $('#pzuser').attr('src', contextPath + '/cngfile/signature/' + check.approver.sysUserId.id + '/' + check.approver.sysUserId.signature); + } + $('#bocert').text(map.code); + $('.checkDetail_b').text(check.checkDetail); + $('#check_code').text(check.checkCode); + $('#owner').text(check.car.owner.name); + $('#platenum').text(check.car.platenum); + // 打证日期 // $('.nowtime').text(new Date().format('yyyy年MM月dd日')); - $('.nowtime').text(check.checkDate.substring(0, 11)); + $('.nowtime').text(check.checkDate.substring(0, 11)); - // 气瓶 - var bottlist = map.bottlist; - // 总气瓶数 - $('#bottle_num').text(bottlist.length); - //不合格 - if(check.ispass==0) { - $('#list').hide(); + // 气瓶 + var bottlist = map.bottlist; + // 总气瓶数 + $('#bottle_num').text(bottlist.length); + //不合格 + if (check.ispass == 0) { + $('#list').hide(); // $('#ispass_Y').hide(); - $('#passpage').show(); - $('#discard_std').text(check.disCardId.dictValue); - var bottle = check.bottle; + $('#passpage').show(); + $('#discard_std').text(check.disCardId.dictValue); + var bottle = check.bottle; - $('#bottcount1').text(bottle.length); - $('.bottle_num_').text("\\"); - $('#check_date_N').text(check.checkDate ? check.checkDate.split(' ')[0] : ''); - $('#approve_date_N').text(check.approverDate ? check.approverDate.split(' ')[0] : ''); - for(var i=0; i'+num+''+ - ''+bottle[i].bottCode+''+ - // '' + map.code + ''+ - ''+bottle[i].madeVenderd.dictValue+''+ - // ''+bottle[i].capacity+''+ - ''+bottle[i].memo+''+ - '切割处理'+ - ''); - } - // 合格表格 - $('#ispass_Y').show(); - for(var i = 0; i < 3; i++) { - $('.ispass_Y_tab').append('/' - +'/' - /*+'' + map.cblist[i].nextCheckDate.split(' ')[0] + ''*/ - +'/' - +'/' - +'/' - +'/' - /*+'' + nextCheckDate + ''*/ - +'/' - +'/'); - } - } - //合格 - if(check.ispass==1) { - $('#list').hide(); - $('#ispass_N').hide(); - $('#passpage').show(); + $('#bottcount1').text(bottle.length); + $('.bottle_num_').text("\\"); + $('#check_date_N').text(check.checkDate ? check.checkDate.split(' ')[0] : ''); + $('#approve_date_N').text(check.approverDate ? check.approverDate.split(' ')[0] : ''); + for (var i = 0; i < bottle.length; i++) { + var num = i + 1; + $(".ispass_N_tab").append( + '' + num + '' + + '' + bottle[i].bottCode + '' + + // '' + map.code + ''+ + '' + bottle[i].capacity + '' + + '' + bottle[i].madeVenderd.dictValue + '' + + '' + bottle[i].memo + '' + + '切割处理' + + ''); + } + // 合格表格 + $('#ispass_Y').show(); + for (var i = 0; i < 3; i++) { + $('.ispass_Y_tab').append('/' + + '/' + + '/' + + '/' + + '/'); + } + } + //合格 + if (check.ispass == 1) { + $('#list').hide(); + $('#ispass_N').hide(); + $('#passpage').show(); - $('#bottcount1').text("\\"); - $('.bottle_num_').text(bottlist.length); - $('#regdept').text(check.car.regDept.deptName); - $('#check_date').text(check.checkDate ? check.checkDate.split(' ')[0] : ''); - $('#verify_date').text(check.verifyDate ? check.verifyDate.split(' ')[0] : ''); - $('#approve_date').text(check.approverDate ? check.approverDate.split(' ')[0] : ''); - $('#nextcheckdate').text(check.bottle[0].nextCheckDate ? check.bottle[0].nextCheckDate.split(' ')[0] : ''); - $('#deptlic').text(check.authorityDepartment.deptLic); - $('#deptlics').text(check.authorityDepartment.deptLic); - $('.dept').text(check.authorityDepartment.deptName); - $('#cdate').text(check.checkDate ? check.checkDate.split(' ')[0] : ''); - var bottle = check.bottle; - for(var i = 0; i < bottle.length; i+=2) { - var num = i + 1; - var number = i + 2; - var bottCode = bottle.length - num >= 1 ? bottle[num].bottCode : '/'; - var nextCheckDate = bottle.length - num >= 1 ? map.cblist[num].nextCheckDate.split(' ')[0] : '/'; - var le_num = bottle.length-num >= 1 ? number : '/'; - // var capacity = bottle.length - num >= 1 ? bottle[num].capacity : '/'; // 容积 - var madeUnit = bottle.length - num >= 1 ? (bottle[num].madeVenderd.dictValue) : '/'; // 容积 - //var bocertCode = bottle.length - num >= 1 ? map.code : '/'; // 气瓶使用登记证代码 - var tableRows = '' + num + '' - +'' + bottle[i].bottCode + '' - // +'' + map.code + '' - +'' + (bottle[i].madeVenderd.dictValue) + '' - +'' + map.cblist[i].nextCheckDate.split(' ')[0] + '' - +'' + le_num + '' - +'' + bottCode + '' - +'' + madeUnit + '' - +'' + nextCheckDate + ''; - // console.log(tableRows); - $('.ispass_Y_tab').append(tableRows); + $('#bottcount1').text("\\"); + $('.bottle_num_').text(bottlist.length); + $('#regdept').text(check.car.regDept.deptName); + $('#check_date').text(check.checkDate ? check.checkDate.split(' ')[0] : ''); + $('#verify_date').text(check.verifyDate ? check.verifyDate.split(' ')[0] : ''); + $('#approve_date').text(check.approverDate ? check.approverDate.split(' ')[0] : ''); + $('#nextcheckdate').text(check.bottle[0].nextCheckDate ? check.bottle[0].nextCheckDate.split(' ')[0] : ''); + $('#deptlic').text(check.authorityDepartment.deptLic); + $('#deptlics').text(check.authorityDepartment.deptLic); + $('.dept').text(check.authorityDepartment.deptName); + $('#cdate').text(check.checkDate ? check.checkDate.split(' ')[0] : ''); + var bottle = check.bottle; + for (var i = 0; i < bottle.length; i++) { + var tableRows = + '' + (i + 1) + '' + + '' + bottle[i].bottCode + '' + + '' + bottle[i].capacity + '' + + '' + bottle[i].madeVenderd.dictValue + '' + + '' + map.cblist[i].nextCheckDate.split(' ')[0] + ''; + $('.ispass_Y_tab').append(tableRows); - } - if(bottle.length/2 <= 3){ - for(var i = 0; i< (3-bottle.length/2);i++){ - $('.ispass_Y_tab').append('/' - +'/' - +'/' - +'/' - +'/' - +'/' - +'/' - +'/'); - } - } - // 不合格表格 - $('#ispass_N').show(); - $(".ispass_N_tab").append('' + - '/'+ - '/'+ - '/'+ - //'/'+ - '/'+ - '/'+ - ''); - } + } + if (bottle.length / 2 <= 3) { + for (var i = 0; i < (3 - bottle.length / 2); i++) { + $('.ispass_Y_tab').append('/' + + '/' + + '/' + + '/' + + '/'); + } + } + // 不合格表格 + $('#ispass_N').show(); + $(".ispass_N_tab").append('' + + '/' + + '/' + + '/' + + '/' + + '/' + + '/' + + ''); + } - for(var i=0; i < bottlist.length; i ++) { - $('#bott_code').append(''+bottlist[i].bottCode+'  '); - $('.next_check_date_b').text(map.cblist[0].nextCheckDate == null ? '' : new Date(map.cblist[0].nextCheckDate.substring(0,10)).format('yyyy年MM月dd日')); - if(bottlist[0].bottType.typeCode == "1") { - $('#st1').text('①'); + for (var i = 0; i < bottlist.length; i++) { + $('#bott_code').append('' + bottlist[i].bottCode + '  '); + $('.next_check_date_b').text(map.cblist[0].nextCheckDate == null ? '' : new Date(map.cblist[0].nextCheckDate.substring(0, 10)).format('yyyy年MM月dd日')); + if (bottlist[0].bottType.typeCode == "1") { + $('#st1').text('①'); - $('#tble1').show(); - } else { - $('#st1').text('②'); + $('#tble1').show(); + } else { + $('#st1').text('②'); - $('#tble2').show(); - } - var bott = bottlist[i]; - //查看气瓶 - $('#botttr').after(''+bott.bottCode+''+bott.bottModel+''+bott.madeVenderd.dictValue+''+ - ''+(bott.madeDate ? bott.madeDate.split(' ')[0] : '')+''+bott.weight+''+ - ''+bott.capacity+''+bott.bottMaterial+''+ - ''+(bott.nextCheckDate ? bott.nextCheckDate.split(' ')[0] : '')+''); - if(bott.bottType.typeCode == "1") { - $('#tcode').after('  '); - } else { - $('#tcode').after('E型玻纤'+ - '环氧树'); - } - } + $('#tble2').show(); + } + var bott = bottlist[i]; + //查看气瓶 + $('#botttr').after('' + bott.bottCode + '' + bott.bottModel + '' + bott.madeVenderd.dictValue + '' + + '' + (bott.madeDate ? bott.madeDate.split(' ')[0] : '') + '' + bott.weight + '' + + '' + bott.capacity + '' + bott.bottMaterial + '' + + '' + (bott.nextCheckDate ? bott.nextCheckDate.split(' ')[0] : '') + ''); + if (bott.bottType.typeCode == "1") { + $('#tcode').after('  '); + } else { + $('#tcode').after('E型玻纤' + + '环氧树'); + } + } // $('#nowtime').text(new Date().format('yyyy-MM-dd')); - $('#nowtime').text(check.checkDate.substring(0, 11)); - $.ajax({ - type : 'get', - url : '/checklog/deptcode' - }).done($.proxy(function(dept) { - $('#dept').text(dept.deptName); - $('#deptLic').text(dept.deptLic); - }, this)); - $('#check_date').text(check.checkDate ? check.checkDate.split(' ')[0] : ''); - $('#verify_date').text(check.verifyDate ? check.verifyDate.split(' ')[0] : ''); - $('#approve_date').text(check.approverDate ? check.approverDate.split(' ')[0] : ''); - }, this)); + $('#nowtime').text(check.checkDate.substring(0, 11)); + $.ajax({ + type: 'get', + url: '/checklog/deptcode' + }).done($.proxy(function (dept) { + $('#dept').text(dept.deptName); + $('#deptLic').text(dept.deptLic); + }, this)); + $('#check_date').text(check.checkDate ? check.checkDate.split(' ')[0] : ''); + $('#verify_date').text(check.verifyDate ? check.verifyDate.split(' ')[0] : ''); + $('#approve_date').text(check.approverDate ? check.approverDate.split(' ')[0] : ''); + }, this)); - $('#back').click(function() { - window.location.href = 'checkresult.html'; - }); + $('#back').click(function () { + window.location.href = 'checkresult.html'; + }); }); -function setPrintPart(){ - $('#passpagenf1').jqprint(); - setTimeout(function(){ - $.ajax({ - type : 'PUT', - url : '/checklog/printlog', - data : {checkid : checkCode} - }).done(function(data) { - if(data) { - window.location.href = 'checkresult.html'; - } - }); - },1000); +function setPrintPart() { + $('#passpagenf1').jqprint(); + setTimeout(function () { + $.ajax({ + type: 'PUT', + url: '/checklog/printlog', + data: {checkid: checkCode} + }).done(function (data) { + if (data) { + window.location.href = 'checkresult.html'; + } + }); + }, 1000); // }); } -function setPrintCy(){ - $('#pzuser_span').css({'margin-left': '40%'}); - $('#scy').jqprint(); - setTimeout(function(){ - window.location.href = 'checkresult.html'; - },1000); + +function setPrintCy() { + $('#pzuser_span').css({'margin-left': '40%'}); + $('#scy').jqprint(); + setTimeout(function () { + window.location.href = 'checkresult.html'; + }, 1000); // $.confirm('确定要打印?',function(){ // var body=document.getElementById("scy"); // document.body.innerHTML=body.innerHTML; @@ -207,9 +189,9 @@ function setPrintCy(){ } function getUrlParam(name) { - var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); // 构造一个含有目标参数的正则表达式对象 - var r = window.location.search.substr(1).match(reg); // 匹配目标参数 - if (r != null) - return unescape(r[2]); - return null; // 返回参数值 + var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); // 构造一个含有目标参数的正则表达式对象 + var r = window.location.search.substr(1).match(reg); // 匹配目标参数 + if (r != null) + return unescape(r[2]); + return null; // 返回参数值 } \ No newline at end of file diff --git a/src/main/webapp/app/specialInspection/printBottcert/printBottcert.js b/src/main/webapp/app/specialInspection/printBottcert/printBottcert.js index d0c858c..1e406c8 100644 --- a/src/main/webapp/app/specialInspection/printBottcert/printBottcert.js +++ b/src/main/webapp/app/specialInspection/printBottcert/printBottcert.js @@ -1,447 +1,550 @@ - var currentMater = null; -var oriGrid=null; +var oriGrid = null; var bottleGrid = null; var clickType = 0; var jyzList = new Array(); -$(document).ready(function() { - - jyzList.push(55); - jyzList.push(60); - jyzList.push(61); - jyzList.push(62); - jyzList.push(63); +$(document).ready(function () { + + jyzList.push(55); + jyzList.push(60); + jyzList.push(61); + jyzList.push(62); + jyzList.push(63); + + $("#print_div").hide(); + $("#mytable_dy").hide(); + // 新证 + $("#newprint_div").hide(); + $("#newmytable_dy").hide(); + //车辆列表 + oriGrid = new Grid({ + el: '#cngCdCarTankListGrid', + url: '/printBottcert/getPrintBottleCertListBy', + param: function () { + + return { + platenum: $.trim($('#platenum').val()), + code: $.trim($('#code').val()) + }; + },//查询所传参数 + pagination: true, + cm: [ + {head: '登记证编号', col: 'code', align: 'left', width: 5}, + {head: '车辆号牌', col: 'platenum', align: 'center', width: 5}, + {head: '车架号', col: 'vin', align: 'left', width: 8}, + {head: '气瓶个数', width: 4, align: 'right', col: 'bottleNum'}, + {head: '使用性质', width: 5, align: 'left', col: 'workingTypeDict'}, + {head: '车辆类型', width: 8, align: 'left', col: 'carTypeDict'}, + { + head: '登记单位', align: 'left', width: 10, col: function (data) { + return data.regDept ? displayLength(data.regDept, 10) : ""; + }, + }, + { + head: '车辆状态', col: function (data) { + return displayLength(Constants.CarStates.getText(data.carState), 10); + }, align: 'left', width: 10 + } + ] + }).onSelect(function (plans) { + currentExercise = plans.length == 1 ? plans[0] : null; + $('#viewBtn').attr({disabled: currentExercise == null}); + $('#newviewBtn').attr({disabled: currentExercise == null}); + }); - $("#print_div").hide(); - $("#mytable_dy").hide(); - // 新证 - $("#newprint_div").hide(); - $("#newmytable_dy").hide(); - //车辆列表 - oriGrid = new Grid({ - el : '#cngCdCarTankListGrid', - url : '/printBottcert/getPrintBottleCertListBy', - param : function(){ - - return { - platenum : $.trim($('#platenum').val()), - code : $.trim($('#code').val()) - }; - },//查询所传参数 - pagination : true, - cm : [ - {head: '登记证编号', col: 'code' ,align : 'left', width: 5}, - {head: '车辆号牌', col: 'platenum', align : 'center', width: 5}, - {head: '车架号', col: 'vin', align : 'left', width: 8 }, - {head: '气瓶个数',width:4,align : 'right',col:'bottleNum' }, - {head: '使用性质',width: 5, align : 'left', col:'workingTypeDict'}, - {head: '车辆类型', width:8, align : 'left', col:'carTypeDict' }, - {head: '登记单位',align : 'left', width: 10,col: function(data){ return data.regDept?displayLength(data.regDept, 10):""; } , }, - {head: '车辆状态',col: function(data){ return displayLength(Constants.CarStates.getText(data.carState),10);}, align : 'left',width: 10} - ] - }).onSelect(function(plans){ - currentExercise = plans.length == 1 ? plans[0] : null; - $('#viewBtn').attr({disabled : currentExercise == null}); - $('#newviewBtn').attr({disabled : currentExercise == null}); - }); - - //查询初始化 - $('#searchBtn').on('click', function(e){ - oriGrid.load(); - }); - - $('#back').click(function(){ - clickType = 0; - $('#main').show(); - $("#mytable_dy").hide(); - $("#print_div").hide(); - $('#printForm').find('input').val(''); - oriGrid.load(); - window.location.href = 'printBottcert.html'; - }); - - //点击查看车辆详情 - $('#viewBtn').click(function() { - $('#main').hide(); - $('.Noprint').show(); - $("#mytable_dy").show(); - $("#print_div").show(); - $('#showCard').show(); - $('#show_bottom1').show(); - $('#show_bottom2').hide(); - $('#showBottle2').show(); - $("#showBottle2").css("margin-top", "80px"); - currentMater = oriGrid.getSelected()[0]; - $.ajax({ - type:'GET', - url:'/printBottcert/getBottleCertById', - cache:false, - async : false , - data:{id:currentMater.id}, - dataType:'json', - success:function(json){ - //赋值 - $('#printForm').fill(json); - $('#printForm').find('input').each(function(index, node) { - var val = $(node).val(); - $(node).attr('type', 'hidden').next().html(val); - }); - //截取发证日期 - currentDate1 = new Date().format("yyyy-MM-dd"); - $('#getDate').html(json.date ? json.date.substring(0, 11) : currentDate1); - //给安装单位赋值 + //查询初始化 + $('#searchBtn').on('click', function (e) { + oriGrid.load(); + }); + + $('#back').click(function () { + clickType = 0; + $('#main').show(); + $("#mytable_dy").hide(); + $("#print_div").hide(); + $('#printForm').find('input').val(''); + oriGrid.load(); + window.location.href = 'printBottcert.html'; + }); + + //点击查看车辆详情 + $('#viewBtn').click(function () { + $('#main').hide(); + $('.Noprint').show(); + $("#mytable_dy").show(); + $("#print_div").show(); + $('#showCard').show(); + $('#show_bottom1').show(); + $('#show_bottom2').hide(); + $('#showBottle2').show(); + $("#showBottle2").css("margin-top", "80px"); + currentMater = oriGrid.getSelected()[0]; + $.ajax({ + type: 'GET', + url: '/printBottcert/getBottleCertById', + cache: false, + async: false, + data: {id: currentMater.id}, + dataType: 'json', + success: function (json) { + //赋值 + $('#printForm').fill(json); + $('#printForm').find('input').each(function (index, node) { + var val = $(node).val(); + $(node).attr('type', 'hidden').next().html(val); + }); + //截取发证日期 + currentDate1 = new Date().format("yyyy-MM-dd"); + $('#getDate').html(json.date ? json.date.substring(0, 11) : currentDate1); + //给安装单位赋值 // if(json.car.isorig=="0"){ // $('#installDept').html(json.car.regDept?json.car.regDept.deptName:""); // }else{ - var isCheck = $.inArray(json.car.regDept.id, jyzList); - //如果是改装厂改装厂的,则取改装厂的登记单位 - if(json.car.isorig == 0 && isCheck ==-1){ - $('#installDept').html(json.car?json.car.regDept.deptName:""); - } - //非改装厂录入的,7/18前取出厂,7/18后取安装 - else{ - if(json.car.dateJoined==null){ - $('#installDept').html(json.car?json.car.fromDept:""); - }else{ - if(dateCompare(json.car.dateJoined.substring(0,11),'2015-07-18')){ - $('#installDept').html(json.car?json.car.fromDept:""); - }else{ - $('#installDept').html(json.car?json.car.madeVendor:""); - } - } - } + var isCheck = $.inArray(json.car.regDept.id, jyzList); + + // 如果是外地转入车辆,显示安装单位 + if(json.car.registeType === 2){ + $('#installDept').html(json.car ? json.car.fromDept : ""); + }else{ + // 非外地转入的显示登记单位 + $('#installDept').html(json.car ? json.car.regDept.deptName : ""); + } + + + //如果是改装厂改装厂的,则取改装厂的登记单位 + /*if (json.car.isorig == 0 && isCheck == -1) { + $('#installDept').html(json.car ? json.car.regDept.deptName : ""); + } else { + //非改装厂录入的,7/18前取出厂,7/18后取安装 + if (json.car.dateJoined == null) { + $('#installDept').html(json.car ? json.car.fromDept : ""); + } else { + if (dateCompare(json.car.dateJoined.substring(0, 11), '2015-07-18')) { + $('#installDept').html(json.car ? json.car.fromDept : ""); + } else { + $('#installDept').html(json.car ? json.car.madeVendor : ""); + } + } + }*/ + + + // } - //给区域赋值 - $('#span_area').html(json.car.areaDict?json.car.areaDict.dictValue:"成都市"); - } - }); - $.ajax({ - type : 'get', - url : '/printBottcert/getBottleByPlatenum',//获取气瓶相关数据 - async : false , - data : { - carid:currentMater.carId - } - }).done(function(bottles) { - $(".inf_td").remove(); - num = bottles.length; - for(var i=0; i < bottles.length; i ++) { - - var bott = bottles[i]; - var madeDate = bott.madeDate; - if(madeDate==null ||madeDate ==""){ - madeDate=''; - }else{ - madeDate=madeDate.substring(0,11); - } - var nextCheckDate = bott.nextCheckDate; - if(nextCheckDate==null ||nextCheckDate ==""){ - nextCheckDate=''; - }else{ - nextCheckDate=nextCheckDate.substring(0,11); - } - var bottmodel = bott.bottModel.length>7?bott.bottModel.substring(0, 7):bott.bottModel; - //bottle列表 - $('#botttr2').after(''+bott.bottCode+''+bottmodel+''+bott.madeVenderd.dictValue+''+ - ''+madeDate+''+bott.weight+''+ - ''+bott.capacity+''+bott.bottMaterial+''+ - ''+nextCheckDate+''); - if(bott.bottType.typeCode == "1") { - $('#tcode1').after('  '); - } else { - $('#tcode1').after('E型玻纤'+ - '环氧树'); - } - } - //给安装日期赋值 - $('#span_installDate').html(bott ? bott.installDate.substring(0, 11) : ''); - - }); - currentDate = new Date().format("yyyy-MM-dd hh:mm:ss"); - $('.currentDate').text(currentDate); - $.ajax({ - type : 'get', - url : '/printBottcert/getCurrentRegDept',//得到当前登录部门 - }).done(function(data){ - $('.currentDept').text(data.name); - - }); - }); - - $('#printBtn').click(function(){ - currentMater = oriGrid.getSelected()[0]; - (currentMater.carState == 4 && currentMater.bottleNum > 0) || (currentMater.carState == 5 && currentMater.bottleNum > 0) - if((currentMater.carState == 4 && currentMater.bottleNum > 0) || (currentMater.carState == 5 && currentMater.bottleNum > 0)){ - $('#printForm').css('margin-top','15px'); - $('#inlineBottle2').css('margin-left','0px'); - $('.Noprint').hide(); - /*$('.title_td').css('width','60px');*/ - $('#mytable_gzz').css({'padding-left':'30px','width':'490px'}); - $('h1').css({'font-size': '20px','font-family': '宋体','text-align': 'center'}); - $('.title_td1').css({'font-size':'12px','width':'80px','padding':'-1px 1px 1px 1px','text-align':'center','height': '23px'}); - $('.title_td').css({'font-size':'12px','width':'60px','padding':'-1px 1px 1px 1px','text-align':'center','height': '24px'}); - $('.alt').css({'font-family':'宋体','font-size':'12px','width':'160px','padding':'-1px 1px 1px 1px','text-align':'left','height': '2px'}); - $('.tab_2').css({'width': '500px','margin-top':'70px','left':'0px','margin-left':'-22px'}); - $('.inf_td').css({'font-family': '宋体','font-weight':'bold','font-size': '11px','-webkit-transform': 'scale(0.8)','text-align': 'left','padding':'0px','left': '10px'}); - $('.cy_td').css({'height':'60px','font-family':'宋体','font-size':'11px','text-align': 'right'}); - $('#botttr2').css({'font-family': '宋体','font-weight':'bold','font-size': '11px','padding':'0px','text-align': 'left','padding':'0px','left': '10px'}); - $('#inlineBottle2').css({'font-family': '宋体','font-weight':'bold','font-size': '11px','text-align': 'left','padding':'0px', 'left': '10px'}); - if(clickType==0){ - $("#showBottle2").css("margin-top","80px"); - }else if(clickType==1){ - $('#inlineBottle2').css('margin-left','0px'); - $("#showBottle2").css("margin-top","0px"); - }else if(clickType==2){ - $('#inlineBottle2').css('margin-left','0px'); - $("#showBottle2").css("margin-top","285px"); - } - - $('#mytable_dy').jqprint(); - - setTimeout(function(){ - //增加打印次数 - $.ajax({ - type : 'put', - url : '/printBottcert/printBottleCert', - data : { - id : currentMater.id - } - }).done(function(bottles) { - oriGrid.load(); - }); - }, 2000); - }else{ - $.error("当前车辆不能打印气瓶使用登记证!"); - } - }); - - $('#allBtn').click(function() { - clickType = 0; - $('#main').hide(); - $('#showCard').show(); - $('#showBottle2').show(); - $('#show_bottom1').show(); - $('#show_bottom2').hide(); - $("#showBottle2").css("margin-top","70px"); - }); - $('#firstBtn').click(function() { - clickType = 1; - $('#main').hide(); - $('#showCard').hide(); - $('#showBottle2').show(); - $('#show_bottom1').hide(); - $('#show_bottom2').show(); - $('#inlineBottle2').css('margin-left','0px'); - $("#showBottle2").css("margin-top","0px"); - }); - $('#twoBtn').click(function() { - clickType = 2; - $('#main').hide(); - $('#showCard').hide(); - $('#showBottle2').show(); - $('#show_bottom1').hide(); - $('#show_bottom2').show(); - $('#inlineBottle2').css('margin-left','0px'); - $("#showBottle2").css("margin-top","285px"); - }); - - // 新证 - $('#newback').click(function(){ - clickType = 0; - $('#main').show(); - $("#newmytable_dy").hide(); - $("#newprint_div").hide(); - $('#newprintForm').find('input').val(''); - oriGrid.load(); - }); - - //点击查看车辆详情 - $('#newviewBtn').click(function() { - $('#main').hide(); - $("#newmytable_dy").show(); - $("#newprint_div").show(); - $('#newshowCard').show(); - $('#newshow_bottom1').show(); - $('#newshow_bottom2').hide(); - $('#newshowBottle2').show(); - $("#newshowBottle2").css("margin-top","70px"); - currentMater = oriGrid.getSelected()[0]; - $.ajax({ - type:'GET', - url:'/printBottcert/getBottleCertById', - cache:false, - async : false , - data:{id:currentMater.id}, - dataType:'json', - success:function(json){ - //赋值 - $('#newprintForm').fill(json); - $('#newprintForm').find('input').each(function(index, node) { - var val = $(node).val(); - $(node).attr('type', 'hidden').next().html(val); - }); - //截取发证日期 - currentDate1 = new Date().format("yyyy-MM-dd"); - $('#newgetDate').html(json.date ? json.date.substring(0, 11) : currentDate1); - //给安装单位赋值 + //给区域赋值 + $('#span_area').html(json.car.areaDict ? json.car.areaDict.dictValue : "成都市"); + } + }); + $.ajax({ + type: 'get', + url: '/printBottcert/getBottleByPlatenum',//获取气瓶相关数据 + async: false, + data: { + carid: currentMater.carId + } + }).done(function (bottles) { + $(".inf_td").remove(); + num = bottles.length; + for (var i = 0; i < bottles.length; i++) { + + var bott = bottles[i]; + var madeDate = bott.madeDate; + if (madeDate == null || madeDate == "") { + madeDate = ''; + } else { + madeDate = madeDate.substring(0, 11); + } + var nextCheckDate = bott.nextCheckDate; + if (nextCheckDate == null || nextCheckDate == "") { + nextCheckDate = ''; + } else { + nextCheckDate = nextCheckDate.substring(0, 11); + } + var bottmodel = bott.bottModel.length > 7 ? bott.bottModel.substring(0, 7) : bott.bottModel; + //bottle列表 + $('#botttr2').after('' + bott.bottCode + '' + bottmodel + '' + bott.madeVenderd.dictValue + '' + + '' + madeDate + '' + bott.weight + '' + + '' + bott.capacity + '' + bott.bottMaterial + '' + + '' + nextCheckDate + ''); + if (bott.bottType.typeCode == "1") { + $('#tcode1').after('  '); + } else { + $('#tcode1').after('E型玻纤' + + '环氧树'); + } + } + //给安装日期赋值 + $('#span_installDate').html(bott ? bott.installDate.substring(0, 11) : ''); + + }); + currentDate = new Date().format("yyyy-MM-dd hh:mm:ss"); + $('.currentDate').text(currentDate); + $.ajax({ + type: 'get', + url: '/printBottcert/getCurrentRegDept',//得到当前登录部门 + }).done(function (data) { + $('.currentDept').text(data.name); + + }); + }); + + $('#printBtn').click(function () { + currentMater = oriGrid.getSelected()[0]; + (currentMater.carState == 4 && currentMater.bottleNum > 0) || (currentMater.carState == 5 && currentMater.bottleNum > 0) + if ((currentMater.carState == 4 && currentMater.bottleNum > 0) || (currentMater.carState == 5 && currentMater.bottleNum > 0)) { + $('#printForm').css('margin-top', '15px'); + $('#inlineBottle2').css('margin-left', '0px'); + $('.Noprint').hide(); + /*$('.title_td').css('width','60px');*/ + $('#mytable_gzz').css({'padding-left': '30px', 'width': '490px'}); + $('h1').css({'font-size': '20px', 'font-family': '宋体', 'text-align': 'center'}); + $('.title_td1').css({ + 'font-size': '12px', + 'width': '80px', + 'padding': '-1px 1px 1px 1px', + 'text-align': 'center', + 'height': '23px' + }); + $('.title_td').css({ + 'font-size': '12px', + 'width': '60px', + 'padding': '-1px 1px 1px 1px', + 'text-align': 'center', + 'height': '24px' + }); + $('.alt').css({ + 'font-family': '宋体', + 'font-size': '12px', + 'width': '160px', + 'padding': '-1px 1px 1px 1px', + 'text-align': 'left', + 'height': '2px' + }); + $('.tab_2').css({'width': '500px', 'margin-top': '70px', 'left': '0px', 'margin-left': '-22px'}); + $('.inf_td').css({ + 'font-family': '宋体', + 'font-weight': 'bold', + 'font-size': '11px', + '-webkit-transform': 'scale(0.8)', + 'text-align': 'left', + 'padding': '0px', + 'left': '10px' + }); + $('.cy_td').css({'height': '60px', 'font-family': '宋体', 'font-size': '11px', 'text-align': 'right'}); + $('#botttr2').css({ + 'font-family': '宋体', + 'font-weight': 'bold', + 'font-size': '11px', + 'padding': '0px', + 'text-align': 'left', + 'padding': '0px', + 'left': '10px' + }); + $('#inlineBottle2').css({ + 'font-family': '宋体', + 'font-weight': 'bold', + 'font-size': '11px', + 'text-align': 'left', + 'padding': '0px', + 'left': '10px' + }); + if (clickType == 0) { + $("#showBottle2").css("margin-top", "80px"); + } else if (clickType == 1) { + $('#inlineBottle2').css('margin-left', '0px'); + $("#showBottle2").css("margin-top", "0px"); + } else if (clickType == 2) { + $('#inlineBottle2').css('margin-left', '0px'); + $("#showBottle2").css("margin-top", "285px"); + } + + $('#mytable_dy').jqprint(); + + setTimeout(function () { + //增加打印次数 + $.ajax({ + type: 'put', + url: '/printBottcert/printBottleCert', + data: { + id: currentMater.id + } + }).done(function (bottles) { + oriGrid.load(); + }); + }, 2000); + } else { + $.error("当前车辆不能打印气瓶使用登记证!"); + } + }); + + $('#allBtn').click(function () { + clickType = 0; + $('#main').hide(); + $('#showCard').show(); + $('#showBottle2').show(); + $('#show_bottom1').show(); + $('#show_bottom2').hide(); + $("#showBottle2").css("margin-top", "70px"); + }); + $('#firstBtn').click(function () { + clickType = 1; + $('#main').hide(); + $('#showCard').hide(); + $('#showBottle2').show(); + $('#show_bottom1').hide(); + $('#show_bottom2').show(); + $('#inlineBottle2').css('margin-left', '0px'); + $("#showBottle2").css("margin-top", "0px"); + }); + $('#twoBtn').click(function () { + clickType = 2; + $('#main').hide(); + $('#showCard').hide(); + $('#showBottle2').show(); + $('#show_bottom1').hide(); + $('#show_bottom2').show(); + $('#inlineBottle2').css('margin-left', '0px'); + $("#showBottle2").css("margin-top", "285px"); + }); + + // 新证 + $('#newback').click(function () { + clickType = 0; + $('#main').show(); + $("#newmytable_dy").hide(); + $("#newprint_div").hide(); + $('#newprintForm').find('input').val(''); + oriGrid.load(); + }); + + //点击查看车辆详情 + $('#newviewBtn').click(function () { + $('#main').hide(); + $("#newmytable_dy").show(); + $("#newprint_div").show(); + $('#newshowCard').show(); + $('#newshow_bottom1').show(); + $('#newshow_bottom2').hide(); + $('#newshowBottle2').show(); + $("#newshowBottle2").css("margin-top", "70px"); + currentMater = oriGrid.getSelected()[0]; + $.ajax({ + type: 'GET', + url: '/printBottcert/getBottleCertById', + cache: false, + async: false, + data: {id: currentMater.id}, + dataType: 'json', + success: function (json) { + //赋值 + $('#newprintForm').fill(json); + $('#newprintForm').find('input').each(function (index, node) { + var val = $(node).val(); + $(node).attr('type', 'hidden').next().html(val); + }); + //截取发证日期 + currentDate1 = new Date().format("yyyy-MM-dd"); + $('#newgetDate').html(json.date ? json.date.substring(0, 11) : currentDate1); + //给安装单位赋值 // if(json.car.isorig=="0"){ // $('#installDept').html(json.car.regDept?json.car.regDept.deptName:""); // }else{ - var isCheck = $.inArray(json.car.regDept.id, jyzList); - //如果是改装厂改装厂的,则取改装厂的登记单位 - if(json.car.isorig == 0 && isCheck ==-1){ - $('#newinstallDept').html(json.car?json.car.regDept.deptName:""); - } - //非改装厂录入的,7/18前取出厂,7/18后取安装 - else{ - if(json.car.dateJoined==null){ - $('#newinstallDept').html(json.car?json.car.fromDept:""); - }else{ - if(dateCompare(json.car.dateJoined.substring(0,11),'2015-07-18')){ - $('#newinstallDept').html(json.car?json.car.fromDept:""); - }else{ - $('#newinstallDept').html(json.car?json.car.madeVendor:""); - } - } - } + var isCheck = $.inArray(json.car.regDept.id, jyzList); + //如果是改装厂改装厂的,则取改装厂的登记单位 + if (json.car.isorig == 0 && isCheck == -1) { + $('#newinstallDept').html(json.car ? json.car.regDept.deptName : ""); + } + //非改装厂录入的,7/18前取出厂,7/18后取安装 + else { + if (json.car.dateJoined == null) { + $('#newinstallDept').html(json.car ? json.car.fromDept : ""); + } else { + if (dateCompare(json.car.dateJoined.substring(0, 11), '2015-07-18')) { + $('#newinstallDept').html(json.car ? json.car.fromDept : ""); + } else { + $('#newinstallDept').html(json.car ? json.car.madeVendor : ""); + } + } + } // } - //给区域赋值 - $('#newspan_area').html(json.car.areaDict?json.car.areaDict.dictValue:"成都市"); - } - }); - $.ajax({ - type : 'get', - url : '/printBottcert/getBottleByPlatenum',//获取气瓶相关数据 - async : false , - data : { - carid:currentMater.carId - } - }).done(function(bottles) { - $(".inf_td").remove(); - num = bottles.length; - for(var i = 0; i < bottles.length; i ++) { - var bott = bottles[i]; - var madeDate = bott.madeDate; - if(madeDate == null ||madeDate == ""){ - madeDate = ''; - }else{ - madeDate = madeDate.substring(0,11); - } - var nextCheckDate = bott.nextCheckDate; - if(nextCheckDate == null ||nextCheckDate == ""){ - nextCheckDate = ''; - }else{ - nextCheckDate = nextCheckDate.substring(0,11); - } - var bottType = ''; - if(bott.bottType.typeCode == "1") { - bottType = 'CNG'; - } else { - bottType = 'CNG'; - } - - var bottmodel = bott.bottModel.length > 7 ? bott.bottModel.substring(0, 7) : bott.bottModel; - //bottle列表 - $('#newbotttr2').after('' + bott.bottCode + '' + bottType + '' + bott.madeVenderd.dictValue + '' + - '' + madeDate + '' + bott.weight + '' + - '' + bott.capacity + '' + bott.workPress + '' + - '' + - '' + nextCheckDate + ''); - /*if(bott.bottType.typeCode == "1") { - $('#newtcode1').after('  '); - } else { - $('#newtcode1').after('E型玻纤'+ - '环氧树'); - }*/ - - } - //给安装日期赋值 - $('#newspan_installDate').html(bott ? bott.installDate.substring(0, 11) : ''); - - }); - currentDate = new Date().format("yyyy-MM-dd hh:mm:ss"); - $('.currentDate').text(currentDate); - $.ajax({ - type : 'get', - url : '/printBottcert/getCurrentRegDept',//得到当前登录部门 - }).done(function(data){ - $('.currentDept').text(data.name); - - }); - }); - - $('#newprintBtn').click(function(){ - currentMater = oriGrid.getSelected()[0]; - if((currentMater.carState == 4 &¤tMater.bottleNum > 0) || (currentMater.carState == 5 && currentMater.bottleNum > 0)){ - $('#newprintForm').css('margin-top','20px'); - $('#newinlineBottle2').css({'margin-left' : '0px', 'margin-top' : '30px'}); - $('.Noprint').hide(); - $('.title_td').css('width','60px'); - $('#newmytable_gzz').css({'padding-left':'30px','width':'490px'}); - $('h1').css({'font-size': '20px','font-family': '宋体','text-align': 'center'}); - $('.title_td1').css({'font-size':'12px','width':'81px','padding':'-1px 1px 1px 1px','text-align':'center','height': '25px'}); - $('.title_td').css({'font-size':'12px','width':'60px','padding':'-1px 1px 1px 1px','text-align':'center','height': '25px'}); - $('.alt').css({'font-family':'宋体','font-size':'12px','width':'160px','padding':'-1px 1px 1px 1px','text-align':'left','height': '2px'}); - $('.tab_2').css({'width': '500px','margin-top':'70px','left':'0px','margin-left':'-22px'}); - $('.inf_td').css({'font-family': '宋体','font-weight':'bold','font-size': '11px','-webkit-transform': 'scale(0.8)','text-align': 'left','padding':'0px','left': '10px'}); - $('.cy_td').css({'height':'60px','font-family':'宋体','font-size':'11px','text-align': 'right'}); - $('#newbotttr2').css({'font-family': '宋体','font-weight':'bold','font-size': '11px','padding':'0px','text-align': 'left','padding':'0px','left': '10px'}); - $('#newinlineBottle2').css({'font-family': '宋体','font-weight':'bold','font-size': '11px','text-align': 'left','padding':'0px', 'left': '10px'}); - if(clickType==0){ - $("#newshowBottle2").css("margin-top","70px"); - }else if(clickType==1){ - $('#newinlineBottle2').css('margin-left','0px'); - $("#newshowBottle2").css("margin-top","-35px"); - }else if(clickType==2){ - $('#newinlineBottle2').css('margin-left','0px'); - $("#newshowBottle2").css("margin-top","287px"); - } - $('#newmytable_dy').jqprint(); - setTimeout(function(){ - //增加打印次数 - $.ajax({ - type : 'put', - url : '/printBottcert/printBottleCert', - data : { - id : currentMater.id - } - }).done(function(bottles) { - oriGrid.load(); - }); - - - },2000); - }else{ - $.error("当前车辆不能打印气瓶使用登记证!"); - } - }); - $('#newallBtn').click(function() { - clickType = 0; - $('#main').hide(); - $('#newshowCard').show(); - $('#newshowBottle2').show(); - $('#newshow_bottom1').show(); - $('#newshow_bottom2').hide(); - $("#newshowBottle2").css("margin-top","70px"); - }); - $('#newfirstBtn').click(function() { - clickType = 1; - $('#main').hide(); - $('#newshowCard').hide(); - $('#newshowBottle2').show(); - $('#newshow_bottom1').hide(); - $('#newshow_bottom2').show(); - $('#newinlineBottle2').css('margin-left','0px'); - $("#newshowBottle2").css("margin-top","0px"); - }); - $('#newtwoBtn').click(function() { - clickType = 2; - $('#main').hide(); - $('#newshowCard').hide(); - $('#newshowBottle2').show(); - $('#newshow_bottom1').hide(); - $('#newshow_bottom2').show(); - $('#newinlineBottle2').css('margin-left','0px'); - $("#newshowBottle2").css("margin-top","287px"); - }); + //给区域赋值 + $('#newspan_area').html(json.car.areaDict ? json.car.areaDict.dictValue : "成都市"); + } + }); + $.ajax({ + type: 'get', + url: '/printBottcert/getBottleByPlatenum',//获取气瓶相关数据 + async: false, + data: { + carid: currentMater.carId + } + }).done(function (bottles) { + $(".inf_td").remove(); + num = bottles.length; + for (var i = 0; i < bottles.length; i++) { + var bott = bottles[i]; + var madeDate = bott.madeDate; + if (madeDate == null || madeDate == "") { + madeDate = ''; + } else { + madeDate = madeDate.substring(0, 11); + } + var nextCheckDate = bott.nextCheckDate; + if (nextCheckDate == null || nextCheckDate == "") { + nextCheckDate = ''; + } else { + nextCheckDate = nextCheckDate.substring(0, 11); + } + var bottType = ''; + if (bott.bottType.typeCode == "1") { + bottType = 'CNG'; + } else { + bottType = 'CNG'; + } + + var bottmodel = bott.bottModel.length > 7 ? bott.bottModel.substring(0, 7) : bott.bottModel; + //bottle列表 + $('#newbotttr2').after('' + bott.bottCode + '' + bottType + '' + bott.madeVenderd.dictValue + '' + + '' + madeDate + '' + bott.weight + '' + + '' + bott.capacity + '' + bott.workPress + '' + + '' + + '' + nextCheckDate + ''); + /*if(bott.bottType.typeCode == "1") { + $('#newtcode1').after('  '); + } else { + $('#newtcode1').after('E型玻纤'+ + '环氧树'); + }*/ + + } + //给安装日期赋值 + $('#newspan_installDate').html(bott ? bott.installDate.substring(0, 11) : ''); + + }); + currentDate = new Date().format("yyyy-MM-dd hh:mm:ss"); + $('.currentDate').text(currentDate); + $.ajax({ + type: 'get', + url: '/printBottcert/getCurrentRegDept',//得到当前登录部门 + }).done(function (data) { + $('.currentDept').text(data.name); + + }); + }); + + $('#newprintBtn').click(function () { + currentMater = oriGrid.getSelected()[0]; + if ((currentMater.carState == 4 && currentMater.bottleNum > 0) || (currentMater.carState == 5 && currentMater.bottleNum > 0)) { + $('#newprintForm').css('margin-top', '20px'); + $('#newinlineBottle2').css({'margin-left': '0px', 'margin-top': '30px'}); + $('.Noprint').hide(); + $('.title_td').css('width', '60px'); + $('#newmytable_gzz').css({'padding-left': '30px', 'width': '490px'}); + $('h1').css({'font-size': '20px', 'font-family': '宋体', 'text-align': 'center'}); + $('.title_td1').css({ + 'font-size': '12px', + 'width': '81px', + 'padding': '-1px 1px 1px 1px', + 'text-align': 'center', + 'height': '25px' + }); + $('.title_td').css({ + 'font-size': '12px', + 'width': '60px', + 'padding': '-1px 1px 1px 1px', + 'text-align': 'center', + 'height': '25px' + }); + $('.alt').css({ + 'font-family': '宋体', + 'font-size': '12px', + 'width': '160px', + 'padding': '-1px 1px 1px 1px', + 'text-align': 'left', + 'height': '2px' + }); + $('.tab_2').css({'width': '500px', 'margin-top': '70px', 'left': '0px', 'margin-left': '-22px'}); + $('.inf_td').css({ + 'font-family': '宋体', + 'font-weight': 'bold', + 'font-size': '11px', + '-webkit-transform': 'scale(0.8)', + 'text-align': 'left', + 'padding': '0px', + 'left': '10px' + }); + $('.cy_td').css({'height': '60px', 'font-family': '宋体', 'font-size': '11px', 'text-align': 'right'}); + $('#newbotttr2').css({ + 'font-family': '宋体', + 'font-weight': 'bold', + 'font-size': '11px', + 'padding': '0px', + 'text-align': 'left', + 'padding': '0px', + 'left': '10px' + }); + $('#newinlineBottle2').css({ + 'font-family': '宋体', + 'font-weight': 'bold', + 'font-size': '11px', + 'text-align': 'left', + 'padding': '0px', + 'left': '10px' + }); + if (clickType == 0) { + $("#newshowBottle2").css("margin-top", "70px"); + } else if (clickType == 1) { + $('#newinlineBottle2').css('margin-left', '0px'); + $("#newshowBottle2").css("margin-top", "-35px"); + } else if (clickType == 2) { + $('#newinlineBottle2').css('margin-left', '0px'); + $("#newshowBottle2").css("margin-top", "287px"); + } + $('#newmytable_dy').jqprint(); + setTimeout(function () { + //增加打印次数 + $.ajax({ + type: 'put', + url: '/printBottcert/printBottleCert', + data: { + id: currentMater.id + } + }).done(function (bottles) { + oriGrid.load(); + }); + + + }, 2000); + } else { + $.error("当前车辆不能打印气瓶使用登记证!"); + } + }); + $('#newallBtn').click(function () { + clickType = 0; + $('#main').hide(); + $('#newshowCard').show(); + $('#newshowBottle2').show(); + $('#newshow_bottom1').show(); + $('#newshow_bottom2').hide(); + $("#newshowBottle2").css("margin-top", "70px"); + }); + $('#newfirstBtn').click(function () { + clickType = 1; + $('#main').hide(); + $('#newshowCard').hide(); + $('#newshowBottle2').show(); + $('#newshow_bottom1').hide(); + $('#newshow_bottom2').show(); + $('#newinlineBottle2').css('margin-left', '0px'); + $("#newshowBottle2").css("margin-top", "0px"); + }); + $('#newtwoBtn').click(function () { + clickType = 2; + $('#main').hide(); + $('#newshowCard').hide(); + $('#newshowBottle2').show(); + $('#newshow_bottom1').hide(); + $('#newshow_bottom2').show(); + $('#newinlineBottle2').css('margin-left', '0px'); + $("#newshowBottle2").css("margin-top", "287px"); + }); }); \ No newline at end of file diff --git a/src/main/webapp/app/specialInspection/refidtagsend/refidtagsend.js b/src/main/webapp/app/specialInspection/refidtagsend/refidtagsend.js index ae27d51..4c30724 100644 --- a/src/main/webapp/app/specialInspection/refidtagsend/refidtagsend.js +++ b/src/main/webapp/app/specialInspection/refidtagsend/refidtagsend.js @@ -491,7 +491,6 @@ $(document).ready(function() { } }); }); - }); function todate(dodate){ diff --git a/src/main/webapp/system/login/login.html b/src/main/webapp/system/login/login.html index d840dee..7ce92f6 100644 --- a/src/main/webapp/system/login/login.html +++ b/src/main/webapp/system/login/login.html @@ -3,15 +3,28 @@ - 系统通知 - - + 登录 | CDCNG + + + + + + + - + + + + + + - + + + + @@ -19,17 +32,49 @@