Commit 798533a3 authored by tianyiming's avatar tianyiming

bug修改

parent 03c6825a
...@@ -325,5 +325,6 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> { ...@@ -325,5 +325,6 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> {
*/ */
List<CountDto> countBizNumAfterUseRegBatchProjectContraption(@Param("projectContraptionIds") List<Long> projectContraptionIds); List<CountDto> countBizNumAfterUseRegBatchProjectContraption(@Param("projectContraptionIds") List<Long> projectContraptionIds);
List<Map<String, String>> gdEquOnJgServiceOperationRecords(@Param("record") String record);
} }
...@@ -3131,4 +3131,33 @@ ...@@ -3131,4 +3131,33 @@
) )
group by projectContraptionId group by projectContraptionId
</select> </select>
<select id="gdEquOnJgServiceOperationRecords" resultType="java.util.Map">
SELECT
tjri.sequence_nbr AS sequenceNbr,
tjri.business_type AS businessType,
tjri.apply_no AS applyNo,
tjri.rec_user_id AS recUserId,
tjri.rec_user_name AS recUserName,
DATE_FORMAT ( rec_date, '%Y-%m-%d %H:%i:%s' ) AS recDate,
tjri.approval_unit AS approvalUnit,
tjri.status,
tjri.route_path AS routePath
FROM
tzs_jg_resume_info tjri
JOIN (
SELECT tjri2.apply_no,
MAX ( tjri2.rec_date ) AS max_rec_date
FROM
tzs_jg_resume_info
tjri2 LEFT JOIN tzs_jg_installation_notice tjin ON tjri2.equ_id = tjin.project_contraption_id
LEFT JOIN tzs_jg_installation_notice_eq tjineq ON tjin.sequence_nbr = tjineq.equip_transfer_id
WHERE
tjineq.equ_id = 'c005586e-0065-4ee8-b89a-5fcad85d4868'
GROUP BY
tjri2.apply_no
) AS latest ON tjri.apply_no = latest.apply_no
AND tjri.rec_date = latest.max_rec_date
ORDER BY
tjri.rec_date ASC
</select>
</mapper> </mapper>
...@@ -1144,13 +1144,12 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform ...@@ -1144,13 +1144,12 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
// 更新设备监管部门 // 更新设备监管部门
IdxBizJgSupervisionInfo idxBizJgSupervisionInfo = new IdxBizJgSupervisionInfo(); IdxBizJgSupervisionInfo idxBizJgSupervisionInfo = new IdxBizJgSupervisionInfo();
if (map.containsKey("orgBranchCode") && !ObjectUtils.isEmpty(map.get("orgBranchCode"))) { if (!ObjectUtils.isEmpty(jgVehicleInformation.getOrgBranchCode())) {
String[] data = String.valueOf(map.getString("orgBranchCode")).split("_"); HashMap<String, Object> parentMessage = (HashMap<String, Object>) Privilege.companyClient.queryByOrgcode(jgVehicleInformation.getOrgBranchCode()).getResult();
HashMap<String, Object> parentMessage = (HashMap<String, Object>) Privilege.companyClient.queryByOrgcode(data[0]).getResult();
// 目前平台返回key为compnay(存在拼写错误) // 目前平台返回key为compnay(存在拼写错误)
CompanyModel parentModel = JSON.parseObject(JSON.toJSONString(parentMessage.get("compnay")), CompanyModel.class); CompanyModel parentModel = JSON.parseObject(JSON.toJSONString(parentMessage.get("compnay")), CompanyModel.class);
idxBizJgSupervisionInfo.setOrgBranchCode(data[0]); idxBizJgSupervisionInfo.setOrgBranchCode(jgVehicleInformation.getOrgBranchCode());
idxBizJgSupervisionInfo.setOrgBranchName(data[1]); idxBizJgSupervisionInfo.setOrgBranchName(jgVehicleInformation.getOrgBranchName());
idxBizJgSupervisionInfo.setCompanyOrgBranchCode(parentModel.getCompanyCode()); idxBizJgSupervisionInfo.setCompanyOrgBranchCode(parentModel.getCompanyCode());
LambdaQueryWrapper<IdxBizJgSupervisionInfo> eq = new QueryWrapper<IdxBizJgSupervisionInfo>().lambda().eq(IdxBizJgSupervisionInfo::getRecord, map.get("record")); LambdaQueryWrapper<IdxBizJgSupervisionInfo> eq = new QueryWrapper<IdxBizJgSupervisionInfo>().lambda().eq(IdxBizJgSupervisionInfo::getRecord, map.get("record"));
idxBizJgSupervisionInfoMapper.update(idxBizJgSupervisionInfo, eq); idxBizJgSupervisionInfoMapper.update(idxBizJgSupervisionInfo, eq);
......
package com.yeejoin.amos.boot.module.statistics.api.vo; package com.yeejoin.amos.boot.module.statistics.api.vo;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.Date;
import java.util.List; import java.util.List;
@Data @Data
public class TzsUserInfoVo { public class TzsUserInfoVo {
/** /**
* 主键
*/
@TableId(value = "sequence_nbr")
protected Long sequenceNbr;
/**
* 姓名 * 姓名
*/ */
@TableField("name") @TableField("name")
...@@ -119,6 +124,13 @@ public class TzsUserInfoVo { ...@@ -119,6 +124,13 @@ public class TzsUserInfoVo {
*/ */
@TableField("unit_name") @TableField("unit_name")
private String unitName; private String unitName;
/**
* 单位code
*/
@TableField("unit_code")
private String unitCode;
/** /**
* 头像 * 头像
*/ */
......
...@@ -432,8 +432,9 @@ public class JGDPStatisticsController extends BaseController { ...@@ -432,8 +432,9 @@ public class JGDPStatisticsController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "common/equOnJgServiceOperationRecords") @GetMapping(value = "common/equOnJgServiceOperationRecords")
@ApiOperation(httpMethod = "GET", value = "查询设备在jg业务中的记录", notes = "查询设备在jg业务中的记录") @ApiOperation(httpMethod = "GET", value = "查询设备在jg业务中的记录", notes = "查询设备在jg业务中的记录")
public ResponseModel<List<Map<String, String>>> equOnJgServiceOperationRecords(@RequestParam(value = "record") String record) { public ResponseModel<List<Map<String, String>>> equOnJgServiceOperationRecords(@RequestParam(value = "record") String record,
return ResponseHelper.buildResponse(statisticsService.equOnJgServiceOperationRecords(record)); @RequestParam(value = "equipType", required = false) String equipType) {
return ResponseHelper.buildResponse(statisticsService.equOnJgServiceOperationRecords(record,equipType));
} }
/** /**
......
...@@ -2135,8 +2135,14 @@ public class JGDPStatisticsServiceImpl { ...@@ -2135,8 +2135,14 @@ public class JGDPStatisticsServiceImpl {
} }
} }
public List<Map<String, String>> equOnJgServiceOperationRecords(String record) { public List<Map<String, String>> equOnJgServiceOperationRecords(String record, String equipType) {
return commonMapper.equOnJgServiceOperationRecords(record).stream() List<Map<String, String>> maps = new ArrayList<>();
if ("8000".equals(equipType)) {
maps = commonMapper.gdEquOnJgServiceOperationRecords(record);
} else {
maps = commonMapper.equOnJgServiceOperationRecords(record);
}
return maps.stream()
.map(x -> { .map(x -> {
Map<String, String> map = new HashMap<>(); Map<String, String> map = new HashMap<>();
map.put("operatingTime", x.get("recDate")); map.put("operatingTime", x.get("recDate"));
......
...@@ -23,7 +23,6 @@ import org.springframework.beans.BeanUtils; ...@@ -23,7 +23,6 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -90,7 +89,7 @@ public class UserBizByTCMServiceImpl { ...@@ -90,7 +89,7 @@ public class UserBizByTCMServiceImpl {
tzsUserInfoVo.setSpeciality_required(tzsUserInfo.getSpeciality()); tzsUserInfoVo.setSpeciality_required(tzsUserInfo.getSpeciality());
tzsUserInfoVo.setEducation_required(tzsUserInfo.getEducation()); tzsUserInfoVo.setEducation_required(tzsUserInfo.getEducation());
tzsUserInfoVo.setJobTitle_required(tzsUserInfo.getJobTitle()); tzsUserInfoVo.setJobTitle_required(tzsUserInfo.getJobTitle());
String companyType = getUnitType(); String companyType = getUnitType(tzsUserInfo.getUnitCode());
tzsUserInfoVo.setCompanyType(companyType.contains("个人主体") ? "individual" : "no-individual"); tzsUserInfoVo.setCompanyType(companyType.contains("个人主体") ? "individual" : "no-individual");
Map<String, Object> userInfoMap = BeanUtil.beanToMap(tzsUserInfoVo); Map<String, Object> userInfoMap = BeanUtil.beanToMap(tzsUserInfoVo);
// userInfoMap.putAll(this.getPermissionDataJson(tzsUserInfo.getPermissionData())); // userInfoMap.putAll(this.getPermissionDataJson(tzsUserInfo.getPermissionData()));
...@@ -101,12 +100,12 @@ public class UserBizByTCMServiceImpl { ...@@ -101,12 +100,12 @@ public class UserBizByTCMServiceImpl {
return maps; return maps;
} }
public String getUnitType() { public String getUnitType(String unitCode) {
List<CompanyModel> companyModels = FeignUtil.remoteCall(() -> Privilege.companyClient.queryListByChild(RequestContext.getExeUserId())); CompanyModel companyModel = FeignUtil.remoteCall(() -> Privilege.companyClient.queryByCompanyCode(unitCode));
if (companyModels.isEmpty()) { if (ObjectUtils.isEmpty(companyModel)) {
return ""; return "";
} }
return companyModels.get(0).getCompanyType(); return companyModel.getCompanyType();
} }
/** /**
......
...@@ -89,7 +89,8 @@ ...@@ -89,7 +89,8 @@
"httpMethod":"GET", "httpMethod":"GET",
"apiPath":"/statistics/dp/jg/common/equOnJgServiceOperationRecords", "apiPath":"/statistics/dp/jg/common/equOnJgServiceOperationRecords",
"params": { "params": {
"record": "{record}" "record": "{record}",
"equipType": "8000"
}, },
"ruleData": { "ruleData": {
"responseSuccess": "data.result", "responseSuccess": "data.result",
......
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