1.首页接口修改
This commit is contained in:
parent
dfecdd0fe9
commit
f9e2dd0ce7
Binary file not shown.
|
|
@ -17,21 +17,21 @@
|
|||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>arcsoft</groupId>
|
||||
<artifactId>arcsoft</artifactId>
|
||||
<version>3.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/arcsoft-sdk-face-3.0.0.0-linux.jar</systemPath>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>arcsoft</groupId>-->
|
||||
<!-- <artifactId>arcsoft</artifactId>-->
|
||||
<!-- <version>3.0</version>-->
|
||||
<!-- <scope>system</scope>-->
|
||||
<!-- <systemPath>${project.basedir}/lib/arcsoft-sdk-face-3.0.0.0-linux.jar</systemPath>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>arcsoft</groupId>-->
|
||||
<!-- <artifactId>arcsoft</artifactId>-->
|
||||
<!-- <version>3.0</version>-->
|
||||
<!-- <scope>system</scope>-->
|
||||
<!-- <systemPath>${project.basedir}/lib/arcsoft-sdk-face-3.0.0.0-windows.jar</systemPath>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>arcsoft</groupId>
|
||||
<artifactId>arcsoft</artifactId>
|
||||
<version>3.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/arcsoft-sdk-face-3.0.0.0.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Openfeign -->
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -84,9 +84,8 @@ public class ArcFaceHelper {
|
|||
faceEngine.detectFaces(imageInfo.getRgbData(), imageInfo.getWidth(), imageInfo.getHeight(),
|
||||
ImageFormat.CP_PAF_BGR24, lstFaceInfo);
|
||||
System.out.println("检测到人脸数:" + lstFaceInfo.size());
|
||||
if (lstFaceInfo.size() == 0) {
|
||||
if (lstFaceInfo.isEmpty()) {
|
||||
return null;
|
||||
// throw new NullPointerException("未检测到人脸");
|
||||
}
|
||||
FaceResult result = new FaceResult();
|
||||
//提取人脸特征
|
||||
|
|
|
|||
|
|
@ -166,14 +166,23 @@ public class PmWorkerController extends BaseController {
|
|||
suffix = originalFilename.substring(originalFilename.lastIndexOf("."));
|
||||
}
|
||||
// 创建临时文件
|
||||
tempFile = Files.createTempFile("temp-image-", suffix).toFile();
|
||||
// tempFile = Files.createTempFile("temp-image-", suffix).toFile();
|
||||
File customTempDir = new File("D:\\temp");
|
||||
if (!customTempDir.exists()) {
|
||||
customTempDir.mkdirs();
|
||||
}
|
||||
tempFile = File.createTempFile("temp-image-", suffix, customTempDir);
|
||||
tempFile.deleteOnExit(); // JVM退出时自动删除
|
||||
// 将 MultipartFile 写入临时文件
|
||||
file.transferTo(tempFile);
|
||||
ArcFaceHelper arcFaceHelper = new ArcFaceHelper();
|
||||
// 调用原方法,传入临时文件的路径
|
||||
FaceResult faceFeatures = arcFaceHelper.getFaceFeatures(tempFile.getAbsolutePath());
|
||||
return AjaxResult.success(faceFeatures);
|
||||
if (faceFeatures == null){
|
||||
return AjaxResult.error("人脸检测失败");
|
||||
}else{
|
||||
return AjaxResult.success(faceFeatures);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// 处理异常(如磁盘满、权限不足等)
|
||||
e.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -75,8 +75,7 @@ public class PmWorkerExitController extends BaseController {
|
|||
if(o.getProId()==null){
|
||||
return AjaxResult.error("请填写出厂工程");
|
||||
}
|
||||
|
||||
return toAjax(service.updateWorkerExit(o,listFile));
|
||||
return service.updateWorkerExit(o,listFile);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
}
|
||||
|
|
@ -88,7 +87,7 @@ public class PmWorkerExitController extends BaseController {
|
|||
@SysLog(title = "批量人员出场", businessType = OperaType.UPDATE, logType = 0, module = "施工人员->出入场管理->人员出场管理", details = "批量人员出场")
|
||||
public AjaxResult batchExit(@RequestBody List<PmWorkerDto> list) {
|
||||
try {
|
||||
return toAjax(service.updateWorkerBatchExit(list));
|
||||
return service.updateWorkerBatchExit(list);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,4 +92,8 @@ public class HomePageProVo {
|
|||
*/
|
||||
private Integer network;
|
||||
|
||||
private List<MapBeanVo> proByVolLevel;
|
||||
|
||||
private List<MapBeanVo> proByProStatus;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,4 +63,9 @@ public class HomePageWorkerVo {
|
|||
*/
|
||||
List<MapBeanVo> postMsg;
|
||||
|
||||
/**
|
||||
* 岗位信息
|
||||
*/
|
||||
List<MapBeanVo> ageMsg;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
package com.bonus.bmw.domain.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class MapBeanVo {
|
||||
|
||||
private String key;
|
||||
|
|
@ -13,4 +17,9 @@ public class MapBeanVo {
|
|||
|
||||
private String name;
|
||||
|
||||
public MapBeanVo(String key, String value){
|
||||
this.value = value;
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,4 +58,11 @@ public interface BmWorkerContractMapper {
|
|||
* @return
|
||||
*/
|
||||
List<BmWorkerContract> selectContractListById(BmWorkerContract o);
|
||||
|
||||
/**
|
||||
* 更新 Ein 临时记录的关联合同ID
|
||||
* @param id
|
||||
* @param workerId
|
||||
*/
|
||||
void updateEinDayRecordContractId(@Param("oldContractId") Integer id,@Param("workerId") Integer workerId,@Param("contractId") Integer contractId);
|
||||
}
|
||||
|
|
@ -77,5 +77,19 @@ public interface HomePageMapper {
|
|||
* @param o
|
||||
* @return
|
||||
*/
|
||||
List<MapBeanVo> setWorkerPostTop(HomePagePo o);
|
||||
List<MapBeanVo> getWorkerPostTop(HomePagePo o);
|
||||
|
||||
/**
|
||||
* 获取工程数量 按电压等级区分
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
List<MapBeanVo> getProByVolLevel(HomePagePo o);
|
||||
|
||||
/**
|
||||
* 获取工程数量 按工程状态区分
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
List<MapBeanVo> getProByProStatus(HomePagePo o);
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.bmw.mapper;
|
||||
|
||||
import com.bonus.bmw.domain.dto.PmWorkerDto;
|
||||
import com.bonus.bmw.domain.vo.MapBeanVo;
|
||||
import com.bonus.bmw.domain.vo.PmWorker;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
|
@ -35,4 +36,6 @@ public interface PmWorkerExitMapper {
|
|||
int updateEinProRecordStatus(@Param("id") Integer id,@Param("einStatus") Integer einStatus,@Param("isUploadFile") Integer isUploadFile,@Param("exitWay") String exitWay);
|
||||
|
||||
List<PmWorker> selectWorkListByWorkerId(PmWorkerDto o);
|
||||
|
||||
List<MapBeanVo> getContractIdAndWageCard(Integer workerId);
|
||||
}
|
||||
|
|
@ -24,7 +24,7 @@ public interface PmWorkerExitService {
|
|||
* @param listFile
|
||||
* @return
|
||||
*/
|
||||
int updateWorkerExit(PmWorkerDto record, List<WebFileDto> listFile) throws Exception;
|
||||
AjaxResult updateWorkerExit(PmWorkerDto record, List<WebFileDto> listFile) throws Exception;
|
||||
|
||||
/**
|
||||
* 批量人员出场
|
||||
|
|
@ -32,7 +32,7 @@ public interface PmWorkerExitService {
|
|||
* @param list
|
||||
* @return
|
||||
*/
|
||||
int updateWorkerBatchExit(List<PmWorkerDto> list) throws Exception;
|
||||
AjaxResult updateWorkerBatchExit(List<PmWorkerDto> list) throws Exception;
|
||||
|
||||
/**
|
||||
* 根据人员id查询人员列表
|
||||
|
|
|
|||
|
|
@ -65,7 +65,13 @@ public class BmWorkerContractServiceImpl implements BmWorkerContractService{
|
|||
BigDecimal dayRate = wageCriterion.setScale(2, RoundingMode.HALF_UP);
|
||||
record.setDayRate(dayRate.doubleValue());
|
||||
}
|
||||
Integer oldContractId = null;
|
||||
if(record.getId() != null){
|
||||
oldContractId = record.getId();
|
||||
}
|
||||
int insert = mapper.insert(record);
|
||||
//属于废弃上一个合同重新签一个,需要修改掉之前考情绑定
|
||||
mapper.updateEinDayRecordContractId(oldContractId,record.getWorkerId(), record.getId());
|
||||
if(insert > 0){
|
||||
//组装数据
|
||||
MultipartFile[] workerFiles = new MultipartFile[listFile.size()];
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import java.math.BigDecimal;
|
||||
import java.math.MathContext;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
|
|
@ -93,6 +94,12 @@ public class HomePageServiceImpl implements HomePageService {
|
|||
public AjaxResult getProjectMsg(HomePagePo o) {
|
||||
//工程信息
|
||||
HomePageProVo proMsg = mapper.getProjectMsg(o);
|
||||
//按电压等级区分
|
||||
List<MapBeanVo> proMsgByVolLevel = mapper.getProByVolLevel(o);
|
||||
//按工程类型区分
|
||||
List<MapBeanVo> postMsgByProStatus = mapper.getProByProStatus(o);
|
||||
proMsg.setProByVolLevel(proMsgByVolLevel);
|
||||
proMsg.setProByProStatus(postMsgByProStatus);
|
||||
return AjaxResult.success(proMsg);
|
||||
}
|
||||
|
||||
|
|
@ -101,8 +108,16 @@ public class HomePageServiceImpl implements HomePageService {
|
|||
//在场人员
|
||||
HomePageWorkerVo workerMsg = mapper.getEinWorkerDistribution(o);
|
||||
//工种查出前五和其它
|
||||
List<MapBeanVo> postMsg = mapper.setWorkerPostTop(o);
|
||||
List<MapBeanVo> postMsg = mapper.getWorkerPostTop(o);
|
||||
workerMsg.setPostMsg(postMsg);
|
||||
//年龄分布
|
||||
List<MapBeanVo> ageMsg = new ArrayList<>();
|
||||
ageMsg.add(new MapBeanVo("<20",workerMsg.getNum20().toString()));
|
||||
ageMsg.add(new MapBeanVo("20-30",workerMsg.getNum30().toString()));
|
||||
ageMsg.add(new MapBeanVo("30-40",workerMsg.getNum40().toString()));
|
||||
ageMsg.add(new MapBeanVo("40-50",workerMsg.getNum50().toString()));
|
||||
ageMsg.add(new MapBeanVo("50-60",workerMsg.getNum60().toString()));
|
||||
workerMsg.setAgeMsg(ageMsg);
|
||||
return AjaxResult.success(workerMsg);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.bmw.service.impl;
|
|||
|
||||
import com.bonus.bmw.domain.dto.PmWorkerDto;
|
||||
import com.bonus.bmw.domain.dto.WebFileDto;
|
||||
import com.bonus.bmw.domain.vo.MapBeanVo;
|
||||
import com.bonus.bmw.domain.vo.PmWorker;
|
||||
import com.bonus.bmw.mapper.PmWorkerExitMapper;
|
||||
import com.bonus.bmw.service.BmWorkerContractService;
|
||||
|
|
@ -49,57 +50,73 @@ public class PmWorkerExitServiceImpl implements PmWorkerExitService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public int updateWorkerExit(PmWorkerDto record, List<WebFileDto> listFile) throws Exception {
|
||||
//删除合同
|
||||
int m = contractService.deleteByWorkerId(record.getWorkerId());
|
||||
//删除实时在场
|
||||
int n = mapper.deleteEinMsgByWorkerId(record.getWorkerId());
|
||||
//修改在场记录表状态
|
||||
int einStatus = 2;
|
||||
//是否上传文件
|
||||
int isUploadFile = 0;
|
||||
if(!listFile.isEmpty()){
|
||||
//组装数据
|
||||
MultipartFile[] workerFiles = new MultipartFile[listFile.size()];
|
||||
String[] type = new String[listFile.size()];
|
||||
for (int i = 0; i < listFile.size(); i++) {
|
||||
workerFiles[i] = listFile.get(i).getFile();
|
||||
type[i] = listFile.get(i).getType();
|
||||
}
|
||||
List<UploadFileVo> uploadFileVos = fileUploadUtils.uploadFile(workerFiles, Constants.FILE_UPLOAD_WORKER_EXIT, record.getId().toString(), type,"", "");
|
||||
isUploadFile = 1;
|
||||
}
|
||||
public AjaxResult updateWorkerExit(PmWorkerDto record, List<WebFileDto> listFile) throws Exception {
|
||||
|
||||
int k = mapper.updateEinProRecordStatus(record.getId(),einStatus,isUploadFile,record.getExitWay());
|
||||
if(k==1){
|
||||
urkSendService.delUserByDevice(record.getWorkerId(),record.getProId());
|
||||
}
|
||||
return k;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateWorkerBatchExit(List<PmWorkerDto> list) throws Exception {
|
||||
int count = 0;
|
||||
List<Integer> userId = new ArrayList<>();
|
||||
List<Integer> proId = new ArrayList<>();
|
||||
for (PmWorkerDto bean : list) {
|
||||
//查询合同工资卡是否齐全
|
||||
List<MapBeanVo> list = mapper.getContractIdAndWageCard(record.getWorkerId());
|
||||
if("1".equals(list.get(0).getValue()) && "1".equals(list.get(1).getValue())){
|
||||
//删除合同
|
||||
int i = contractService.deleteByWorkerId(bean.getWorkerId());
|
||||
int m = contractService.deleteByWorkerId(record.getWorkerId());
|
||||
//删除实时在场
|
||||
int j = mapper.deleteEinMsgByWorkerId(bean.getWorkerId());
|
||||
int n = mapper.deleteEinMsgByWorkerId(record.getWorkerId());
|
||||
//修改在场记录表状态
|
||||
int einStatus = 2;
|
||||
//是否上传文件
|
||||
int isUploadFile = 0;
|
||||
int k = mapper.updateEinProRecordStatus(bean.getId(),einStatus,isUploadFile,bean.getExitWay());
|
||||
if(k==1){
|
||||
userId.add(bean.getWorkerId());
|
||||
proId.add(bean.getProId());
|
||||
if(!listFile.isEmpty()){
|
||||
//组装数据
|
||||
MultipartFile[] workerFiles = new MultipartFile[listFile.size()];
|
||||
String[] type = new String[listFile.size()];
|
||||
for (int i = 0; i < listFile.size(); i++) {
|
||||
workerFiles[i] = listFile.get(i).getFile();
|
||||
type[i] = listFile.get(i).getType();
|
||||
}
|
||||
List<UploadFileVo> uploadFileVos = fileUploadUtils.uploadFile(workerFiles, Constants.FILE_UPLOAD_WORKER_EXIT, record.getId().toString(), type,"", "");
|
||||
isUploadFile = 1;
|
||||
}
|
||||
count += k;
|
||||
|
||||
int k = mapper.updateEinProRecordStatus(record.getId(),einStatus,isUploadFile,record.getExitWay());
|
||||
if(k==1){
|
||||
urkSendService.delUserByDevice(record.getWorkerId(),record.getProId());
|
||||
}
|
||||
return k == 1 ? AjaxResult.success() :AjaxResult.error("离场失败");
|
||||
}else {
|
||||
return AjaxResult.error("合同工资卡不全,请去补充后再离场");
|
||||
}
|
||||
//批量操作考勤机
|
||||
urkSendService.delUserByDeviceList(userId,proId);
|
||||
return count==list.size()?1:0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult updateWorkerBatchExit(List<PmWorkerDto> list) throws Exception {
|
||||
int count = 0;
|
||||
int failCount = 0;
|
||||
List<Integer> userId = new ArrayList<>();
|
||||
List<Integer> proId = new ArrayList<>();
|
||||
for (PmWorkerDto bean : list) {
|
||||
//查询合同工资卡是否齐全
|
||||
List<MapBeanVo> listData = mapper.getContractIdAndWageCard(bean.getWorkerId());
|
||||
if("1".equals(listData.get(0).getValue()) && "1".equals(listData.get(1).getValue())) {
|
||||
//删除合同
|
||||
int i = contractService.deleteByWorkerId(bean.getWorkerId());
|
||||
//删除实时在场
|
||||
int j = mapper.deleteEinMsgByWorkerId(bean.getWorkerId());
|
||||
int einStatus = 2;
|
||||
//是否上传文件
|
||||
int isUploadFile = 0;
|
||||
int k = mapper.updateEinProRecordStatus(bean.getId(), einStatus, isUploadFile, bean.getExitWay());
|
||||
if (k == 1) {
|
||||
userId.add(bean.getWorkerId());
|
||||
proId.add(bean.getProId());
|
||||
}
|
||||
count += k;
|
||||
}else {
|
||||
failCount++;
|
||||
}
|
||||
}
|
||||
if(count>0){
|
||||
//批量操作考勤机
|
||||
urkSendService.delUserByDeviceList(userId,proId);
|
||||
}
|
||||
return AjaxResult.success("成功" + count + "条数据,失败" + failCount + "条数据,失败原因:没有补全合同工资卡");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -176,4 +176,17 @@
|
|||
order by
|
||||
bwc.id desc
|
||||
</select>
|
||||
|
||||
<update id="updateEinDayRecordContractId">
|
||||
update bm_worker_ein_day_record set contract_id = #{contractId}
|
||||
where worker_id = #{workerId}
|
||||
<choose>
|
||||
<when test="oldContractId != null">
|
||||
AND contract_id = #{oldContractId}
|
||||
</when>
|
||||
<otherwise>
|
||||
AND contract_id is null
|
||||
</otherwise>
|
||||
</choose>
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
@ -167,7 +167,7 @@
|
|||
</if>
|
||||
</select>
|
||||
|
||||
<select id="setWorkerPostTop" resultType="com.bonus.bmw.domain.vo.MapBeanVo">
|
||||
<select id="getWorkerPostTop" resultType="com.bonus.bmw.domain.vo.MapBeanVo">
|
||||
SELECT
|
||||
post_name as `key`,
|
||||
worker_count as `value`
|
||||
|
|
@ -175,11 +175,14 @@
|
|||
(SELECT
|
||||
ppt.post_name,
|
||||
COUNT(pw.id) AS worker_count
|
||||
|
||||
FROM bm_worker_ein_msg bwem
|
||||
INNER JOIN pm_worker pw ON bwem.worker_id = pw.id AND pw.is_active = 1
|
||||
LEFT JOIN pm_post_type ppt ON bwem.post_id = ppt.id
|
||||
LEFT JOIN pm_project pp ON bwem.pro_id = pp.id AND pp.is_active = 1
|
||||
WHERE bwem.is_active = 1
|
||||
<if test="subComId != null">
|
||||
AND pp.sub_com_id = #{subComId}
|
||||
</if>
|
||||
GROUP BY ppt.id
|
||||
ORDER BY worker_count DESC
|
||||
LIMIT 5)
|
||||
|
|
@ -189,11 +192,14 @@
|
|||
SELECT
|
||||
'其他' AS post_name,
|
||||
COUNT(pw.id) AS worker_count
|
||||
|
||||
FROM bm_worker_ein_msg bwem
|
||||
INNER JOIN pm_worker pw ON bwem.worker_id = pw.id AND pw.is_active = 1
|
||||
LEFT JOIN pm_post_type ppt ON bwem.post_id = ppt.id
|
||||
LEFT JOIN pm_project pp ON bwem.pro_id = pp.id AND pp.is_active = 1
|
||||
WHERE bwem.is_active = '1'
|
||||
<if test="subComId != null">
|
||||
AND pp.sub_com_id = #{subComId}
|
||||
</if>
|
||||
AND ppt.id NOT IN (
|
||||
SELECT id FROM (
|
||||
SELECT ppt.id
|
||||
|
|
@ -208,4 +214,40 @@
|
|||
)
|
||||
) AS combined
|
||||
</select>
|
||||
|
||||
<select id="getProByVolLevel" resultType="com.bonus.bmw.domain.vo.MapBeanVo">
|
||||
SELECT
|
||||
sdd.dict_value AS `key`,
|
||||
COUNT(id) AS `value`
|
||||
FROM
|
||||
sys_dict_data sdd
|
||||
LEFT JOIN pm_project pp ON sdd.dict_value = pp.vol_level
|
||||
AND pp.is_active = 1
|
||||
WHERE
|
||||
sdd.`status` = 0
|
||||
AND dict_type = 'voltage_level'
|
||||
<if test="subComId != null">
|
||||
AND pp.sub_com_id = #{subComId}
|
||||
</if>
|
||||
GROUP BY
|
||||
sdd.dict_value
|
||||
</select>
|
||||
|
||||
<select id="getProByProStatus" resultType="com.bonus.bmw.domain.vo.MapBeanVo">
|
||||
SELECT
|
||||
sdd.dict_label AS `key`,
|
||||
COUNT(id) AS `value`
|
||||
FROM
|
||||
sys_dict_data sdd
|
||||
LEFT JOIN pm_project pp ON sdd.dict_value = pp.pro_type
|
||||
AND pp.is_active = 1
|
||||
WHERE
|
||||
sdd.`status` = 0
|
||||
AND dict_type = 'project_type'
|
||||
<if test="subComId != null">
|
||||
AND pp.sub_com_id = #{subComId}
|
||||
</if>
|
||||
GROUP BY
|
||||
sdd.dict_value
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -52,6 +52,7 @@
|
|||
<if test="mainProName != null">
|
||||
AND locate(#{mainProName},pmp.main_pro_name)
|
||||
</if>
|
||||
group by pmp.id
|
||||
</select>
|
||||
|
||||
<select id="getProMsg" resultMap="BaseResultMap">
|
||||
|
|
|
|||
|
|
@ -109,4 +109,18 @@
|
|||
WHERE
|
||||
pw.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="getContractIdAndWageCard" resultType="com.bonus.bmw.domain.vo.MapBeanVo">
|
||||
SELECT
|
||||
'工资卡' as `key`,
|
||||
count(1) as `value`
|
||||
FROM
|
||||
`bm_worker_wage_card` where is_active = 1 and worker_id = #{workerId}
|
||||
UNION ALL
|
||||
SELECT
|
||||
'合同' as `key`,
|
||||
count(1) as `value`
|
||||
FROM
|
||||
`bm_worker_contract` where is_active = 1 and worker_id = #{workerId}
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue