Merge branch 'master' of http://192.168.30.2:3000/bonus/Bonus-Cloud-Material
This commit is contained in:
commit
b6ec265fed
|
|
@ -173,4 +173,10 @@ public class BmProject extends BaseEntity
|
|||
|
||||
@ApiModelProperty(value = "工程ID")
|
||||
private String projectId;
|
||||
|
||||
/**
|
||||
* 施工类型
|
||||
*/
|
||||
@ApiModelProperty(value = "施工类型")
|
||||
private String[] constructionType;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -171,4 +171,19 @@ public class RetainedEquipmentInfo {
|
|||
|
||||
@ApiModelProperty(value = "绑定用户id")
|
||||
private Long bindUserId;
|
||||
|
||||
@ApiModelProperty(value = "施工类型ids")
|
||||
private String[] constructionTypes;
|
||||
|
||||
@ApiModelProperty(value = "物资类型id")
|
||||
private String materialTypeId;
|
||||
|
||||
@ApiModelProperty(value = "设备类型id")
|
||||
private String typeNameId;
|
||||
|
||||
@ApiModelProperty(value = "规格型号id")
|
||||
private String typeModelNameId;
|
||||
|
||||
@ApiModelProperty("机具类型(1机具,2安全工器具)")
|
||||
private String jiJuType;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -286,4 +286,26 @@ public class SelectController {
|
|||
return AjaxResult.error("获取工程信息异常");
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "施工类型下拉")
|
||||
@PostMapping("getLintTypeList")
|
||||
public AjaxResult getLintTypeList(@RequestBody BmProject bmProject) {
|
||||
try {
|
||||
return service.getLintTypeList(bmProject);
|
||||
} catch (Exception e) {
|
||||
log.error("获取施工类型信息异常", e);
|
||||
return AjaxResult.error("获取施工类型信息异常");
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "物资类型下拉")
|
||||
@PostMapping("getMaterialTypeList")
|
||||
public AjaxResult getMaterialTypeList(@RequestBody BmProject bmProject) {
|
||||
try {
|
||||
return service.getMaterialTypeList(bmProject);
|
||||
} catch (Exception e) {
|
||||
log.error("获取物资类型信息异常", e);
|
||||
return AjaxResult.error("获取物资类型信息异常");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import com.bonus.material.clz.domain.vo.MaterialRetainedEquipmentInfo;
|
|||
import com.bonus.material.common.domain.dto.SelectDto;
|
||||
import com.bonus.material.common.domain.vo.AgreementVo;
|
||||
import com.bonus.material.common.domain.vo.SelectVo;
|
||||
import com.bonus.material.ma.domain.Type;
|
||||
import com.bonus.material.materialStation.domain.ProAuthorizeInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
|
@ -428,4 +429,18 @@ public interface SelectMapper {
|
|||
* @return
|
||||
*/
|
||||
Long selectProjectUnitAgreementIdByTeamAndProject(@Param("teamId") String id, @Param("projectId") Long projectId);
|
||||
|
||||
/**
|
||||
* 获取线路类型下拉选
|
||||
* @param bmProject
|
||||
* @return
|
||||
*/
|
||||
List<Type> getLintTypeList(BmProject bmProject);
|
||||
|
||||
/**
|
||||
* 获取类型下拉选
|
||||
* @param bmProject
|
||||
* @return
|
||||
*/
|
||||
List<Type> getMaterialTypeList(BmProject bmProject);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -273,4 +273,18 @@ public interface SelectService {
|
|||
* @return
|
||||
*/
|
||||
AjaxResult getDeviceTypeTreeThree(SelectDto dto);
|
||||
|
||||
/**
|
||||
* 线路类型列表
|
||||
* @param bmProject
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getLintTypeList(BmProject bmProject);
|
||||
|
||||
/**
|
||||
* 获取物资类型
|
||||
* @param bmProject
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getMaterialTypeList(BmProject bmProject);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import com.bonus.material.common.domain.vo.AgreementVo;
|
|||
import com.bonus.material.common.domain.vo.SelectVo;
|
||||
import com.bonus.material.common.mapper.SelectMapper;
|
||||
import com.bonus.material.common.service.SelectService;
|
||||
import com.bonus.material.ma.domain.Type;
|
||||
import com.bonus.material.materialStation.domain.ProAuthorizeInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
|
|
@ -573,6 +574,28 @@ public class SelectServiceImpl implements SelectService {
|
|||
return AjaxResult.success(groupList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getLintTypeList(BmProject bmProject) {
|
||||
try {
|
||||
List<Type> list = mapper.getLintTypeList(bmProject);
|
||||
return AjaxResult.success(list);
|
||||
} catch (Exception e) {
|
||||
log.error("线路类型下拉", e);
|
||||
return AjaxResult.success(new ArrayList<>());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getMaterialTypeList(BmProject bmProject) {
|
||||
try {
|
||||
List<Type> list = mapper.getMaterialTypeList(bmProject);
|
||||
return AjaxResult.success(list);
|
||||
} catch (Exception e) {
|
||||
log.error("物资类型下拉", e);
|
||||
return AjaxResult.success(new ArrayList<>());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getDeviceTypeTree(SelectDto dto) {
|
||||
List<TreeNode> groupList = new ArrayList<>();
|
||||
|
|
|
|||
|
|
@ -297,7 +297,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
|
||||
<select id="getRetainedEquipmentList" resultType="com.bonus.material.basic.domain.RetainedEquipmentInfo">
|
||||
SELECT
|
||||
SELECT distinct
|
||||
mt.type_id AS typeId,
|
||||
mt4.type_name AS constructionType,
|
||||
mt4.type_id AS firstTypeId,
|
||||
|
|
@ -307,6 +307,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
mt2.type_id AS thirdTypeId,
|
||||
mt.type_name AS typeModelName,
|
||||
mt.unit_name AS unit,
|
||||
CASE mt.jiju_type
|
||||
WHEN 2 THEN
|
||||
'安全工器具'
|
||||
ELSE
|
||||
'施工机具'
|
||||
END jiJuType,
|
||||
IFNULL(mt.buy_price, 0) AS buyPrice,
|
||||
CASE mt.manage_type
|
||||
WHEN 0 THEN
|
||||
|
|
@ -507,9 +513,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN ma_type_manage mtm ON mt4.type_id = mtm.type_id
|
||||
WHERE mt.del_flag = '0'
|
||||
and mt.is_show = '1'
|
||||
<if test="userId != null">
|
||||
and mtm.user_id = #{userId}
|
||||
</if>
|
||||
<!-- <if test="userId != null">-->
|
||||
<!-- and mtm.user_id = #{userId}-->
|
||||
<!-- </if>-->
|
||||
|
||||
<if test="typeId != null">
|
||||
<if test="level == 3">
|
||||
|
|
@ -534,6 +540,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="typeModelName != null and typeModelName != ''">
|
||||
and mt.type_name like concat('%',#{typeModelName},'%')
|
||||
</if>
|
||||
<if test="constructionTypes != null and constructionTypes.length > 0">
|
||||
and mt4.type_id in
|
||||
<foreach item="item" index="index" collection="constructionTypes" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="materialTypeId != null and materialTypeId != ''">
|
||||
and mt3.type_id = #{materialTypeId}
|
||||
</if>
|
||||
<if test="typeNameId != null and typeNameId != ''">
|
||||
and mt2.type_id = #{typeNameId}
|
||||
</if>
|
||||
<if test="typeModelNameId != null and typeModelNameId != ''">
|
||||
and mt.type_id = #{typeModelNameId}
|
||||
</if>
|
||||
<if test="jiJuType != null and jiJuType != ''">
|
||||
AND mt.jiju_type = #{jiJuType}
|
||||
</if>
|
||||
HAVING allNum > 0
|
||||
</select>
|
||||
<select id="getStatisticsList" resultType="com.bonus.material.basic.domain.ProjUsingRecord">
|
||||
|
|
|
|||
|
|
@ -1303,4 +1303,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
bai.unit_id = #{teamId} AND bai.project_id = #{projectId}
|
||||
LIMIT 1
|
||||
</select>
|
||||
<select id="getLintTypeList" resultType="com.bonus.material.ma.domain.Type">
|
||||
SELECT
|
||||
type_id as typeId,
|
||||
type_name as typeName
|
||||
FROM
|
||||
ma_type
|
||||
WHERE
|
||||
del_flag='0'
|
||||
and parent_id='0'
|
||||
</select>
|
||||
<select id="getMaterialTypeList" resultType="com.bonus.material.ma.domain.Type">
|
||||
SELECT
|
||||
type_id as typeId,
|
||||
type_name as typeName
|
||||
FROM
|
||||
ma_type
|
||||
WHERE
|
||||
del_flag='0'
|
||||
and `level`='2'
|
||||
<if test="constructionType != null and constructionType.length > 0">
|
||||
and parent_id in
|
||||
<foreach item="item" index="index" collection="constructionType" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue