Commit 5d7402c5 authored by zhangwanglin's avatar zhangwanglin

打卡记录问题修复

parent cf6fa110
...@@ -37,7 +37,7 @@ public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> { ...@@ -37,7 +37,7 @@ public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> {
ChDisabDetailAccounts selectAccountsDetail(String disabInfoId, String srvDateStr); ChDisabDetailAccounts selectAccountsDetail(String disabInfoId, String srvDateStr);
void updateChDisabDetailAccounts(Long accountsId, BigDecimal accountsAllCostsub, BigDecimal accountsOverallCostsub, BigDecimal accountsPersonalCostsub); void updateChDisabDetailAccounts(Long accountsDetailId, BigDecimal accountsAllCostsub, BigDecimal accountsOverallCostsub, BigDecimal accountsPersonalCostsub);
List<ChSrvTaskDetail2Vo> chSrvTaskDetailExportList(Long empId, String empName,String status,String sevrTime); List<ChSrvTaskDetail2Vo> chSrvTaskDetailExportList(Long empId, String empName,String status,String sevrTime);
......
...@@ -40,6 +40,7 @@ import java.text.ParseException; ...@@ -40,6 +40,7 @@ import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Service @Service
...@@ -211,14 +212,15 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService { ...@@ -211,14 +212,15 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
Date srvEndTime = chSrvTaskDetail.getSrvEndTime(); Date srvEndTime = chSrvTaskDetail.getSrvEndTime();
String srvEndTimeStr = DateUtils.dateTimeToStr(srvEndTime); String srvEndTimeStr = DateUtils.dateTimeToStr(srvEndTime);
Long min = dateDiff(srvStartTimeStr, srvEndTimeStr, "yyyy-MM-dd HH:mm:ss", "min"); Long min = dateDiff(srvStartTimeStr, srvEndTimeStr, "yyyy-MM-dd HH:mm:ss", "min");
if(min>=90){ if(min>=90) {
Date srvDate = chSrvTaskDetail.getSrvDate(); Date srvDate = chSrvTaskDetail.getSrvDate();
String srvDateStr = DateUtils.dateToStrYm(srvDate); String srvDateStr = DateUtils.dateToStrYm(srvDate);
Long srvTaskId = chSrvTaskDetail.getSrvTaskId(); Long srvTaskId = chSrvTaskDetail.getSrvTaskId();
String disabInfoId = chSrvTaskDetailMapper.selectBySrvTaskId(String.valueOf(srvTaskId)); String disabInfoId = chSrvTaskDetailMapper.selectBySrvTaskId(String.valueOf(srvTaskId));
ChDisabDetailAccounts chDisabDetailAccounts = chSrvTaskDetailMapper.selectAccountsDetail(disabInfoId, srvDateStr); ChDisabDetailAccounts chDisabDetailAccounts = chSrvTaskDetailMapper.selectAccountsDetail(disabInfoId, srvDateStr);
if (Objects.nonNull(chDisabDetailAccounts)) {
Short status = chDisabDetailAccounts.getStatus(); Short status = chDisabDetailAccounts.getStatus();
if(status != 0){ if (status != 0) {
// 已申报不能进行删除 // 已申报不能进行删除
return Result.failed("已申报不能进行删除"); return Result.failed("已申报不能进行删除");
} }
...@@ -228,8 +230,9 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService { ...@@ -228,8 +230,9 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
BigDecimal accountsAllCostsub = accountsAllCost.subtract(new BigDecimal(75)); BigDecimal accountsAllCostsub = accountsAllCost.subtract(new BigDecimal(75));
BigDecimal accountsOverallCostsub = accountsOverallCost.subtract(new BigDecimal(60)); BigDecimal accountsOverallCostsub = accountsOverallCost.subtract(new BigDecimal(60));
BigDecimal accountsPersonalCostsub = accountsPersonalCost.subtract(new BigDecimal(15)); BigDecimal accountsPersonalCostsub = accountsPersonalCost.subtract(new BigDecimal(15));
Long accountsId = chDisabDetailAccounts.getAccountsId(); Long accountsDetailId = chDisabDetailAccounts.getAccountsDetailId();
chSrvTaskDetailMapper.updateChDisabDetailAccounts(accountsId,accountsAllCostsub,accountsOverallCostsub,accountsPersonalCostsub); chSrvTaskDetailMapper.updateChDisabDetailAccounts(accountsDetailId, accountsAllCostsub, accountsOverallCostsub, accountsPersonalCostsub);
}
} }
} }
chSrvTaskDetailMapper.deleteFinshItem(taskDetailId); chSrvTaskDetailMapper.deleteFinshItem(taskDetailId);
......
...@@ -128,7 +128,7 @@ WHERE TASK_DETAIL_ID = #{taskDetailId} ...@@ -128,7 +128,7 @@ WHERE TASK_DETAIL_ID = #{taskDetailId}
<update id = "updateChDisabDetailAccounts"> <update id = "updateChDisabDetailAccounts">
UPDATE CH_DISAB_ACCOUNTS_DETAIL d SET d.ACCOUNTS_ALL_COST = #{accountsAllCostsub}, d.ACCOUNTS_OVERALL_COST = #{accountsOverallCostsub}, UPDATE CH_DISAB_ACCOUNTS_DETAIL d SET d.ACCOUNTS_ALL_COST = #{accountsAllCostsub}, d.ACCOUNTS_OVERALL_COST = #{accountsOverallCostsub},
d.ACCOUNTS_PERSONAL_COST = #{accountsPersonalCostsub} d.ACCOUNTS_PERSONAL_COST = #{accountsPersonalCostsub}
WHERE d.ACCOUNTS_ID = #{accountsId} WHERE d.ACCOUNTS_DETAIL_ID = #{accountsDetailId}
</update> </update>
<select id="selectBySrvTaskId" resultType="java.lang.String"> <select id="selectBySrvTaskId" resultType="java.lang.String">
......
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