权限管理
This commit is contained in:
parent
372dfad6f2
commit
81f4b8347c
|
|
@ -3,6 +3,7 @@ package com.bonus.bmw.controller;
|
||||||
import com.bonus.bmw.domain.dto.FileBasicMsgDto;
|
import com.bonus.bmw.domain.dto.FileBasicMsgDto;
|
||||||
import com.bonus.bmw.domain.dto.WebFileDto;
|
import com.bonus.bmw.domain.dto.WebFileDto;
|
||||||
import com.bonus.bmw.domain.po.BmSubContract;
|
import com.bonus.bmw.domain.po.BmSubContract;
|
||||||
|
import com.bonus.bmw.domain.po.PmSub;
|
||||||
import com.bonus.bmw.domain.vo.BmSubContractVo;
|
import com.bonus.bmw.domain.vo.BmSubContractVo;
|
||||||
import com.bonus.bmw.service.BmSubContractService;
|
import com.bonus.bmw.service.BmSubContractService;
|
||||||
import com.bonus.common.core.utils.json.FastJsonHelper;
|
import com.bonus.common.core.utils.json.FastJsonHelper;
|
||||||
|
|
@ -24,6 +25,7 @@ import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author 马三炮
|
* @author 马三炮
|
||||||
|
|
@ -130,4 +132,21 @@ public class BmSubContractController extends BaseController {
|
||||||
logger.error(e.toString(), e);
|
logger.error(e.toString(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取分包商下的班组和人员出入场信息
|
||||||
|
*/
|
||||||
|
/*@RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("pm:company:del"))*/
|
||||||
|
@PostMapping("/getTeamAndPeoNum")
|
||||||
|
@SysLog(title = "分包商管理", businessType = OperaType.UPDATE, logType = 0, module = "分包商管理->获取分包商下的班组和人员出入场信息")
|
||||||
|
public AjaxResult getTeamAndPeoNum(@Validated @RequestBody BmSubContract bmSubContract) {
|
||||||
|
try {
|
||||||
|
Map<String, Object> res = bmSubContractService.getTeamAndPerNum(bmSubContract);
|
||||||
|
return success(res);
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error(e.toString(), e);
|
||||||
|
}
|
||||||
|
return error("系统异常,请联系管理员");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,4 +39,9 @@ public interface BmSubContractMapper {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<PmSubTeamContract> getSubTeamContract(BmSubContract bmSubContract);
|
List<PmSubTeamContract> getSubTeamContract(BmSubContract bmSubContract);
|
||||||
|
|
||||||
|
|
||||||
|
Integer countTeamNum(BmSubContract bmSubContract);
|
||||||
|
|
||||||
|
Integer countProNum(BmSubContract bmSubContract);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,4 +42,5 @@ public interface PmSubMapper {
|
||||||
int delSub(PmSub pmSub);
|
int delSub(PmSub pmSub);
|
||||||
|
|
||||||
List<PmSub> selectSubListAll(PmSub pmSub);
|
List<PmSub> selectSubListAll(PmSub pmSub);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import com.bonus.bmw.domain.po.BmSubContract;
|
||||||
import com.bonus.bmw.domain.vo.BmSubContractVo;
|
import com.bonus.bmw.domain.vo.BmSubContractVo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public interface BmSubContractService {
|
public interface BmSubContractService {
|
||||||
|
|
||||||
|
|
@ -27,4 +28,6 @@ public interface BmSubContractService {
|
||||||
* 分包商合同信息详情
|
* 分包商合同信息详情
|
||||||
*/
|
*/
|
||||||
BmSubContractVo getSubContractById(BmSubContract bmSubContract);
|
BmSubContractVo getSubContractById(BmSubContract bmSubContract);
|
||||||
|
|
||||||
|
Map<String, Object> getTeamAndPerNum(BmSubContract bmSubContract);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,4 +34,5 @@ public interface PmSubService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<PmSub> selectSubListAll(PmSub pmSub);
|
List<PmSub> selectSubListAll(PmSub pmSub);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,9 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author 马三炮
|
* @author 马三炮
|
||||||
|
|
@ -65,7 +67,7 @@ public class BmSubContractServiceImpl implements BmSubContractService {
|
||||||
/*if (StringUtils.isNotNull(bmSubContractOld) && !bmSubContractOld.getId().equals(bmSubContract.getId())){
|
/*if (StringUtils.isNotNull(bmSubContractOld) && !bmSubContractOld.getId().equals(bmSubContract.getId())){
|
||||||
return res;
|
return res;
|
||||||
}*/
|
}*/
|
||||||
bmSubContract.setUpdateUser(SecurityUtils.getUsername());
|
bmSubContract.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
bmSubContract.setUpdateTime(new Date());
|
bmSubContract.setUpdateTime(new Date());
|
||||||
//出场时获取当前时间
|
//出场时获取当前时间
|
||||||
if ("2".equals(bmSubContract.getSubEinStatus())){
|
if ("2".equals(bmSubContract.getSubEinStatus())){
|
||||||
|
|
@ -88,9 +90,9 @@ public class BmSubContractServiceImpl implements BmSubContractService {
|
||||||
return res;
|
return res;
|
||||||
}*/
|
}*/
|
||||||
bmSubContract.setSubEinTime(DateUtils.getDate());
|
bmSubContract.setSubEinTime(DateUtils.getDate());
|
||||||
bmSubContract.setCreateUser(SecurityUtils.getUsername());
|
bmSubContract.setCreateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
bmSubContract.setCreateTime(new Date());
|
bmSubContract.setCreateTime(new Date());
|
||||||
bmSubContract.setUpdateUser(SecurityUtils.getUsername());
|
bmSubContract.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
bmSubContract.setUpdateTime(new Date());
|
bmSubContract.setUpdateTime(new Date());
|
||||||
res = bmSubContractMapper.addSubContract(bmSubContract);
|
res = bmSubContractMapper.addSubContract(bmSubContract);
|
||||||
}
|
}
|
||||||
|
|
@ -132,4 +134,14 @@ public class BmSubContractServiceImpl implements BmSubContractService {
|
||||||
}
|
}
|
||||||
return bmSubContractVo;
|
return bmSubContractVo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> getTeamAndPerNum(BmSubContract bmSubContract) {
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
Integer TeamNum = bmSubContractMapper.countTeamNum(bmSubContract);
|
||||||
|
map.put("teamNum",TeamNum);
|
||||||
|
Integer perNum = bmSubContractMapper.countProNum(bmSubContract);
|
||||||
|
map.put("perNum",perNum);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,9 +54,9 @@ public class PmAttDeviceServiceImpl implements PmAttDeviceService {
|
||||||
if (StringUtils.isNotNull(pmAttDeviceOld)){
|
if (StringUtils.isNotNull(pmAttDeviceOld)){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
pmAttDevice.setCreateUser(SecurityUtils.getUsername());
|
pmAttDevice.setCreateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmAttDevice.setCreateTime(new Date());
|
pmAttDevice.setCreateTime(new Date());
|
||||||
pmAttDevice.setUpdateUser(SecurityUtils.getUsername());
|
pmAttDevice.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmAttDevice.setUpdateTime(new Date());
|
pmAttDevice.setUpdateTime(new Date());
|
||||||
//新增考勤机触发
|
//新增考勤机触发
|
||||||
remoteUrkUtilsService.getUserSendToDev(pmAttDevice.getDeviceCode(),pmAttDevice.getProId(),null);
|
remoteUrkUtilsService.getUserSendToDev(pmAttDevice.getDeviceCode(),pmAttDevice.getProId(),null);
|
||||||
|
|
@ -71,9 +71,9 @@ public class PmAttDeviceServiceImpl implements PmAttDeviceService {
|
||||||
//解绑的时候在历史表插入一条数据
|
//解绑的时候在历史表插入一条数据
|
||||||
if (StringUtils.isNull(pmAttDevice.getProId())){
|
if (StringUtils.isNull(pmAttDevice.getProId())){
|
||||||
PmAttDevice pmAttDeviceOld = pmAttDeviceMapper.getPmAttDeviceByCoode(pmAttDevice);
|
PmAttDevice pmAttDeviceOld = pmAttDeviceMapper.getPmAttDeviceByCoode(pmAttDevice);
|
||||||
pmAttDeviceOld.setUpdateUser(SecurityUtils.getUsername());
|
pmAttDeviceOld.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmAttDeviceOld.setUpdateTime(new Date());
|
pmAttDeviceOld.setUpdateTime(new Date());
|
||||||
pmAttDeviceOld.setCreateUser(SecurityUtils.getUsername());
|
pmAttDeviceOld.setCreateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmAttDeviceOld.setCreateTime(new Date());
|
pmAttDeviceOld.setCreateTime(new Date());
|
||||||
pmAttDeviceMapper.addPmAttDeviceHis(pmAttDeviceOld);
|
pmAttDeviceMapper.addPmAttDeviceHis(pmAttDeviceOld);
|
||||||
//考勤机解绑
|
//考勤机解绑
|
||||||
|
|
@ -84,6 +84,10 @@ public class PmAttDeviceServiceImpl implements PmAttDeviceService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int delPmAttDevice(PmAttDevice pmAttDevice) {
|
public int delPmAttDevice(PmAttDevice pmAttDevice) {
|
||||||
return pmAttDeviceMapper.delPmAttDevice(pmAttDevice);
|
int res = pmAttDeviceMapper.delPmAttDevice(pmAttDevice);
|
||||||
|
PmAttDevice pmAttDeviceOld = pmAttDeviceMapper.getPmAttDeviceByCoode(pmAttDevice);
|
||||||
|
//考勤机解绑
|
||||||
|
remoteUrkUtilsService.delDevByProId(pmAttDevice.getDeviceCode(),pmAttDeviceOld.getProId(),null);
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,16 +47,16 @@ public class PmComServiceImpl implements PmComService {
|
||||||
if (StringUtils.isNotNull(pmCompanyOld) && !pmCompanyOld.getId().equals(pmCompany.getId())){
|
if (StringUtils.isNotNull(pmCompanyOld) && !pmCompanyOld.getId().equals(pmCompany.getId())){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
pmCompany.setUpdateUser(SecurityUtils.getUsername());
|
pmCompany.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmCompany.setUpdateTime(new Date());
|
pmCompany.setUpdateTime(new Date());
|
||||||
return pmComMapper.updatePmCompany(pmCompany);
|
return pmComMapper.updatePmCompany(pmCompany);
|
||||||
}else {
|
}else {
|
||||||
if (StringUtils.isNotNull(pmCompanyOld)){
|
if (StringUtils.isNotNull(pmCompanyOld)){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
pmCompany.setCreateUser(SecurityUtils.getUsername());
|
pmCompany.setCreateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmCompany.setCreateTime(new Date());
|
pmCompany.setCreateTime(new Date());
|
||||||
pmCompany.setUpdateUser(SecurityUtils.getUsername());
|
pmCompany.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmCompany.setUpdateTime(new Date());
|
pmCompany.setUpdateTime(new Date());
|
||||||
return pmComMapper.addPmCompany(pmCompany);
|
return pmComMapper.addPmCompany(pmCompany);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -59,16 +59,16 @@ public class PmMainProjectServiceImpl implements PmMainProjectService {
|
||||||
if (StringUtils.isNotNull(pmMainProjectOld) && !pmMainProjectOld.getId().equals(pmMainProject.getId())){
|
if (StringUtils.isNotNull(pmMainProjectOld) && !pmMainProjectOld.getId().equals(pmMainProject.getId())){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
pmMainProject.setUpdateUser(SecurityUtils.getUsername());
|
pmMainProject.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmMainProject.setUpdateTime(new Date());
|
pmMainProject.setUpdateTime(new Date());
|
||||||
return pmMainProjectMapper.updateMainProject(pmMainProject);
|
return pmMainProjectMapper.updateMainProject(pmMainProject);
|
||||||
}else {
|
}else {
|
||||||
if (StringUtils.isNotNull(pmMainProjectOld)){
|
if (StringUtils.isNotNull(pmMainProjectOld)){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
pmMainProject.setCreateUser(SecurityUtils.getUsername());
|
pmMainProject.setCreateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmMainProject.setCreateTime(new Date());
|
pmMainProject.setCreateTime(new Date());
|
||||||
pmMainProject.setUpdateUser(SecurityUtils.getUsername());
|
pmMainProject.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmMainProject.setUpdateTime(new Date());
|
pmMainProject.setUpdateTime(new Date());
|
||||||
return pmMainProjectMapper.addMainProject(pmMainProject);
|
return pmMainProjectMapper.addMainProject(pmMainProject);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package com.bonus.bmw.service.impl;
|
package com.bonus.bmw.service.impl;
|
||||||
|
|
||||||
import com.bonus.bmw.domain.po.PmMainProject;
|
|
||||||
import com.bonus.bmw.domain.po.PmOrg;
|
import com.bonus.bmw.domain.po.PmOrg;
|
||||||
import com.bonus.bmw.domain.po.PmProject;
|
import com.bonus.bmw.domain.po.PmProject;
|
||||||
import com.bonus.bmw.domain.vo.PmOrgVo;
|
import com.bonus.bmw.domain.vo.PmOrgVo;
|
||||||
|
|
@ -61,16 +60,16 @@ public class PmOrgServiceImpl implements PmOrgService {
|
||||||
if (StringUtils.isNotNull(pmOrgOld) && !pmOrgOld.getId().equals(pmOrg.getId())){
|
if (StringUtils.isNotNull(pmOrgOld) && !pmOrgOld.getId().equals(pmOrg.getId())){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
pmOrg.setUpdateUser(SecurityUtils.getUsername());
|
pmOrg.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmOrg.setUpdateTime(new Date());
|
pmOrg.setUpdateTime(new Date());
|
||||||
return pmOrgMapper.updatePmOrg(pmOrg);
|
return pmOrgMapper.updatePmOrg(pmOrg);
|
||||||
}else {
|
}else {
|
||||||
if (StringUtils.isNotNull(pmOrgOld)){
|
if (StringUtils.isNotNull(pmOrgOld)){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
pmOrg.setCreateUser(SecurityUtils.getUsername());
|
pmOrg.setCreateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmOrg.setCreateTime(new Date());
|
pmOrg.setCreateTime(new Date());
|
||||||
pmOrg.setUpdateUser(SecurityUtils.getUsername());
|
pmOrg.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmOrg.setUpdateTime(new Date());
|
pmOrg.setUpdateTime(new Date());
|
||||||
return pmOrgMapper.addPmOrg(pmOrg);
|
return pmOrgMapper.addPmOrg(pmOrg);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,16 +42,16 @@ public class PmPostTypeServiceImpl implements PmPostTypeService {
|
||||||
if (StringUtils.isNotNull(pmPostTypeOld) && !pmPostTypeOld.getId().equals(pmPostType.getId())){
|
if (StringUtils.isNotNull(pmPostTypeOld) && !pmPostTypeOld.getId().equals(pmPostType.getId())){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
pmPostType.setUpdateUser(SecurityUtils.getUsername());
|
pmPostType.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmPostType.setUpdateTime(new Date());
|
pmPostType.setUpdateTime(new Date());
|
||||||
return pmPostTypeMapper.updatePostType(pmPostType);
|
return pmPostTypeMapper.updatePostType(pmPostType);
|
||||||
}else {
|
}else {
|
||||||
if (StringUtils.isNotNull(pmPostTypeOld)){
|
if (StringUtils.isNotNull(pmPostTypeOld)){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
pmPostType.setCreateUser(SecurityUtils.getUsername());
|
pmPostType.setCreateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmPostType.setCreateTime(new Date());
|
pmPostType.setCreateTime(new Date());
|
||||||
pmPostType.setUpdateUser(SecurityUtils.getUsername());
|
pmPostType.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmPostType.setUpdateTime(new Date());
|
pmPostType.setUpdateTime(new Date());
|
||||||
return pmPostTypeMapper.addPostType(pmPostType);
|
return pmPostTypeMapper.addPostType(pmPostType);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ public class PmProjectServiceImpl implements PmProjectService {
|
||||||
if (StringUtils.isNotNull(pmProjectOld) && !pmProjectOld.getId().equals(pmProject.getId())){
|
if (StringUtils.isNotNull(pmProjectOld) && !pmProjectOld.getId().equals(pmProject.getId())){
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
pmProject.setUpdateUser(SecurityUtils.getUsername());
|
pmProject.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmProject.setUpdateTime(new Date());
|
pmProject.setUpdateTime(new Date());
|
||||||
res= pmProjectMapper.updateProject(pmProject);
|
res= pmProjectMapper.updateProject(pmProject);
|
||||||
//修改总工程状态
|
//修改总工程状态
|
||||||
|
|
@ -62,9 +62,9 @@ public class PmProjectServiceImpl implements PmProjectService {
|
||||||
if (StringUtils.isNotNull(pmProjectOld)){
|
if (StringUtils.isNotNull(pmProjectOld)){
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
pmProject.setCreateUser(SecurityUtils.getUsername());
|
pmProject.setCreateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmProject.setCreateTime(new Date());
|
pmProject.setCreateTime(new Date());
|
||||||
pmProject.setUpdateUser(SecurityUtils.getUsername());
|
pmProject.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmProject.setUpdateTime(new Date());
|
pmProject.setUpdateTime(new Date());
|
||||||
res= pmProjectMapper.addProject(pmProject);
|
res= pmProjectMapper.addProject(pmProject);
|
||||||
//修改总工程状态
|
//修改总工程状态
|
||||||
|
|
|
||||||
|
|
@ -49,16 +49,16 @@ public class PmSubComServiceImpl implements PmSubComService {
|
||||||
if (StringUtils.isNotNull(pmSubCompanyOld) && !pmSubCompanyOld.getId().equals(pmSubCompany.getId())){
|
if (StringUtils.isNotNull(pmSubCompanyOld) && !pmSubCompanyOld.getId().equals(pmSubCompany.getId())){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
pmSubCompany.setUpdateUser(SecurityUtils.getUsername());
|
pmSubCompany.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmSubCompany.setUpdateTime(new Date());
|
pmSubCompany.setUpdateTime(new Date());
|
||||||
return pmSubComMapper.updateSubCompany(pmSubCompany);
|
return pmSubComMapper.updateSubCompany(pmSubCompany);
|
||||||
}else {
|
}else {
|
||||||
if (StringUtils.isNotNull(pmSubCompanyOld)){
|
if (StringUtils.isNotNull(pmSubCompanyOld)){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
pmSubCompany.setCreateUser(SecurityUtils.getUsername());
|
pmSubCompany.setCreateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmSubCompany.setCreateTime(new Date());
|
pmSubCompany.setCreateTime(new Date());
|
||||||
pmSubCompany.setUpdateUser(SecurityUtils.getUsername());
|
pmSubCompany.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmSubCompany.setUpdateTime(new Date());
|
pmSubCompany.setUpdateTime(new Date());
|
||||||
return pmSubComMapper.addSubCompany(pmSubCompany);
|
return pmSubComMapper.addSubCompany(pmSubCompany);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -70,11 +70,11 @@ public class PmSubServiceImpl implements PmSubService {
|
||||||
if (StringUtils.isNotNull(pmSubOld) && !pmSubOld.getId().equals(pmSub.getId())){
|
if (StringUtils.isNotNull(pmSubOld) && !pmSubOld.getId().equals(pmSub.getId())){
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
pmSub.setUpdateUser(SecurityUtils.getUsername());
|
pmSub.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmSub.setUpdateTime(new Date());
|
pmSub.setUpdateTime(new Date());
|
||||||
res = pmSubMapper.updateSub(pmSub);
|
res = pmSubMapper.updateSub(pmSub);
|
||||||
//判断是否修改图片信息
|
//判断是否修改图片信息
|
||||||
if (!pmSub.getFileIdList().isEmpty()){
|
if (StringUtils.isNotNull(pmSub.getFileIdList())){
|
||||||
for (String fileId:pmSub.getFileIdList()) {
|
for (String fileId:pmSub.getFileIdList()) {
|
||||||
//删除合同图片 删除minio文件
|
//删除合同图片 删除minio文件
|
||||||
fileUploadUtils.delFileListById(fileId, pmSub.getId().toString(), Constants.PM_SUB,"");
|
fileUploadUtils.delFileListById(fileId, pmSub.getId().toString(), Constants.PM_SUB,"");
|
||||||
|
|
@ -84,9 +84,9 @@ public class PmSubServiceImpl implements PmSubService {
|
||||||
if (StringUtils.isNotNull(pmSubOld)){
|
if (StringUtils.isNotNull(pmSubOld)){
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
pmSub.setCreateUser(SecurityUtils.getUsername());
|
pmSub.setCreateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmSub.setCreateTime(new Date());
|
pmSub.setCreateTime(new Date());
|
||||||
pmSub.setUpdateUser(SecurityUtils.getUsername());
|
pmSub.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmSub.setUpdateTime(new Date());
|
pmSub.setUpdateTime(new Date());
|
||||||
res = pmSubMapper.addSub(pmSub);
|
res = pmSubMapper.addSub(pmSub);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ public class PmSubTeamContractServiceImpl implements PmSubTeamContractService {
|
||||||
public int addOrUpdateSubTeamContract(PmSubTeamContract pmSubTeamContract, FileBasicMsgDto fileBasicMsgDto) {
|
public int addOrUpdateSubTeamContract(PmSubTeamContract pmSubTeamContract, FileBasicMsgDto fileBasicMsgDto) {
|
||||||
int res =0;
|
int res =0;
|
||||||
if (StringUtils.isNotNull(pmSubTeamContract.getId())){
|
if (StringUtils.isNotNull(pmSubTeamContract.getId())){
|
||||||
pmSubTeamContract.setUpdateUser(SecurityUtils.getUsername());
|
pmSubTeamContract.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmSubTeamContract.setUpdateTime(new Date());
|
pmSubTeamContract.setUpdateTime(new Date());
|
||||||
pmSubTeamContract.setTeamExitTime(DateUtils.getDate());
|
pmSubTeamContract.setTeamExitTime(DateUtils.getDate());
|
||||||
//查看下面的人员是否全部出场
|
//查看下面的人员是否全部出场
|
||||||
|
|
@ -73,9 +73,9 @@ public class PmSubTeamContractServiceImpl implements PmSubTeamContractService {
|
||||||
fileUploadUtils.uploadFile(fileBasicMsgDto.getFiles(), Constants.PM_SUB_TEAM_CONTRACT, pmSubTeamContract.getId().toString(), type,"", "");
|
fileUploadUtils.uploadFile(fileBasicMsgDto.getFiles(), Constants.PM_SUB_TEAM_CONTRACT, pmSubTeamContract.getId().toString(), type,"", "");
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
pmSubTeamContract.setCreateUser(SecurityUtils.getUsername());
|
pmSubTeamContract.setCreateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmSubTeamContract.setCreateTime(new Date());
|
pmSubTeamContract.setCreateTime(new Date());
|
||||||
pmSubTeamContract.setUpdateUser(SecurityUtils.getUsername());
|
pmSubTeamContract.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmSubTeamContract.setUpdateTime(new Date());
|
pmSubTeamContract.setUpdateTime(new Date());
|
||||||
pmSubTeamContract.setTeamEinTime(DateUtils.getDate());
|
pmSubTeamContract.setTeamEinTime(DateUtils.getDate());
|
||||||
res = pmSubTeamContractMapper.addSubTeamContract(pmSubTeamContract);
|
res = pmSubTeamContractMapper.addSubTeamContract(pmSubTeamContract);
|
||||||
|
|
|
||||||
|
|
@ -39,13 +39,13 @@ public class PmSubTeamServiceImpl implements PmSubTeamService {
|
||||||
|
|
||||||
//存在则删除后新增,不存在则新增
|
//存在则删除后新增,不存在则新增
|
||||||
if(StringUtils.isNotNull(pmSubTeam.getId())){
|
if(StringUtils.isNotNull(pmSubTeam.getId())){
|
||||||
pmSubTeam.setUpdateUser(SecurityUtils.getUsername());
|
pmSubTeam.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmSubTeam.setUpdateTime(new Date());
|
pmSubTeam.setUpdateTime(new Date());
|
||||||
return pmSubTeamMapper.updateSubTeam(pmSubTeam);
|
return pmSubTeamMapper.updateSubTeam(pmSubTeam);
|
||||||
}else {
|
}else {
|
||||||
pmSubTeam.setCreateUser(SecurityUtils.getUsername());
|
pmSubTeam.setCreateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmSubTeam.setCreateTime(new Date());
|
pmSubTeam.setCreateTime(new Date());
|
||||||
pmSubTeam.setUpdateUser(SecurityUtils.getUsername());
|
pmSubTeam.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmSubTeam.setUpdateTime(new Date());
|
pmSubTeam.setUpdateTime(new Date());
|
||||||
return pmSubTeamMapper.addSubTeam(pmSubTeam);
|
return pmSubTeamMapper.addSubTeam(pmSubTeam);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -104,4 +104,10 @@
|
||||||
left join bm_sub_contract bsc on bsc.sub_id = pstc.sub_id and bsc.pro_id = pstc.pro_id
|
left join bm_sub_contract bsc on bsc.sub_id = pstc.sub_id and bsc.pro_id = pstc.pro_id
|
||||||
where bsc.id = #{id}
|
where bsc.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="countTeamNum" resultType="java.lang.Integer">
|
||||||
|
select count(1) from pm_sub_team where is_active='1' and sub_id = #{subId} and ein_status=2
|
||||||
|
</select>
|
||||||
|
<select id="countProNum" resultType="java.lang.Integer">
|
||||||
|
select count(1) from bm_worker_ein_pro_record where is_active='1' and sub_id = #{subId} and ein_status!=2
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
where is_active = '1' 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}
|
delete from pm_att_device where device_code = #{deviceCode}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="selectPmAttDeviceList" resultType="com.bonus.bmw.domain.vo.PmAttDeviceVo">
|
<select id="selectPmAttDeviceList" resultType="com.bonus.bmw.domain.vo.PmAttDeviceVo">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue