Commit 7725774c by ilal

Merge branch 'lal' into develop

parents 7ba74da5 e9aaefe0
...@@ -1702,16 +1702,28 @@ public class TimeCardController { ...@@ -1702,16 +1702,28 @@ public class TimeCardController {
/** /**
* 考勤原始记录-根据 模糊 + 高級查詢-分页 * 考勤原始记录-根据 模糊 + 高級查詢-分页
* @throws ParseException
*/ */
@PostMapping(value = "/attendancecalendar") @PostMapping(value = "/attendancecalendar")
@ApiOperation(value = "考勤原始记录-根据 模糊 + 高級查詢-分页", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "考勤原始记录-根据 模糊 + 高級查詢-分页", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 34) @ApiOperationSupport(order = 34)
public Result<Object> AttendanceCalendar(@CurrentUser UserBean userBean, @Validated @RequestBody OriginalRecordDto originalrecorddto){ public Result<Object> AttendanceCalendar(@CurrentUser UserBean userBean, @Validated @RequestBody OriginalRecordDto originalrecorddto) throws ParseException{
IPage<PunchRecord> page = new Page<PunchRecord>( IPage<PunchRecord> page = new Page<PunchRecord>(
originalrecorddto.getCurrentPage() == null ? 1 : originalrecorddto.getCurrentPage(), originalrecorddto.getCurrentPage() == null ? 1 : originalrecorddto.getCurrentPage(),
originalrecorddto.getTotalPage() == null ? 10 : originalrecorddto.getTotalPage()); originalrecorddto.getTotalPage() == null ? 10 : originalrecorddto.getTotalPage());
originalrecorddto.setQyid(userBean.getOrgCode()); originalrecorddto.setQyid(userBean.getOrgCode());
if(!originalrecorddto.getStart().equals("") && !originalrecorddto.getEnd().equals("") && originalrecorddto.getStart() != null && originalrecorddto.getEnd() != null) {
String sdaet = originalrecorddto.getStart() + " 00:00:00";
String staapptime = ClockInTool.dateToStamp(sdaet);
originalrecorddto.setStart(staapptime);
String edate = originalrecorddto.getEnd() + " 23:59:59";
String endapptime = ClockInTool.dateToStamp(edate);
originalrecorddto.setEnd(endapptime);
}
IPage<PunchRecord> pageAs = punchrecordmapper.QueryOriginalRecord(page, originalrecorddto); IPage<PunchRecord> pageAs = punchrecordmapper.QueryOriginalRecord(page, originalrecorddto);
List<PunchRecord> listAs = pageAs.getRecords(); List<PunchRecord> listAs = pageAs.getRecords();
...@@ -1719,6 +1731,28 @@ public class TimeCardController { ...@@ -1719,6 +1731,28 @@ public class TimeCardController {
} }
@PostMapping(value = "/exportattendancecalendar")
@ApiOperation(value = "", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 34)
public Result<Object> exportattendancecalendar(@CurrentUser UserBean userBean, @Validated @RequestBody OriginalRecordDto originalrecorddto) throws ParseException{
originalrecorddto.setQyid(userBean.getOrgCode());
if(!originalrecorddto.getStart().equals("") && !originalrecorddto.getEnd().equals("") && originalrecorddto.getStart() != null && originalrecorddto.getEnd() != null) {
String sdaet = originalrecorddto.getStart() + " 00:00:00";
String staapptime = ClockInTool.dateToStamp(sdaet);
originalrecorddto.setStart(staapptime);
String edate = originalrecorddto.getEnd() + " 23:59:59";
String endapptime = ClockInTool.dateToStamp(edate);
originalrecorddto.setEnd(endapptime);
}
List<PunchRecord> listAs = punchrecordmapper.exportQueryOriginalRecord(originalrecorddto);
return ResultUtil.data(listAs,"操作成功!");
}
/** /**
* 获取考勤组所需加班规则 * 获取考勤组所需加班规则
*/ */
......
...@@ -2223,7 +2223,7 @@ public class SalaryManagementController { ...@@ -2223,7 +2223,7 @@ public class SalaryManagementController {
String[] miscalculation = getPersonalincometax(cumynssde); String[] miscalculation = getPersonalincometax(cumynssde);
gsmx.setTaxRate(Double.valueOf(miscalculation[0]));//税率 gsmx.setTaxRate(Double.valueOf(miscalculation[0]));//税率
gsmx.setQuickCalculationDeduction(Double.valueOf(miscalculation[1]));//速算扣除数 gsmx.setQuickCalculationDeduction(Double.valueOf(miscalculation[1]));//速算扣除数
gsmx.setCumYnse(Double.valueOf(miscalculation[2]));//累计应纳税额 【累计应纳税所得额*税率-速算扣除数】 gsmx.setCumYnse(SalaryTool.formatDouble_(Double.valueOf(miscalculation[2])));//累计应纳税额 【累计应纳税所得额*税率-速算扣除数】
double cumyyjse = 0; double cumyyjse = 0;
cumyyjse = (sygs == null ? 0 : sygs.getCumYyjse()) + (sygs == null ? 0 : sygs.getCumYbtse()); cumyyjse = (sygs == null ? 0 : sygs.getCumYyjse()) + (sygs == null ? 0 : sygs.getCumYbtse());
...@@ -2231,8 +2231,8 @@ public class SalaryManagementController { ...@@ -2231,8 +2231,8 @@ public class SalaryManagementController {
double cumybtse = 0; double cumybtse = 0;
cumybtse = gsmx.getCumYnse() - gsmx.getCumYyjse(); cumybtse = gsmx.getCumYnse() - gsmx.getCumYyjse();
gsmx.setCumYbtse(cumybtse);//累计应补(退)税额(本月个税) 【累计应纳税额-累计已预缴纳税额】 gsmx.setCumYbtse(SalaryTool.formatDouble_(cumybtse));//累计应补(退)税额(本月个税) 【累计应纳税额-累计已预缴纳税额】
gsmx.setThmonthPersonal(cumybtse);//本月个税 gsmx.setThmonthPersonal(SalaryTool.formatDouble_(cumybtse));//本月个税
gsmx.setQyid(orgcode);//企业id gsmx.setQyid(orgcode);//企业id
gsmx.insert(); gsmx.insert();
......
...@@ -41,5 +41,7 @@ public interface PunchRecordMapper { ...@@ -41,5 +41,7 @@ public interface PunchRecordMapper {
IPage<PunchRecord> QueryOriginalRecord(IPage<PunchRecord> page,@Param("param") OriginalRecordDto originalrecorddto); IPage<PunchRecord> QueryOriginalRecord(IPage<PunchRecord> page,@Param("param") OriginalRecordDto originalrecorddto);
List<PunchRecord> exportQueryOriginalRecord(@Param("param") OriginalRecordDto originalrecorddto);
PunchRecord organizationalStructure(int id); PunchRecord organizationalStructure(int id);
} }
\ No newline at end of file
...@@ -65,6 +65,30 @@ ...@@ -65,6 +65,30 @@
ORDER BY dkjl.id DESC ORDER BY dkjl.id DESC
</select> </select>
<select id="exportQueryOriginalRecord" 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 and info.org_code = #{param.qyid}
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 DESC
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select select
......
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