21 files modified
1 files added
| | |
| | | List<String> list = Arrays.asList(ids.split(",")); |
| | | //批量审核 |
| | | list.forEach(id->{ |
| | | accreditationRecords.setId(id); |
| | | accreditationRecords.setId(Long.parseLong(id)); |
| | | accreditationRecords.setAuditTime(new Date()); |
| | | accreditationRecordsService.updateById(accreditationRecords); |
| | | //审核通过 |
| | |
| | | * 制证记录主键id,非自增 |
| | | */ |
| | | @TableId(value = "id",type = IdType.ASSIGN_ID) |
| | | private String id; |
| | | private Long id; |
| | | |
| | | /** |
| | | * 制证人 user_id |
| | |
| | | list.forEach(id -> { |
| | | AccreditationRecords records = new AccreditationRecords(); |
| | | records.setStatus(2); |
| | | records.setId(id); |
| | | records.setId(Long.parseLong(id)); |
| | | //更新 |
| | | this.updateById(records); |
| | | |
| | |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.dispatcher.entity.DispatcherUnit; |
| | | import org.springblade.modules.dispatcher.service.IDispatcherUnitService; |
| | | import org.springblade.modules.dispatcher.vo.DispatcherStatistics; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | |
| | | return R.status(dispatcherService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 派遣服务单位统计 |
| | | * @return |
| | | */ |
| | | @GetMapping("/getStatistics") |
| | | public R getStatistics(DispatcherStatistics dispatcherStatistics){ |
| | | List<DispatcherStatistics> list = dispatcherService.getDispatcherStatisticsList(dispatcherStatistics); |
| | | return R.data(list); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.SqlParser; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.modules.dispatcher.entity.Dispatcher; |
| | | import org.springblade.modules.dispatcher.vo.DispatcherStatistics; |
| | | import org.springblade.modules.dispatcher.vo.DispatcherUnitVO; |
| | | import org.springblade.modules.dispatcher.vo.DispatcherVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | |
| | | DispatcherVO getDispatcherInfoByUserId(@Param("userId") Long userId); |
| | | |
| | | void updateEndtime(String endTime,String disId); |
| | | |
| | | List<DispatcherStatistics> getDispatcherStatisticsList(@Param("statistics") DispatcherStatistics dispatcherStatistics); |
| | | } |
| | |
| | | update sys_dispatcher set end_time =#{endTime} where dispatcher_unit_id =#{disId} |
| | | </update> |
| | | |
| | | <select id="getDispatcherStatisticsList" |
| | | resultType="org.springblade.modules.dispatcher.vo.DispatcherStatistics"> |
| | | |
| | | <!-- SELECT--> |
| | | <!-- sd.dept_id,--> |
| | | <!-- bd.dept_name,--> |
| | | <!-- COUNT(*) total,--> |
| | | <!-- SUM( CASE WHEN bu.hold = '1' THEN 1 ELSE 0 END ) AS holdNum,--> |
| | | <!-- SUM( CASE WHEN bu.hold = '2' THEN 1 ELSE 0 END ) AS unholdNum--> |
| | | <!-- FROM--> |
| | | <!-- sys_dispatcher sd--> |
| | | <!-- LEFT JOIN blade_user bu ON bu.id = sd.user_ids--> |
| | | <!-- LEFT JOIN blade_dept bd ON bd.id = sd.dept_id--> |
| | | <!-- WHERE sd.`status` = 0--> |
| | | <!-- <if test="statistics.deptId != null and statistics.deptId !='' ">--> |
| | | <!-- AND sd.dept_id = #{statistics.deptId}--> |
| | | <!-- </if>--> |
| | | <!-- GROUP BY--> |
| | | <!-- sd.dept_id,--> |
| | | <!-- bd.dept_name--> |
| | | |
| | | SELECT |
| | | sdu.id unitId, |
| | | sdu.name unitName, |
| | | COUNT(*) total, |
| | | SUM( CASE WHEN bu.hold = '1' THEN 1 ELSE 0 END ) AS holdNum, |
| | | SUM( CASE WHEN bu.hold = '2' THEN 1 ELSE 0 END ) AS unholdNum |
| | | FROM |
| | | sys_dispatcher sd |
| | | LEFT JOIN blade_user bu ON bu.id = sd.user_ids |
| | | LEFT JOIN sys_dispatcher_unit sdu ON sdu.id = sd.dispatcher_unit_id |
| | | LEFT JOIN blade_dept bd ON bd.id = sd.dept_id |
| | | WHERE |
| | | sd.`status` = 0 |
| | | <if test="statistics.deptId != null and statistics.deptId !='' "> |
| | | AND sd.dept_id = #{statistics.deptId} |
| | | </if> |
| | | GROUP BY |
| | | sdu.id, |
| | | sdu.name |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | package org.springblade.modules.dispatcher.service; |
| | | |
| | | import org.springblade.modules.dispatcher.entity.Dispatcher; |
| | | import org.springblade.modules.dispatcher.vo.DispatcherStatistics; |
| | | import org.springblade.modules.dispatcher.vo.DispatcherUnitVO; |
| | | import org.springblade.modules.dispatcher.vo.DispatcherVO; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 服务类 |
| | |
| | | */ |
| | | DispatcherVO getDispatcherInfoByUserId(Long userId); |
| | | void updateEndtime(String endTime,String disId); |
| | | |
| | | List<DispatcherStatistics> getDispatcherStatisticsList(DispatcherStatistics dispatcherStatistics); |
| | | } |
| | |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.modules.dispatcher.entity.Dispatcher; |
| | | import org.springblade.modules.dispatcher.vo.DispatcherStatistics; |
| | | import org.springblade.modules.dispatcher.vo.DispatcherUnitVO; |
| | | import org.springblade.modules.dispatcher.vo.DispatcherVO; |
| | | import org.springblade.modules.dispatcher.mapper.DispatcherMapper; |
| | |
| | | public void updateEndtime(String endTime, String disId) { |
| | | baseMapper.updateEndtime(endTime, disId); |
| | | } |
| | | |
| | | @Override |
| | | public List<DispatcherStatistics> getDispatcherStatisticsList(DispatcherStatistics dispatcherStatistics) { |
| | | return baseMapper.getDispatcherStatisticsList(dispatcherStatistics); |
| | | } |
| | | } |
| New file |
| | |
| | | package org.springblade.modules.dispatcher.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class DispatcherStatistics { |
| | | |
| | | private String deptId; |
| | | |
| | | private String deptName; |
| | | |
| | | private String unitId; |
| | | |
| | | private String unitName; |
| | | |
| | | //持证数量 |
| | | private String holdNum; |
| | | |
| | | //未持证数量 |
| | | private String unHoldNum; |
| | | |
| | | |
| | | } |
| | |
| | | equipage.setPersonInCharge("张三"); |
| | | equipage.setBrand("***有限公司"); |
| | | equipage.setDateForProduction("2021/05/01"); |
| | | equipage.setReceiveDate("2021/05/01"); |
| | | list.add(equipage); |
| | | ExcelUtil.export(response, "装备导入数据模板", "装备导入数据表", list, EquipageExcel.class); |
| | | } |
| | |
| | | * 部门id |
| | | */ |
| | | @TableField("dept_id") |
| | | private Long deptId; |
| | | private String deptId; |
| | | |
| | | /** |
| | | * 名称 |
| | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date dateForProduction; |
| | | |
| | | @TableField("receive_date") |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date receiveDate; |
| | | |
| | | /** |
| | | * 责任人id |
| | | */ |
| | | @TableField("user_id") |
| | | private Long userId; |
| | | private String userId; |
| | | |
| | | |
| | | /** |
| | |
| | | @ExcelProperty("出厂日期") |
| | | private String dateForProduction; |
| | | |
| | | /** |
| | | * 出厂日期 |
| | | */ |
| | | @ColumnWidth(25) |
| | | @ExcelProperty("领用日期") |
| | | private String receiveDate; |
| | | |
| | | |
| | | } |
| | |
| | | Equipage equipage = new Equipage(); |
| | | //使用保安公司名称匹配组织机构id |
| | | if (null!=equipageExcel.getDeptName() && equipageExcel.getDeptName()!=""){ |
| | | equipage.setDeptId(Long.parseLong(userDeptService.selectIn(equipageExcel.getDeptName()))); |
| | | equipage.setDeptId(userDeptService.selectIn(equipageExcel.getDeptName())); |
| | | } |
| | | |
| | | if (null!=equipageExcel.getBrand() && equipageExcel.getBrand()!="") { |
| | |
| | | } |
| | | } |
| | | |
| | | if (null!=equipageExcel.getReceiveDate() && !equipageExcel.getReceiveDate().equals("")) { |
| | | try { |
| | | equipage.setReceiveDate(new SimpleDateFormat("yyyy/MM/dd").parse(equipageExcel.getReceiveDate())); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | //插入数据 |
| | | this.save(equipage); |
| | | |
| | | if (null!=equipageExcel.getDateForProduction() && !equipageExcel.getDateForProduction().equals("")) { |
| | | //数据推送 |
| | | String s1 = |
| | | "insert into sys_equipage(id,name,mode,dept_id,person_in_charge,brand,date_for_production,num) " + |
| | | "values(" + "'" + equipage.getId() + "'" + "," + |
| | | "'" + equipage.getName() + "'" + "," + |
| | | "'" + equipage.getMode() + "'" + "," + |
| | | "'" + equipage.getDeptId() + "'" + "," + |
| | | "'" + equipage.getPersonInCharge() + "'" + "," + |
| | | "'" + equipage.getBrand() + "'" + "," + |
| | | "'" + new SimpleDateFormat("yyyy/MM/dd").format(equipage.getDateForProduction()) + "'" + "," + |
| | | "'" + equipage.getNum() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }else { |
| | | //数据推送 |
| | | String s1 = |
| | | "insert into sys_equipage(id,name,mode,dept_id,person_in_charge,brand,num) " + |
| | | "values(" + "'" + equipage.getId() + "'" + "," + |
| | | "'" + equipage.getName() + "'" + "," + |
| | | "'" + equipage.getMode() + "'" + "," + |
| | | "'" + equipage.getDeptId() + "'" + "," + |
| | | "'" + equipage.getPersonInCharge() + "'" + "," + |
| | | "'" + equipage.getBrand() + "'" + "," + |
| | | "'" + equipage.getNum() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | // if (null!=equipageExcel.getDateForProduction() && !equipageExcel.getDateForProduction().equals("")) { |
| | | // //数据推送 |
| | | // String s1 = |
| | | // "insert into sys_equipage(id,name,mode,dept_id,person_in_charge,brand,date_for_production,num) " + |
| | | // "values(" + "'" + equipage.getId() + "'" + "," + |
| | | // "'" + equipage.getName() + "'" + "," + |
| | | // "'" + equipage.getMode() + "'" + "," + |
| | | // "'" + equipage.getDeptId() + "'" + "," + |
| | | // "'" + equipage.getPersonInCharge() + "'" + "," + |
| | | // "'" + equipage.getBrand() + "'" + "," + |
| | | // "'" + new SimpleDateFormat("yyyy/MM/dd").format(equipage.getDateForProduction()) + "'" + "," + |
| | | // "'" + equipage.getNum() + "'" + ")"; |
| | | // //FtpUtil.sqlFileUpload(s1); |
| | | // myAsyncService.dataSync(s1); |
| | | // }else { |
| | | // //数据推送 |
| | | // String s1 = |
| | | // "insert into sys_equipage(id,name,mode,dept_id,person_in_charge,brand,num) " + |
| | | // "values(" + "'" + equipage.getId() + "'" + "," + |
| | | // "'" + equipage.getName() + "'" + "," + |
| | | // "'" + equipage.getMode() + "'" + "," + |
| | | // "'" + equipage.getDeptId() + "'" + "," + |
| | | // "'" + equipage.getPersonInCharge() + "'" + "," + |
| | | // "'" + equipage.getBrand() + "'" + "," + |
| | | // "'" + equipage.getNum() + "'" + ")"; |
| | | // //FtpUtil.sqlFileUpload(s1); |
| | | // myAsyncService.dataSync(s1); |
| | | // } |
| | | }); |
| | | } |
| | | } |
| | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date confirmTime; |
| | | |
| | | private String auditUser; |
| | | |
| | | } |
| | |
| | | ke.*, |
| | | bu.real_name realName, |
| | | bd.dept_name deptName, |
| | | bu1.real_name confirmUserName |
| | | bu1.real_name confirmUserName, |
| | | bu2.real_name auditUserName |
| | | FROM |
| | | ksxt_exam ke |
| | | left join |
| | |
| | | blade_user bu1 |
| | | on |
| | | ke.confirm_user = bu1.id |
| | | left join |
| | | blade_user bu2 |
| | | on |
| | | ke.audit_user = bu2.id |
| | | where |
| | | 1=1 |
| | | <if test="paper.examType!=null and paper.examType!=''"> |
| | |
| | | ifnull(DATE_FORMAT(NOW(), '%Y') - SUBSTRING( bu.cardid,7,4),0) age, |
| | | bu1.real_name applyRealName, |
| | | ke.exam_name examName,date_format(ke.start_time,'%Y-%m-%d') examTime, |
| | | bt1.dept_name applyUnitName |
| | | bt1.dept_name applyUnitName, |
| | | bu2.real_name as auditUserName |
| | | FROM |
| | | sys_score_audit_records ssar |
| | | left join |
| | |
| | | sys_jurisdiction sj |
| | | on |
| | | sj.id = si.jurisdiction |
| | | left join |
| | | blade_user bu2 |
| | | on |
| | | ssar.audit_user = bu2.id |
| | | WHERE |
| | | 1=1 |
| | | and bu.status = 1 |
| | |
| | | * 学校名称 |
| | | */ |
| | | private String schoolName; |
| | | |
| | | private String auditUserName; |
| | | } |
| | |
| | | */ |
| | | private String examTime; |
| | | |
| | | private String auditUserName; |
| | | } |
| | |
| | | <if test="vo.userName != null and vo.userName !='' "> |
| | | AND bu.real_name LIKE CONCAT('%',#{vo.userName},'%') |
| | | </if> |
| | | <if test="vo.status != null and vo.status !='' "> |
| | | AND scr.status = #{vo.status} |
| | | </if> |
| | | ORDER BY scr.check_time DESC |
| | | |
| | | </select> |
| | |
| | | return R.data(200,null,"修改成功!"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 离职 |
| | | */ |
| | | @PostMapping("/userLeave") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入User") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R userLeave(@Valid @RequestBody Map<String, Object> userMap) throws Exception { |
| | | //获取user |
| | | User user = JSON.parseObject(JSON.toJSONString(userMap), User.class); |
| | | //分配保安角色 |
| | | CacheUtil.clear(USER_CACHE); |
| | | // 指纹设置 |
| | | fingerprintSet(user); |
| | | //如果是离职 |
| | | boolean b = leaveHandle(user); |
| | | return R.status(b); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 离职处理 |
| | | * @param user |
| | |
| | | dispatcher1.setStatus(1); |
| | | dispatcher1.setUpdateTime(new Date()); |
| | | boolean b = dispatcherService.updateById(dispatcher1); |
| | | if (b) { |
| | | String s1 = |
| | | "update sys_dispatcher set status = " + "'" + dispatcher1.getStatus() + "'" |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(dispatcher1.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + dispatcher1.getId() + "'"; |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | // if (b) { |
| | | // String s1 = |
| | | // "update sys_dispatcher set status = " + "'" + dispatcher1.getStatus() + "'" |
| | | // + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(dispatcher1.getUpdateTime()) + "'" |
| | | // + " " + "where id = " + "'" + dispatcher1.getId() + "'"; |
| | | // myAsyncService.dataSync(s1); |
| | | // } |
| | | }); |
| | | } |
| | | |
| | |
| | | experience1.setDeparturetime(new Date()); |
| | | //更新从业记录信息 |
| | | experienceService.updateById(experience1); |
| | | //数据同步 |
| | | String s1 = |
| | | "update sys_experience set departureTime = " + "'" + new SimpleDateFormat("yyyy-MM-dd").format(experience1.getDeparturetime()) + "'" |
| | | + " " + "where id = " + "'" + experience1.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.dataSync(s1); |
| | | // //数据同步 |
| | | // String s1 = |
| | | // "update sys_experience set departureTime = " + "'" + new SimpleDateFormat("yyyy-MM-dd").format(experience1.getDeparturetime()) + "'" |
| | | // + " " + "where id = " + "'" + experience1.getId() + "'"; |
| | | // //FtpUtil.sqlFileUpload(s1); |
| | | // myAsyncService.dataSync(s1); |
| | | } else { |
| | | experience.setDeparturetime(new Date()); |
| | | experience.setName(user.getRealName()); |
| | |
| | | @TableField("reason_for_leav") |
| | | private String reasonForLeav; |
| | | |
| | | /** |
| | | * 离职图片 |
| | | */ |
| | | @TableField("img_for_leav") |
| | | private String imgForLeav; |
| | | |
| | | private String holdv; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | |
| | | */ |
| | | @Override |
| | | public UserVO getUserDetails(User user) { |
| | | |
| | | |
| | | |
| | | return baseMapper.getUserDetails(user); |
| | | } |
| | | |