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

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

View File

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

View File

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

View File

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

View File

@ -8,14 +8,14 @@
#{createTime}, #{updateTime},#{devModel},#{onLine})
</insert>
<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)
values (#{deviceCode}, #{deviceName},#{proId}, #{createUser}, #{updateUser},
#{createTime}, #{updateTime})
</insert>
<update id="updatePmAttDevice">
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>
<delete id="delPmAttDevice">
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 pad2.device_code as deviceCode,
pad2.device_name as deviceName,
pad2.pro_id as proId,,
pad2.pro_id as proId,
pad2.update_user as updateUser,
pad2.update_time as updateTime,
pad2.create_user as createUser,
pad2.create_time as createTime
pad2.update_time as updateTime
from pm_att_device pad2
where pad2.is_active = '1' and pad2.device_code = #{deviceCode}
</select>