班组管理,班组出入场,考勤机管理

This commit is contained in:
马三炮 2025-08-16 19:09:46 +08:00
parent 4c95d2b3cd
commit 51ce31e185
5 changed files with 24 additions and 19 deletions

View File

@ -13,10 +13,7 @@ import com.bonus.common.security.annotation.InnerAuth;
import com.bonus.common.security.annotation.RequiresPermissions; import com.bonus.common.security.annotation.RequiresPermissions;
import com.bonus.common.security.annotation.RequiresPermissionsOrInnerAuth; import com.bonus.common.security.annotation.RequiresPermissionsOrInnerAuth;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -56,9 +53,9 @@ public class PmAttDeviceController extends BaseController {
* 新增考勤机 * 新增考勤机
*/ */
// @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("sub:contract:list")) // @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("sub:contract:list"))
@GetMapping("/addPmAttDevice") @PostMapping("/addPmAttDevice")
@SysLog(title = "考勤机", businessType = OperaType.QUERY, logType = 0, module = "考勤机->新增考勤机") @SysLog(title = "考勤机", businessType = OperaType.QUERY, logType = 0, module = "考勤机->新增考勤机")
public AjaxResult addPmAttDevice(PmAttDevice pmAttDevice) { public AjaxResult addPmAttDevice( @RequestBody PmAttDevice pmAttDevice) {
try { try {
int res = pmAttDeviceService.addPmAttDevice(pmAttDevice); int res = pmAttDeviceService.addPmAttDevice(pmAttDevice);
if (res>0){ if (res>0){
@ -77,9 +74,9 @@ public class PmAttDeviceController extends BaseController {
* 解绑 * 解绑
*/ */
// @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("sub:contract:list")) // @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("sub:contract:list"))
@GetMapping("/updatePmAttDevice") @PostMapping("/updatePmAttDevice")
@SysLog(title = "考勤机", businessType = OperaType.QUERY, logType = 0, module = "考勤机->解绑") @SysLog(title = "考勤机", businessType = OperaType.QUERY, logType = 0, module = "考勤机->解绑")
public AjaxResult updatePmAttDevice(PmAttDevice pmAttDevice) { public AjaxResult updatePmAttDevice(@RequestBody PmAttDevice pmAttDevice) {
try { try {
int res = pmAttDeviceService.updatePmAttDevice(pmAttDevice); int res = pmAttDeviceService.updatePmAttDevice(pmAttDevice);
if (res>0){ if (res>0){
@ -98,9 +95,9 @@ public class PmAttDeviceController extends BaseController {
* 删除考勤机 * 删除考勤机
*/ */
// @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("sub:contract:list")) // @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("sub:contract:list"))
@GetMapping("/delPmAttDevice") @PostMapping("/delPmAttDevice")
@SysLog(title = "考勤机", businessType = OperaType.QUERY, logType = 0, module = "考勤机->删除考勤机") @SysLog(title = "考勤机", businessType = OperaType.QUERY, logType = 0, module = "考勤机->删除考勤机")
public AjaxResult delPmAttDevice(PmAttDevice pmAttDevice) { public AjaxResult delPmAttDevice(@RequestBody PmAttDevice pmAttDevice) {
try { try {
int res = pmAttDeviceService.delPmAttDevice(pmAttDevice); int res = pmAttDeviceService.delPmAttDevice(pmAttDevice);
if (res>0){ if (res>0){

View File

@ -27,6 +27,11 @@ public class PmAttDevice {
*/ */
private Integer proId; private Integer proId;
/**
*
*/
private String proName;
/** /**
*创建人 *创建人
*/ */
@ -37,6 +42,11 @@ public class PmAttDevice {
*/ */
private String updateUser; private String updateUser;
/**
* 是否上海项目 1 0 不是
*/
private Integer isShanghai;
/** /**
* 创建时间 * 创建时间
*/ */

View File

@ -39,7 +39,7 @@ public class PmAttDeviceVo {
/** /**
* 是否上海项目 1 0 不是 * 是否上海项目 1 0 不是
*/ */
@Excel(name = "是否上海项目",sort = 4) @Excel(name = "是否上海项目",sort = 4,readConverterExp = "0=上海外,1=上海内")
private Integer isShanghai; private Integer isShanghai;
/** /**

View File

@ -76,9 +76,9 @@ public class PmAttDeviceServiceImpl implements PmAttDeviceService {
pmAttDeviceOld.setCreateUser(SecurityUtils.getUsername()); pmAttDeviceOld.setCreateUser(SecurityUtils.getUsername());
pmAttDeviceOld.setCreateTime(new Date()); pmAttDeviceOld.setCreateTime(new Date());
pmAttDeviceMapper.addPmAttDeviceHis(pmAttDeviceOld); pmAttDeviceMapper.addPmAttDeviceHis(pmAttDeviceOld);
//考勤机解绑
// remoteUrkUtilsService.delDevByProId(pmAttDevice.getDeviceCode(),pmAttDeviceOld.getProId(),null);
} }
//考勤机解绑
remoteUrkUtilsService.delDevByProId(pmAttDevice.getDeviceCode(),pmAttDevice.getProId(),null);
return pmAttDeviceMapper.updatePmAttDevice(pmAttDevice); return pmAttDeviceMapper.updatePmAttDevice(pmAttDevice);
} }

View File

@ -8,14 +8,14 @@
#{createTime}, #{updateTime},#{devModel},#{onLine}) #{createTime}, #{updateTime},#{devModel},#{onLine})
</insert> </insert>
<insert id="addPmAttDeviceHis"> <insert id="addPmAttDeviceHis">
insert into pm_att_device (device_code, device_name, pro_id,create_user, update_user, insert into pm_att_device_his (device_code, device_name, pro_id,create_user, update_user,
create_time, update_time) create_time, update_time)
values (#{deviceCode}, #{deviceName},#{proId}, #{createUser}, #{updateUser}, values (#{deviceCode}, #{deviceName},#{proId}, #{createUser}, #{updateUser},
#{createTime}, #{updateTime}) #{createTime}, #{updateTime})
</insert> </insert>
<update id="updatePmAttDevice"> <update id="updatePmAttDevice">
update pm_att_device set pro_id = #{proId},update_time = #{updateTime},update_user = #{updateUser} update pm_att_device set pro_id = #{proId},update_time = #{updateTime},update_user = #{updateUser}
where is_active = '0' and device_code = #{deviceCode} where is_active = '1' and device_code = #{deviceCode}
</update> </update>
<delete id="delPmAttDevice"> <delete id="delPmAttDevice">
update pm_att_device set is_active = '0' where device_code = #{deviceCode} update pm_att_device set is_active = '0' where device_code = #{deviceCode}
@ -48,11 +48,9 @@
<select id="getPmAttDeviceByCoode" resultType="com.bonus.bmw.domain.po.PmAttDevice"> <select id="getPmAttDeviceByCoode" resultType="com.bonus.bmw.domain.po.PmAttDevice">
select pad2.device_code as deviceCode, select pad2.device_code as deviceCode,
pad2.device_name as deviceName, pad2.device_name as deviceName,
pad2.pro_id as proId,, pad2.pro_id as proId,
pad2.update_user as updateUser, pad2.update_user as updateUser,
pad2.update_time as updateTime, pad2.update_time as updateTime
pad2.create_user as createUser,
pad2.create_time as createTime
from pm_att_device pad2 from pm_att_device pad2
where pad2.is_active = '1' and pad2.device_code = #{deviceCode} where pad2.is_active = '1' and pad2.device_code = #{deviceCode}
</select> </select>