Commit 2fea6f39 authored by chenzhao's avatar chenzhao

修改bug

parent 5c86ce9b
......@@ -143,4 +143,5 @@ public interface DutyPersonShiftMapper extends BaseMapper<DutyPersonShift> {
List<Map<String, Object>> getNewEquipmentForSpecifyDate(String dutyDate,String groupCode,String equipmentId,String equipmentName,String groupByName);
String getFirstAidCompanyId ();
}
......@@ -390,6 +390,16 @@ WHERE
</select>
<select id='getFirstAidCompanyId' resultType="string">
SELECT
sequence_nbr
FROM
cb_org_usr a
WHERE
a.is_delete = 0
AND
a.biz_org_name = '消防救援保障部'
</select>
<select id='getFirstAidForTypeCodeAndCompanyId' resultType="map">
SELECT
......
......@@ -90,7 +90,7 @@ public class LatentDanger extends BasicEntity {
/**
* 限制时间
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date reformLimitDate;
private Integer overtimeState;
......
......@@ -124,6 +124,11 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID
List< Map<String, Object>> result = new ArrayList<Map<String, Object>>();
List<String> userNameList= new ArrayList<String>();
String firstAidCompanyId = dutyPersonShiftMapper.getFirstAidCompanyId();
if (firstAidCompanyId != "" && firstAidCompanyId != null){
ids.add(firstAidCompanyId);
}
List<String> firstAidSimpleList = new ArrayList<String>();
List<String> companyNameList = new ArrayList<String>();
String typeString = "JJZ";
......
......@@ -97,17 +97,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.*;
import java.util.stream.Collectors;
import static com.yeejoin.amos.latentdanger.business.util.RandomUtil.buildOrderNo;
......@@ -251,7 +241,8 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
if (ValidationUtil.isEmpty(dangerTypeEnum)) {
throw new Exception("检查类型参数有误");
}
Date endTime = this.GetTargetEndTime(param.getReformLimitDate());
param.setReformLimitDate(endTime);
// 保存隐患
LatentDanger latentDanger = saveLatentDanger(param, userId, departmentId, businessKey, orgCode,
dangerTypeEnum);
......@@ -326,6 +317,16 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
// riskFactorMapper.updateControlStatus(riskFactorBo);
// }
public static Date GetTargetEndTime(Date target) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(target);
calendar.set(Calendar.HOUR_OF_DAY, 23);
calendar.set(Calendar.MINUTE, 59);
calendar.set(Calendar.SECOND, 59);
Date end = calendar.getTime();
return end;
}
// TODO 使用远程调用替换
private void updateCheckInputDangerState(Long id, int code) {
latentDangerMapper.updateCheckInputDangerState(id, code);
......
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