材料站优化
This commit is contained in:
parent
ffeea860d9
commit
ebc342a9c1
|
|
@ -140,8 +140,14 @@ public class MaterialMachineController extends BaseController {
|
|||
@PostMapping("/exportStorageInfoList")
|
||||
public void exportStorageInfoList(HttpServletResponse response, MaterialStorageInfo bean) {
|
||||
List<MaterialStorageInfo> list = materialMachineService.getMaCodeList(bean);
|
||||
// 根据list集合数,去填充序号
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
list.get(i).setSeq(i + 1);
|
||||
}
|
||||
// 获取当前年月日导出时间,用括号拼接在后面
|
||||
String title = "工器具台账详情" + "(" + DateUtils.getTime() + ")";
|
||||
ExcelUtil<MaterialStorageInfo> util = new ExcelUtil<>(MaterialStorageInfo.class);
|
||||
util.exportExcel(response, list, "综合查询--在库机具设备详情");
|
||||
util.exportExcel(response, list, "工器具台账详情", title);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.material.clz.domain.back;
|
||||
|
||||
import com.bonus.common.biz.domain.lease.LeaseOutSign;
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -222,4 +223,7 @@ public class MaterialBackApplyInfo implements Serializable {
|
|||
@ApiModelProperty(value = "是否直转 0 否,1 是")
|
||||
private Integer isZz;
|
||||
|
||||
@ApiModelProperty(value = "审核人签名集合")
|
||||
private List<LeaseOutSign> approveSignList;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@ public class MaterialStorageInfo {
|
|||
@ApiModelProperty(value = "主键id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "序号")
|
||||
@Excel(name = "序号", width = 5)
|
||||
private Integer seq;
|
||||
|
||||
@ApiModelProperty(value = "机具名称")
|
||||
@Excel(name = "机具名称")
|
||||
private String typeName;
|
||||
|
|
@ -32,6 +36,7 @@ public class MaterialStorageInfo {
|
|||
private String typeModelName;
|
||||
|
||||
@ApiModelProperty(value = "入库数量")
|
||||
@Excel(name = "数量", cellType = Excel.ColumnType.NUMERIC)
|
||||
private BigDecimal storeNum;
|
||||
|
||||
@ApiModelProperty(value = "购置单价")
|
||||
|
|
@ -49,6 +54,16 @@ public class MaterialStorageInfo {
|
|||
//@Excel(name = "操作人")
|
||||
private String inputUser;
|
||||
|
||||
@ApiModelProperty(value = "操作人")
|
||||
@Excel(name = "操作人")
|
||||
private String creator;
|
||||
|
||||
@ApiModelProperty(value = "出库时间")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "出库时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date outTime;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
|
|
@ -65,8 +80,13 @@ public class MaterialStorageInfo {
|
|||
private String teamId;
|
||||
|
||||
@ApiModelProperty(value = "班组名称")
|
||||
@Excel(name = "班组")
|
||||
private String teamName;
|
||||
|
||||
@ApiModelProperty(value = "工程名称")
|
||||
@Excel(name = "工程名称", width = 35)
|
||||
private String proName;
|
||||
|
||||
@ApiModelProperty(value = "领料id")
|
||||
private String leaseId;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.material.clz.mapper;
|
||||
|
||||
import com.bonus.common.biz.domain.TypeTreeNode;
|
||||
import com.bonus.common.biz.domain.lease.LeaseOutSign;
|
||||
import com.bonus.material.back.domain.BackApplyInfo;
|
||||
import com.bonus.material.back.domain.vo.MaCodeVo;
|
||||
import com.bonus.material.clz.domain.back.MaterialBackApplyDetails;
|
||||
|
|
@ -260,4 +261,11 @@ public interface MaterialBackInfoMapper {
|
|||
* @return
|
||||
*/
|
||||
String getLeaseAgreement(MaterialLeaseApplyInfo leaseApplyInfo);
|
||||
|
||||
/**
|
||||
* 查询退料协议电子签名
|
||||
* @param externalId
|
||||
* @return
|
||||
*/
|
||||
List<LeaseOutSign> getLeaseOutSignList(String externalId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import com.bonus.common.biz.constant.MaterialConstants;
|
|||
import com.bonus.common.biz.domain.BmFileInfo;
|
||||
import com.bonus.common.biz.domain.TypeTreeBuild;
|
||||
import com.bonus.common.biz.domain.TypeTreeNode;
|
||||
import com.bonus.common.biz.domain.lease.LeaseOutSign;
|
||||
import com.bonus.common.biz.enums.BackTaskStatusEnum;
|
||||
import com.bonus.common.biz.enums.HttpCodeEnum;
|
||||
import com.bonus.common.biz.enums.MaMachineStatusEnum;
|
||||
import com.bonus.common.biz.enums.TmTaskTypeEnum;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
|
|
@ -21,7 +21,6 @@ import com.bonus.material.back.domain.vo.MaCodeVo;
|
|||
import com.bonus.material.basic.mapper.BmFileInfoMapper;
|
||||
import com.bonus.material.clz.domain.BmTeam;
|
||||
import com.bonus.material.clz.domain.lease.MaterialLeaseApplyInfo;
|
||||
import com.bonus.material.clz.domain.vo.MaterialRetainedEquipmentInfo;
|
||||
import com.bonus.material.clz.mapper.IwsTeamUserMapper;
|
||||
import com.bonus.material.clz.mapper.MaterialMachineMapper;
|
||||
import com.bonus.material.common.mapper.SelectMapper;
|
||||
|
|
@ -343,6 +342,16 @@ public class MaterialBackApplyInfoServiceImpl implements MaterialBackApplyInfoSe
|
|||
backApplyInfo.setBackSignUrl("data:image/png;base64," + backApplyInfo.getBackSignUrl());
|
||||
}
|
||||
}
|
||||
// 根据i8工程ID查询材料员
|
||||
List<LeaseOutSign> leaseOutSignList = materialBackInfoMapper.getLeaseOutSignList(backApplyInfo.getExternalId());
|
||||
if (CollectionUtils.isNotEmpty(leaseOutSignList)) {
|
||||
for (LeaseOutSign leaseOutSign : leaseOutSignList) {
|
||||
if (!leaseOutSign.getOutSignUrl().startsWith("http")) {
|
||||
leaseOutSign.setOutSignUrl("data:image/png;base64," + leaseOutSign.getOutSignUrl());
|
||||
}
|
||||
}
|
||||
backApplyInfo.setApproveSignList(leaseOutSignList);
|
||||
}
|
||||
backApplyRequestVo.setBackApplyInfo(backApplyInfo);
|
||||
//查询退料详情信息
|
||||
backApplyInfo.setKeyWord(keyWord);
|
||||
|
|
|
|||
|
|
@ -250,6 +250,18 @@ public class MaterialMachineServiceImpl implements MaterialMachineService {
|
|||
List<MaterialStorageInfo> list = new ArrayList<>();
|
||||
if (!StringHelper.isNullOrEmptyString(bean.getTeamId())){
|
||||
list = materialMachineMapper.getMaCodeDetails(bean);
|
||||
for (MaterialStorageInfo useStorageInfo : list) {
|
||||
// 查询出库信息
|
||||
MaterialUseStorageInfo materialUseStorageInfo = new MaterialUseStorageInfo();
|
||||
if (useStorageInfo.getLeaseId() != null) {
|
||||
materialUseStorageInfo.setLeaseId(Long.valueOf(useStorageInfo.getLeaseId()));
|
||||
MaterialUseStorageInfo dto = materialMachineMapper.selectUseInFo(materialUseStorageInfo);
|
||||
if (dto != null) {
|
||||
useStorageInfo.setCreator(dto.getCreator());
|
||||
useStorageInfo.setOutTime(dto.getOutTime());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
list = materialMachineMapper.getMaCodeList(bean);
|
||||
List<MaterialStorageInfo> useList = materialMachineMapper.getMaCodeDetails(bean);
|
||||
|
|
@ -259,8 +271,6 @@ public class MaterialMachineServiceImpl implements MaterialMachineService {
|
|||
.filter(item -> useList.stream().noneMatch(useItem -> useItem.getMaId().equals(item.getMaId())))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
for (MaterialStorageInfo useStorageInfo : list) {
|
||||
// 查询出库信息
|
||||
if (useStorageInfo.getLeaseId() != null) {
|
||||
|
|
@ -271,9 +281,11 @@ public class MaterialMachineServiceImpl implements MaterialMachineService {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
String keyWord = bean.getKeyWord();
|
||||
// 如果关键字不为空,进行过滤
|
||||
if (!com.bonus.common.core.utils.StringUtils.isBlank(keyWord)) {
|
||||
if (!StringUtils.isBlank(keyWord)) {
|
||||
list = list.stream()
|
||||
.filter(item -> containsKeyword(item, keyWord))
|
||||
.collect(Collectors.toList());
|
||||
|
|
|
|||
|
|
@ -443,7 +443,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
bp.pro_name AS proName,
|
||||
bai.direct_audit_by AS directAuditBy,
|
||||
bai.back_sign_url AS backSignUrl,
|
||||
bai.back_sign_type AS backSignType
|
||||
bai.back_sign_type AS backSignType,
|
||||
bp.external_id AS externalId
|
||||
FROM
|
||||
clz_back_apply_info bai
|
||||
LEFT JOIN tm_task_agreement tta ON bai.task_id = tta.task_id
|
||||
|
|
@ -913,4 +914,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
Limit 1
|
||||
</select>
|
||||
|
||||
<select id="getLeaseOutSignList" resultType="com.bonus.common.biz.domain.lease.LeaseOutSign">
|
||||
SELECT
|
||||
su.sign_type as outSignType,
|
||||
su.sign_url as outSignUrl
|
||||
FROM
|
||||
data_center.dx_fb_son dfs
|
||||
LEFT JOIN `sbd_audit`.sg_project_post_personnel sp ON dfs.project_dept_id = sp.depart_id
|
||||
LEFT JOIN sys_user su ON sp.cno = su.user_name
|
||||
WHERE
|
||||
su.sign_type is not null
|
||||
AND su.sign_url is not null
|
||||
AND sp.post_id = '3de0eb390f3611efa1940242ac130004'
|
||||
AND dfs.id = #{externalId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -235,7 +235,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
sai.lease_id AS leaseId,
|
||||
sai.type_id AS typeId,
|
||||
lai.code AS code,
|
||||
sai.ma_id AS maId
|
||||
sai.ma_id AS maId,
|
||||
bp.pro_name AS proName
|
||||
FROM
|
||||
slt_agreement_info sai
|
||||
LEFT JOIN ma_type mt ON mt.type_id = sai.type_id
|
||||
|
|
@ -1615,7 +1616,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
sai.lease_id AS leaseId,
|
||||
sai.type_id AS typeId,
|
||||
lai.code AS code,
|
||||
sai.ma_id AS maId
|
||||
sai.ma_id AS maId,
|
||||
bp.pro_name AS proName
|
||||
FROM clz_slt_agreement_info sai
|
||||
LEFT JOIN ma_type mt ON mt.type_id = sai.type_id
|
||||
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
|
||||
|
|
|
|||
|
|
@ -644,7 +644,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
FROM
|
||||
`data_center`.dx_fb_son
|
||||
WHERE
|
||||
project_status in ('在建', '开工准备')
|
||||
1 = 1
|
||||
<if test="list != null and list.size > 0">
|
||||
AND project_dept_id IN
|
||||
<foreach item="item" collection="list" separator="," open="(" close=")">
|
||||
|
|
@ -1101,7 +1101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
FROM
|
||||
`data_center`.dx_fb_son
|
||||
WHERE
|
||||
project_status in ('在建')
|
||||
1 = 1
|
||||
<if test="list != null and list.size > 0">
|
||||
AND project_dept_id IN
|
||||
<foreach item="item" collection="list" separator="," open="(" close=")">
|
||||
|
|
|
|||
Loading…
Reference in New Issue