Commit 147d3f7b authored by 韩桐桐's avatar 韩桐桐

fix(jg):设备办理jg业务log接口

parent ce51e580
......@@ -40,7 +40,7 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> {
Map<String, Object> getUserPhone(String name ,String companyCode);
List<Map<String, Object>> equOnJgServiceOperationRecords(String record);
List<Map<String, String>> equOnJgServiceOperationRecords(String record);
/**
* 统计指定设备流程中的引用次数(12个流程中,非待提交、非已撤回、非已驳回)
......
......@@ -100,9 +100,11 @@
select
sequenceNbr,
businessName,
applyNo,
recUserId,
recUserName,
DATE_FORMAT(recDate,'%Y-%m-%d %H:%i:%s') as recDate
DATE_FORMAT(recDate,'%Y-%m-%d %H:%i:%s') as recDate,
receiveOrgName
from idx_biz_view_jg_equ_log
where sequenceNbr = #{record}
order by recDate ASC
......
......@@ -439,7 +439,7 @@ public class CommonController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/equOnJgServiceOperationRecords")
@ApiOperation(httpMethod = "GET", value = "查询设备在jg业务中的记录", notes = "查询设备在jg业务中的记录")
public ResponseModel<List<Map<String, Object>>> equOnJgServiceOperationRecords(@RequestParam(value = "record") String record) {
public ResponseModel<List<Map<String, String>>> equOnJgServiceOperationRecords(@RequestParam(value = "record") String record) {
return ResponseHelper.buildResponse(commonService.equOnJgServiceOperationRecords(record));
}
......
......@@ -91,7 +91,7 @@ public interface ICommonService {
Map<String, Object> getUserPhone(String name);
List<Map<String, Object>> equOnJgServiceOperationRecords(String record);
List<Map<String, String>> equOnJgServiceOperationRecords(String record);
/**
* 执行流程时前置校验
......
......@@ -540,8 +540,15 @@ public class CommonServiceImpl implements ICommonService {
* @return
*/
@Override
public List<Map<String, Object>> equOnJgServiceOperationRecords(String record) {
return commonMapper.equOnJgServiceOperationRecords(record);
public List<Map<String, String>> equOnJgServiceOperationRecords(String record) {
List<Map<String, String>> maps = commonMapper.equOnJgServiceOperationRecords(record);
String template = "%s 创建人:%s 单号【%s】 审批单位:%s";
return maps.stream().map(x -> {
Map<String, String> map = new HashMap<>();
map.put("operatingTime", x.get("recDate"));
map.put("content", String.format(template, x.get("businessName"), x.get("recUserName"), x.get("applyNo"), x.get("receiveOrgName")));
return map;
}).collect(Collectors.toList());
}
/**
......
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