Commit f3038aa8 by lal Committed by chenzg

提交

parent 33f0fea6
......@@ -114,10 +114,10 @@ public class KqglAssoBcsz extends Model<KqglAssoBcsz> {
private Integer isXiuxi;
@ApiModelProperty(value = "休息开始时间 休息开始时间", example = "101")
private Long startTime;
private String startTime;
@ApiModelProperty(value = "休息结束时间 休息结束时间", example = "101")
private Long endTime;
private String endTime;
@ApiModelProperty(value = "上下班次数(1/2/3 最大值为3)", example = "101")
private Integer sxbcs;
......
......@@ -99,6 +99,7 @@ import cn.timer.api.dto.kqmk.KqzAttendanceGroupSearchDto;
import cn.timer.api.dto.kqmk.LeaveTypeDto;
import cn.timer.api.dto.kqmk.MachinememberDto;
import cn.timer.api.dto.kqmk.ModifyEmployeeBalanceDto;
import cn.timer.api.dto.kqmk.OriginalRecordDto;
import cn.timer.api.dto.kqmk.SetConditionsDto;
import cn.timer.api.dto.kqmk.StartTimeRestDto;
import cn.timer.api.dto.kqmk.VacationInformationDto;
......@@ -1191,7 +1192,7 @@ public class TimeCardController {
//打卡记录
@Autowired
private PunchRecordMapper punchrecordservice;
private PunchRecordMapper punchrecordmapper;
//打卡明细表
@Autowired
private PunchCardDetailsMapper punchcarddetailsservice;
......@@ -1317,7 +1318,7 @@ public class TimeCardController {
String[] str= new String[3];
for(int y=0;y<mapucalist.size();y++){
if(y == 0){//上班
PunchRecord mindata = punchrecordservice.selectByPrimaryKey(minAttid.getId());//上班
PunchRecord mindata = punchrecordmapper.selectByPrimaryKey(minAttid.getId());//上班
PunchRecord record = new PunchRecord();
record.setId(mapucalist.get(y).getId());
Long time = (mindata.getDktime() - sbdk1)/1000/60;
......@@ -1330,7 +1331,7 @@ public class TimeCardController {
}
record.setAttime(sbdk1);
record.setBcid(banci.getId());//班次id
punchrecordservice.updateByPrimaryKeySelective(record);
punchrecordmapper.updateByPrimaryKeySelective(record);
}
if(y == 1 || y == 2){
PunchRecord record = new PunchRecord();
......@@ -1360,9 +1361,9 @@ public class TimeCardController {
str[1] = String.valueOf(mapucalist.get(y).getId());
}
record.setBcid(banci.getId());//班次id
punchrecordservice.updateByPrimaryKeySelective(record);
punchrecordmapper.updateByPrimaryKeySelective(record);
}
PunchRecord maxdata = punchrecordservice.selectByPrimaryKey(maxAttid.getId());//下班
PunchRecord maxdata = punchrecordmapper.selectByPrimaryKey(maxAttid.getId());//下班
if(mapucalist.get(y).getId() == maxdata.getId()){//下班
PunchRecord record = new PunchRecord();
record.setId(maxdata.getId());
......@@ -1378,7 +1379,7 @@ public class TimeCardController {
record.setSort(4);
record.setAttime(xbdk2);
record.setBcid(banci.getId());//班次id
punchrecordservice.updateByPrimaryKeySelective(record);
punchrecordmapper.updateByPrimaryKeySelective(record);
str[2] = String.valueOf(maxdata.getId());
}
......@@ -1390,11 +1391,11 @@ public class TimeCardController {
record.setResults(0);// 打卡结果
record.setAttime(mapucalist.get(y).getDktime());//上班应打卡时间
record.setBcid(banci.getId());//班次id
punchrecordservice.updateByPrimaryKeySelective(record);
punchrecordmapper.updateByPrimaryKeySelective(record);
}
}
//修改打卡明细
PunchRecord mindata = punchrecordservice.selectByPrimaryKey(minAttid.getId());//上班
PunchRecord mindata = punchrecordmapper.selectByPrimaryKey(minAttid.getId());//上班
PunchCardDetails record = new PunchCardDetails();
record.setId(dkmxid);//需修改的明细id
record.setSbdk1(mindata.getDktime());
......@@ -1413,7 +1414,7 @@ public class TimeCardController {
record.setGzsc(Double.valueOf("0"));
punchcarddetailsservice.ModifyPunchDetails(record);
for(int t=0;t<str.length;t++){
PunchRecord dtdkmx = punchrecordservice.selectByPrimaryKey(Integer.valueOf(str[t]));//单条打卡明细
PunchRecord dtdkmx = punchrecordmapper.selectByPrimaryKey(Integer.valueOf(str[t]));//单条打卡明细
PunchCardDetails dkmx = new PunchCardDetails();
dkmx.setId(dkmxid);//需修改的明细id
......@@ -1447,8 +1448,8 @@ public class TimeCardController {
}
record.setAttime(sbdk1);//当天应打卡时间
record.setBcid(banci.getId());//班次id
punchrecordservice.updateByPrimaryKeySelective(record);
mindataone = punchrecordservice.selectByPrimaryKey(minAttid.getId());//上班
punchrecordmapper.updateByPrimaryKeySelective(record);
mindataone = punchrecordmapper.selectByPrimaryKey(minAttid.getId());//上班
PunchCardDetails dan = new PunchCardDetails();
dan.setId(dkmxid);//需修改的明细id
dan.setSbdk1(mindataone.getDktime());
......@@ -1472,8 +1473,8 @@ public class TimeCardController {
}
record.setAttime(xbdk1);//当天应打卡时间
record.setBcid(banci.getId());//班次id
punchrecordservice.updateByPrimaryKeySelective(record);
PunchRecord dtdkmx = punchrecordservice.selectByPrimaryKey(mapucalist.get(1).getId());//单条打卡明细
punchrecordmapper.updateByPrimaryKeySelective(record);
PunchRecord dtdkmx = punchrecordmapper.selectByPrimaryKey(mapucalist.get(1).getId());//单条打卡明细
pcd.setXbdk1(dtdkmx.getDktime());
pcd.setXbdk1jg(dtdkmx.getResults());
}
......@@ -1491,8 +1492,8 @@ public class TimeCardController {
}
record.setAttime(sbdk2);//当天应打卡时间
record.setBcid(banci.getId());//班次id
punchrecordservice.updateByPrimaryKeySelective(record);
PunchRecord dtdkmx = punchrecordservice.selectByPrimaryKey(mapucalist.get(2).getId());//单条打卡明细
punchrecordmapper.updateByPrimaryKeySelective(record);
PunchRecord dtdkmx = punchrecordmapper.selectByPrimaryKey(mapucalist.get(2).getId());//单条打卡明细
pcd.setSbdk2(dtdkmx.getDktime());
pcd.setSbdk2jg(dtdkmx.getResults());
}
......@@ -1510,8 +1511,8 @@ public class TimeCardController {
}
record.setAttime(xbdk2);//当天应打卡时间
record.setBcid(banci.getId());//班次id
punchrecordservice.updateByPrimaryKeySelective(record);
PunchRecord dtdkmx = punchrecordservice.selectByPrimaryKey(maxAttid.getId());//单条打卡明细
punchrecordmapper.updateByPrimaryKeySelective(record);
PunchRecord dtdkmx = punchrecordmapper.selectByPrimaryKey(maxAttid.getId());//单条打卡明细
pcd.setXbdk2(dtdkmx.getDktime());
pcd.setXbdk2jg(dtdkmx.getResults());
}
......@@ -1523,7 +1524,7 @@ public class TimeCardController {
String[] str= new String[5];
for(int y=0;y<mapucalist.size();y++){
if(y == 0){//上班
PunchRecord mindata = punchrecordservice.selectByPrimaryKey(minAttid.getId());//上班
PunchRecord mindata = punchrecordmapper.selectByPrimaryKey(minAttid.getId());//上班
PunchRecord record = new PunchRecord();
record.setId(mapucalist.get(y).getId());
Long time = (mindata.getDktime() - sbdk1)/1000/60;
......@@ -1536,7 +1537,7 @@ public class TimeCardController {
}
record.setAttime(sbdk1);
record.setBcid(banci.getId());//班次id
punchrecordservice.updateByPrimaryKeySelective(record);
punchrecordmapper.updateByPrimaryKeySelective(record);
}
if(y == 1 || y == 2 || y == 3 || y == 4){
PunchRecord record = new PunchRecord();
......@@ -1593,9 +1594,9 @@ public class TimeCardController {
}
}
record.setBcid(banci.getId());//班次id
punchrecordservice.updateByPrimaryKeySelective(record);
punchrecordmapper.updateByPrimaryKeySelective(record);
}
PunchRecord maxdata = punchrecordservice.selectByPrimaryKey(maxAttid.getId());//下班
PunchRecord maxdata = punchrecordmapper.selectByPrimaryKey(maxAttid.getId());//下班
if(mapucalist.get(y).getId() == maxdata.getId()){//下班
PunchRecord record = new PunchRecord();
record.setId(maxdata.getId());
......@@ -1611,7 +1612,7 @@ public class TimeCardController {
record.setSort(6);
record.setAttime(xbdk3);
record.setBcid(banci.getId());//班次id
punchrecordservice.updateByPrimaryKeySelective(record);
punchrecordmapper.updateByPrimaryKeySelective(record);
str[4] = String.valueOf(maxdata.getId());
}
......@@ -1623,11 +1624,11 @@ public class TimeCardController {
record.setResults(0);// 打卡结果
record.setAttime(mapucalist.get(y).getDktime());//上班应打卡时间
record.setBcid(banci.getId());//班次id
punchrecordservice.updateByPrimaryKeySelective(record);
punchrecordmapper.updateByPrimaryKeySelective(record);
}
}
//修改打卡明细
PunchRecord mindata = punchrecordservice.selectByPrimaryKey(minAttid.getId());//上班
PunchRecord mindata = punchrecordmapper.selectByPrimaryKey(minAttid.getId());//上班
PunchCardDetails record = new PunchCardDetails();
record.setId(dkmxid);//需修改的明细id
record.setSbdk1(mindata.getDktime());
......@@ -1646,7 +1647,7 @@ public class TimeCardController {
record.setGzsc(Double.valueOf("0"));
punchcarddetailsservice.ModifyPunchDetails(record);
for(int t=0;t<str.length;t++){
PunchRecord dtdkmx = punchrecordservice.selectByPrimaryKey(Integer.valueOf(str[t]));//单条打卡明细
PunchRecord dtdkmx = punchrecordmapper.selectByPrimaryKey(Integer.valueOf(str[t]));//单条打卡明细
PunchCardDetails dkmx = new PunchCardDetails();
dkmx.setId(dkmxid);//需修改的明细id
if(t == 0){
......@@ -1685,8 +1686,8 @@ public class TimeCardController {
}
record.setAttime(sbdk1);//当天应打卡时间
record.setBcid(banci.getId());//班次id
punchrecordservice.updateByPrimaryKeySelective(record);
mindataone = punchrecordservice.selectByPrimaryKey(minAttid.getId());//上班
punchrecordmapper.updateByPrimaryKeySelective(record);
mindataone = punchrecordmapper.selectByPrimaryKey(minAttid.getId());//上班
PunchCardDetails dan = new PunchCardDetails();
dan.setId(dkmxid);//需修改的明细id
dan.setSbdk1(mindataone.getDktime());
......@@ -1710,8 +1711,8 @@ public class TimeCardController {
}
record.setAttime(xbdk1);//当天应打卡时间
record.setBcid(banci.getId());//班次id
punchrecordservice.updateByPrimaryKeySelective(record);
PunchRecord dtdkmx = punchrecordservice.selectByPrimaryKey(mapucalist.get(1).getId());//单条打卡明细
punchrecordmapper.updateByPrimaryKeySelective(record);
PunchRecord dtdkmx = punchrecordmapper.selectByPrimaryKey(mapucalist.get(1).getId());//单条打卡明细
pcd.setXbdk1(dtdkmx.getDktime());
pcd.setXbdk1jg(dtdkmx.getResults());
}
......@@ -1729,8 +1730,8 @@ public class TimeCardController {
}
record.setAttime(sbdk2);//当天应打卡时间
record.setBcid(banci.getId());//班次id
punchrecordservice.updateByPrimaryKeySelective(record);
PunchRecord dtdkmx = punchrecordservice.selectByPrimaryKey(mapucalist.get(2).getId());//单条打卡明细
punchrecordmapper.updateByPrimaryKeySelective(record);
PunchRecord dtdkmx = punchrecordmapper.selectByPrimaryKey(mapucalist.get(2).getId());//单条打卡明细
pcd.setSbdk2(dtdkmx.getDktime());
pcd.setSbdk2jg(dtdkmx.getResults());
}
......@@ -1748,8 +1749,8 @@ public class TimeCardController {
}
record.setAttime(xbdk2);//当天应打卡时间
record.setBcid(banci.getId());//班次id
punchrecordservice.updateByPrimaryKeySelective(record);
PunchRecord dtdkmx = punchrecordservice.selectByPrimaryKey(mapucalist.get(3).getId());//单条打卡明细
punchrecordmapper.updateByPrimaryKeySelective(record);
PunchRecord dtdkmx = punchrecordmapper.selectByPrimaryKey(mapucalist.get(3).getId());//单条打卡明细
pcd.setXbdk2(dtdkmx.getDktime());
pcd.setXbdk2jg(dtdkmx.getResults());
}
......@@ -1767,8 +1768,8 @@ public class TimeCardController {
}
record.setAttime(sbdk3);//当天应打卡时间
record.setBcid(banci.getId());//班次id
punchrecordservice.updateByPrimaryKeySelective(record);
PunchRecord dtdkmx = punchrecordservice.selectByPrimaryKey(mapucalist.get(4).getId());//单条打卡明细
punchrecordmapper.updateByPrimaryKeySelective(record);
PunchRecord dtdkmx = punchrecordmapper.selectByPrimaryKey(mapucalist.get(4).getId());//单条打卡明细
pcd.setSbdk3(dtdkmx.getDktime());
pcd.setSbdk3jg(dtdkmx.getResults());
......@@ -1787,8 +1788,8 @@ public class TimeCardController {
}
record.setAttime(xbdk3);//当天应打卡时间
record.setBcid(banci.getId());//班次id
punchrecordservice.updateByPrimaryKeySelective(record);
PunchRecord dtdkmx = punchrecordservice.selectByPrimaryKey(maxAttid.getId());//单条打卡明细
punchrecordmapper.updateByPrimaryKeySelective(record);
PunchRecord dtdkmx = punchrecordmapper.selectByPrimaryKey(maxAttid.getId());//单条打卡明细
pcd.setXbdk3(dtdkmx.getDktime());
pcd.setXbdk3jg(dtdkmx.getResults());
}
......@@ -1861,15 +1862,39 @@ public class TimeCardController {
@ApiOperation(value = "根据用户id和假期id查询余额具体数据", httpMethod = "POST", notes = "接口发布说明")
// @ApiOperationSupport(order = 45)
public Result<Object> ModifyEmployeeBalance(@RequestBody ModifyEmployeeBalanceDto bala) {
// List<KqglAssoOvertimeRange> overtim = kqglassoovertimerangemapper.selectList(new QueryWrapper<KqglAssoOvertimeRange>().lambda().eq(KqglAssoOvertimeRange::getOvertimeRulesId, listAs.get(i).getId()));
List<KqglAssoLeaveBalance> ballist = kqglassoleavebalancemapper.selectList(new QueryWrapper<KqglAssoLeaveBalance>().lambda().eq(KqglAssoLeaveBalance::getLeaveRulesId, bala.getLeaverulesid()).eq(KqglAssoLeaveBalance::getUserid, bala.getEmpnum()));
return ResultUtil.data(ballist,"操作成功!");
}
/**
* 考勤原始记录-根据 模糊 + 高級查詢-分页
*/
@PostMapping(value = "/attendancecalendar")
@ApiOperation(value = "考勤原始记录-根据 模糊 + 高級查詢-分页", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 34)
public Result<Object> AttendanceCalendar(@CurrentUser UserBean userBean, @Validated @RequestBody OriginalRecordDto originalrecorddto){
IPage<PunchRecord> page = new Page<PunchRecord>(
originalrecorddto.getCurrentPage() == null ? 1 : originalrecorddto.getCurrentPage(),
originalrecorddto.getTotalPage() == null ? 10 : originalrecorddto.getTotalPage());
originalrecorddto.setQyid(userBean.getOrgCode());
IPage<PunchRecord> pageAs = punchrecordmapper.QueryOriginalRecord(page, originalrecorddto);
List<PunchRecord> listAs = pageAs.getRecords();
return ResultUtil.data(pageAs, listAs, "操作成功!");
}
// @GetMapping(value = "/summary_report")
// @ApiOperation(value = "考勤汇总报表(暂时不用)", httpMethod = "GET", notes = "接口发布说明")
// public Result<Object> attendance_summary_report() {
// Map<String, Object> map = new HashMap<String, Object>();
//
// return ResultUtil.data(map);
// }
/**************************/
/**
* 查询列表-加班补偿方式
......
......@@ -2,8 +2,13 @@ package cn.timer.api.dao.kqgl;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.metadata.IPage;
import cn.timer.api.bean.kqgl.AttendanceDetails;
import cn.timer.api.bean.kqgl.PunchRecord;
import cn.timer.api.dto.kqmk.OriginalRecordDto;
public interface PunchRecordMapper {
int deleteByPrimaryKey(Integer id);
......@@ -31,4 +36,8 @@ public interface PunchRecordMapper {
List<PunchRecord> getMaintenancePunchCardList(Long start,Long end,Integer userId);
List<PunchRecord> selFuzzyOriginalAttendance(AttendanceDetails attendancedetails);
IPage<PunchRecord> QueryOriginalRecord(IPage<PunchRecord> page,@Param("param") OriginalRecordDto originalrecorddto);
}
\ No newline at end of file
package cn.timer.api.dto.kqmk;
import cn.timer.api.utils.Page;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class OriginalRecordDto extends Page {
private Integer qyid;
private String start;
private String end;
private String text;
}
......@@ -32,6 +32,32 @@
id, dktime, lon, lat, address, results, user_id, type, status, sort, card_type, macname,
mac, qyid, attdate, attime, dkmxid,bcid,remarks,punchmode,punchequipment
</sql>
<select id="QueryOriginalRecord" resultMap="BaseResultMap">
select dkjl.*,
bmgw.dept,
bmgw.post,
info.`name` username
from kqgl_asso_dkjl dkjl
LEFT JOIN yggl_main_emp as info on info.emp_num = dkjl.user_id
LEFT JOIN (select m.name as post,um.name as dept,m.id as mid
from zzgl_bmgw_m m
left join zzgl_bmgw_m um on um.id = m.up_id
) as bmgw on bmgw.mid = info.bmgw_id
where dkjl.qyid = #{param.qyid}
<if test="param.start != ''" >
and dkjl.attime &gt;= #{param.start}
</if>
<if test="param.end != ''" >
and dkjl.attime &lt;= #{param.end}
</if>
<if test="param.text != null and param.text != ''" >
and (info.`name` like CONCAT('%',#{param.text},'%') or info.emp_num = #{param.text})
</if>
ORDER BY dkjl.id ASC
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment