材料站
This commit is contained in:
parent
218fff6e46
commit
870da9e03f
|
|
@ -92,8 +92,8 @@ public class MaCodeVo {
|
|||
@ApiModelProperty(value = "外观判断合格数量")
|
||||
private BigDecimal goodNum;
|
||||
|
||||
@ApiModelProperty(value = "出库人")
|
||||
@Excel(name = "出库人")
|
||||
@ApiModelProperty(value = "出库人员")
|
||||
@Excel(name = "出库人员")
|
||||
private String outPerson;
|
||||
|
||||
@ApiModelProperty(value = "出库时间")
|
||||
|
|
|
|||
|
|
@ -48,6 +48,22 @@ public class BmTeamController extends BaseController {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据身份证号查询班组信息
|
||||
* @param tbTeam
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "根据身份证号查询班组信息")
|
||||
@GetMapping("/getListByIdCard")
|
||||
public AjaxResult getListByIdCard(BmTeam tbTeam) {
|
||||
try {
|
||||
return bmTeamService.getListByIdCard(tbTeam);
|
||||
} catch (Exception e) {
|
||||
log.error("查询班组数据失败", e);
|
||||
return AjaxResult.error("班组数据查询失败");
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "分页查询班组信息")
|
||||
@GetMapping("/getTeamList")
|
||||
public AjaxResult getTeamList(BmTeam tbTeam) {
|
||||
|
|
|
|||
|
|
@ -271,9 +271,10 @@ public class MaterialLeaseInfoController extends BaseController {
|
|||
@GetMapping("/getLeaseInfoDetails")
|
||||
public AjaxResult getLeaseInfoDetails(LeaseTotalInfo info) {
|
||||
info.setIsExport(1);
|
||||
startPage();
|
||||
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
|
||||
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
|
||||
List<LeaseTotalInfo> list = materialLeaseInfoService.getLeaseInfoDetails(info);
|
||||
return AjaxResult.success(getDataTable(list));
|
||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -124,4 +124,9 @@ public class BmTeam {
|
|||
* 班组id
|
||||
*/
|
||||
private String bzId;
|
||||
|
||||
/**
|
||||
* 班组长身份证号
|
||||
*/
|
||||
private String teamLeaderIdCard;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,4 +52,11 @@ public interface BmTeamService {
|
|||
* @return
|
||||
*/
|
||||
AjaxResult getTeamList(BmTeam tbTeam);
|
||||
|
||||
/**
|
||||
* 根据身份证号查询班组信息
|
||||
* @param tbTeam
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getListByIdCard(BmTeam tbTeam);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -147,6 +147,16 @@ public class BmTeamServiceImpl implements BmTeamService {
|
|||
return AjaxResult.success(bmTeamMapper.getTeamList(tbTeam));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据身份证查询班组信息
|
||||
* @param tbTeam
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult getListByIdCard(BmTeam tbTeam) {
|
||||
return AjaxResult.success(bmTeamMapper.queryByPage(tbTeam));
|
||||
}
|
||||
|
||||
/**
|
||||
* 手机号校验方法抽取
|
||||
* @param tbTeam
|
||||
|
|
|
|||
|
|
@ -48,8 +48,8 @@ public class IwsTeamUserServiceImpl implements IwsTeamUserService {
|
|||
if (iwsTeamUserVo == null) {
|
||||
return null;
|
||||
}
|
||||
if (StringUtils.isBlank(iwsTeamUserVo.getTeamLeaderIdCard())) {
|
||||
iwsTeamUserVo.setTeamLeaderIdCard(SecurityUtils.getLoginUser().getUsername());
|
||||
if (StringUtils.isBlank(iwsTeamUserVo.getIdCard())) {
|
||||
iwsTeamUserVo.setIdCard(SecurityUtils.getLoginUser().getUsername());
|
||||
}
|
||||
return iwsTeamUserVo;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -463,8 +463,7 @@ public class MaterialLeaseInfoServiceImpl implements MaterialLeaseInfoService {
|
|||
for (MaterialLeaseApplyDetails detail : outDetailsList) {
|
||||
List<MaterialLeaseMaCodeDto> maCodeVoList = materialLeaseInfoMapper.getCodeList(id, detail.getTypeId());
|
||||
if (!CollectionUtils.isEmpty(maCodeVoList)) {
|
||||
maCodeVoList.forEach(maCodeVo -> maCodeVo.setTypeName(maCodeVo.getMaterialModel()));
|
||||
detail.setMaCodeVoList(maCodeVoList);
|
||||
detail.setMaCodeList(maCodeVoList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import com.bonus.material.clz.mapper.BmTeamMapper;
|
|||
import com.bonus.material.clz.mapper.MaterialMachineMapper;
|
||||
import com.bonus.material.clz.service.MaterialMachineService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.http.client.utils.DateUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
|
|
|||
|
|
@ -236,4 +236,18 @@ public interface SelectMapper {
|
|||
List<String> getUserNameList(MaterialLeaseApplyInfo i8ProjectInfo);
|
||||
|
||||
List<BmProject> getProjectListByClz(BmProject bmProject);
|
||||
|
||||
/**
|
||||
* 根据用户名查询项目部信息
|
||||
* @param username
|
||||
* @return
|
||||
*/
|
||||
String getDepartId(String username);
|
||||
|
||||
/**
|
||||
* 根据项目部id查询工程信息
|
||||
* @param departId
|
||||
* @return
|
||||
*/
|
||||
List<String> getProjectId(String departId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -184,10 +184,20 @@ public class SelectServiceImpl implements SelectService {
|
|||
*/
|
||||
@Override
|
||||
public AjaxResult getProjectInfo(BmProject bmProject) {
|
||||
String username = SecurityUtils.getLoginUser().getUsername();
|
||||
// 根据用户名查询项目部信息
|
||||
String departId = mapper.getDepartId(username);
|
||||
// 根据项目部id查询工程信息
|
||||
List<String> projectIdList = mapper.getProjectId(departId);
|
||||
List<BmProject> list = new ArrayList<>();
|
||||
if (bmProject.getIsApp() != null && bmProject.getIsApp()) {
|
||||
list = mapper.getProjectInfo(bmProject);
|
||||
list.removeIf(Objects::isNull);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
if (CollectionUtils.isNotEmpty(projectIdList)) {
|
||||
// 找出list中projectId与projectIdList中相同的数据
|
||||
list = list.stream().filter(info -> projectIdList.contains(info.getProjectId())).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
}
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="status != null">status = #{status},</if>
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="idCard != null">bzz_idcard = #{idCard},</if>
|
||||
<if test="bzId != null and bzId != ''">bz_id = #{bzId},</if>
|
||||
update_time = NOW()
|
||||
</set>
|
||||
WHERE unit_id = #{id}
|
||||
|
|
@ -93,8 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="selectByName" resultType="com.bonus.material.clz.domain.BmTeam">
|
||||
select unit_id as id, unit_name as teamName, link_man as relName,
|
||||
telphone as relPhone, create_time as createTime, create_by as createUser,
|
||||
update_time as updateTime, update_by as updateUser, del_flag as delFlag,
|
||||
bz_id as bzId
|
||||
update_time as updateTime, update_by as updateUser, del_flag as delFlag
|
||||
from bm_unit
|
||||
where del_flag = 0 and status = '0'
|
||||
<if test="teamName != null and teamName != ''">
|
||||
|
|
|
|||
|
|
@ -239,10 +239,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt1.parent_id AND mt2.del_flag = '0'
|
||||
WHERE
|
||||
1=1
|
||||
<if test="teamId != null">
|
||||
<if test="teamId != null and teamId != ''">
|
||||
and bt.id = #{teamId}
|
||||
</if>
|
||||
<if test="proId != null">
|
||||
<if test="proId != null and proId != ''">
|
||||
and bp.pro_id = #{proId}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
|
|
|
|||
|
|
@ -362,17 +362,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="taskId != null "> and lai.task_id = #{taskId}</if>
|
||||
<if test="leasePerson != null and leasePerson != ''"> and lai.lease_person = #{leasePerson}</if>
|
||||
<if test="phone != null and phone != ''"> and lai.phone = #{phone}</if>
|
||||
<if test="type != null and type != ''"> and lai.type = #{type}</if>
|
||||
<if test="companyAuditBy != null "> and lai.company_audit_by = #{companyAuditBy}</if>
|
||||
<if test="companyAuditTime != null "> and lai.company_audit_time = #{companyAuditTime}</if>
|
||||
<if test="companyAuditRemark != null and companyAuditRemark != ''"> and lai.company_audit_remark = #{companyAuditRemark}</if>
|
||||
<if test="deptAuditBy != null "> and lai.dept_audit_by = #{deptAuditBy}</if>
|
||||
<if test="deptAuditTime != null "> and lai.dept_audit_time = #{deptAuditTime}</if>
|
||||
<if test="deptAuditRemark != null and deptAuditRemark != ''"> and lai.dept_audit_remark = #{deptAuditRemark}</if>
|
||||
<if test="directAuditBy != null "> and lai.direct_audit_by = #{directAuditBy}</if>
|
||||
<if test="directAuditTime != null "> and lai.direct_audit_time = #{directAuditTime}</if>
|
||||
<if test="directAuditRemark != null and directAuditRemark != ''"> and lai.direct_audit_remark = #{directAuditRemark}</if>
|
||||
<if test="companyId != null "> and lai.company_id = #{companyId}</if>
|
||||
<if test="statusList != null and statusList.size() > 0">
|
||||
and tt.task_status in
|
||||
<foreach item="item" collection="statusList" open="(" separator="," close=")">
|
||||
|
|
@ -382,10 +371,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
<![CDATA[ AND DATE_FORMAT( lai.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
||||
</if>
|
||||
<if test="directId != null "> and lai.direct_id = #{directId}</if>
|
||||
<if test="leaseType != null and leaseType != ''"> and lai.lease_type = #{leaseType}</if>
|
||||
<if test="estimateLeaseTime != null "> and lai.estimate_lease_time = #{estimateLeaseTime}</if>
|
||||
<if test="costBearingParty != null and costBearingParty != ''"> and lai.cost_bearing_party = #{costBearingParty}</if>
|
||||
and lai.lease_style = '1'
|
||||
<if test="idCard != null and idCard != ''">
|
||||
AND bt.bzz_idcard = #{idCard}
|
||||
|
|
@ -483,11 +469,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
OR mt2.type_name LIKE CONCAT('%', #{keyword}, '%'))
|
||||
</if>
|
||||
<if test="typeId != null "> and lad.type_id = #{typeId}</if>
|
||||
<if test="preNum != null "> and lad.pre_num = #{preNum}</if>
|
||||
<if test="auditNum != null "> and lad.audit_num = #{auditNum}</if>
|
||||
<if test="alNum != null "> and lad.al_num = #{alNum}</if>
|
||||
<if test="status != null and status != ''"> and lad.status = #{status}</if>
|
||||
<if test="companyId != null "> and lad.company_id = #{companyId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -235,10 +235,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
sai.end_time IS NULL
|
||||
AND sai.back_id IS NULL
|
||||
<if test="teamId != null">
|
||||
<if test="teamId != null and teamId != ''">
|
||||
AND bt.unit_id = #{teamId}
|
||||
</if>
|
||||
<if test="teamName != null">
|
||||
<if test="teamName != null and teamName != ''">
|
||||
AND bt.unit_name LIKE concat('%',#{teamName},'%')
|
||||
</if>
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
|
|
|
|||
|
|
@ -557,4 +557,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE del_flag = '0'
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getDepartId" resultType="java.lang.String">
|
||||
SELECT
|
||||
depart_id
|
||||
FROM `sbd_audit`.sg_project_post_personnel
|
||||
WHERE post_id = '3de0eb390f3611efa1940242ac130004'
|
||||
AND cno = #{username}
|
||||
</select>
|
||||
|
||||
<select id="getProjectId" resultType="java.lang.String">
|
||||
SELECT
|
||||
id
|
||||
FROM
|
||||
`data_center`.dx_fb_son
|
||||
WHERE project_status = '在建'
|
||||
<if test="departId != null and departId != ''">
|
||||
AND project_dept_id = #{departId}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue