This commit is contained in:
parent
88d1c12a64
commit
c3359b8e2e
|
|
@ -142,4 +142,14 @@ public class ProjUsingRecord {
|
||||||
private BigDecimal allUsNum;
|
private BigDecimal allUsNum;
|
||||||
|
|
||||||
private String jijuType;
|
private String jijuType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "竣工状态")
|
||||||
|
@Excel(name = "竣工状态", readConverterExp = "0=未竣工,1=已竣工")
|
||||||
|
private String isFinish;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "竣工日期")
|
||||||
|
@Excel(name = "竣工日期", dateFormat = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date actualEndDate;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -350,4 +350,13 @@ public class Type extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
private String otherReportUrl;
|
private String otherReportUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库管员id数集
|
||||||
|
*/
|
||||||
|
private String keepIds;
|
||||||
|
/**
|
||||||
|
* 维修员id数集
|
||||||
|
*/
|
||||||
|
private String repairIds;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -264,4 +264,11 @@ public interface TypeMapper {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<MaTypeVo> getListByParentIds(@Param("list") List<Integer> parentIds, @Param("type") MaTypeVo maTypeVo);
|
List<MaTypeVo> getListByParentIds(@Param("list") List<Integer> parentIds, @Param("type") MaTypeVo maTypeVo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据patentId查询库管及维修员id集合
|
||||||
|
* @param parentId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Type selectUserIdsByPatentId(Long parentId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -546,7 +546,22 @@ public class TypeServiceImpl implements ITypeService {
|
||||||
whHouseSet.setTypeId(newTypeId);
|
whHouseSet.setTypeId(newTypeId);
|
||||||
houseSetService.insertWhHouseSet(whHouseSet);
|
houseSetService.insertWhHouseSet(whHouseSet);
|
||||||
}
|
}
|
||||||
|
// 根据patentId查询库管及维修员id集合
|
||||||
|
Type types = typeMapper.selectUserIdsByPatentId(type.getParentId());
|
||||||
|
if (types != null) {
|
||||||
|
if (CollectionUtils.isEmpty(types.getKeeperArr())) {
|
||||||
|
if (StringUtils.isNotBlank(types.getKeepIds())) {
|
||||||
|
// 将types.getKeepIds()转换为List,用逗号分割
|
||||||
|
type.setKeeperArr(Arrays.asList(types.getKeepIds().split(",")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (CollectionUtils.isEmpty(types.getRepairerArr())) {
|
||||||
|
if (StringUtils.isNotBlank(types.getRepairIds())) {
|
||||||
|
// 将types.getRepairIds()转换为List,用逗号分割
|
||||||
|
type.setRepairerArr(Arrays.asList(types.getRepairIds().split(",")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
//维护库管信息
|
//维护库管信息
|
||||||
List<String> keeperArr = type.getKeeperArr();
|
List<String> keeperArr = type.getKeeperArr();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import lombok.EqualsAndHashCode;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
import com.bonus.common.core.web.domain.BaseEntity;
|
import com.bonus.common.core.web.domain.BaseEntity;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 结算信息对象 slt_agreement_info
|
* 结算信息对象 slt_agreement_info
|
||||||
|
|
@ -294,4 +295,12 @@ public class SltAgreementInfo extends BaseEntity {
|
||||||
|
|
||||||
@ApiModelProperty("机具类型(1机具,2安全工器具)")
|
@ApiModelProperty("机具类型(1机具,2安全工器具)")
|
||||||
private int jiJuType;
|
private int jiJuType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "竣工状态")
|
||||||
|
private String proStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "竣工日期")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date actualEndDate;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
@ -173,6 +174,12 @@ public class SltInfoVo {
|
||||||
|
|
||||||
/** 工程是否竣工 */
|
/** 工程是否竣工 */
|
||||||
@ApiModelProperty(value = "工程是否竣工")
|
@ApiModelProperty(value = "工程是否竣工")
|
||||||
@Excel(name = "工程是否竣工",readConverterExp = "0=未竣工,1=已竣工")
|
@Excel(name = "竣工状态",readConverterExp = "0=未竣工,1=已竣工")
|
||||||
private Integer isFinish;
|
private Integer isFinish;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "竣工日期")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
//@Excel(name = "竣工日期")
|
||||||
|
private Date actualEndDate;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
IFNULL( mt.buy_price, 0 ) * IFNULL( SUM( CASE WHEN sai.end_time IS NULL THEN sai.num ELSE 0 END ), 0 ),
|
IFNULL( mt.buy_price, 0 ) * IFNULL( SUM( CASE WHEN sai.end_time IS NULL THEN sai.num ELSE 0 END ), 0 ),
|
||||||
2
|
2
|
||||||
) AS usPrice,
|
) AS usPrice,
|
||||||
ROUND( IFNULL( mt.buy_price, 0 ) * IFNULL( SUM( sai.num ), 0 ), 2 ) AS totalPrice
|
ROUND( IFNULL( mt.buy_price, 0 ) * IFNULL( SUM( sai.num ), 0 ), 2 ) AS totalPrice,
|
||||||
|
CASE
|
||||||
|
WHEN bp.actual_end_date is not null THEN '1'
|
||||||
|
ELSE '0'
|
||||||
|
END as isFinish,
|
||||||
|
bp.actual_end_date as actualEndDate
|
||||||
FROM
|
FROM
|
||||||
bm_agreement_info bai
|
bm_agreement_info bai
|
||||||
LEFT JOIN slt_agreement_info sai ON sai.agreement_id = bai.agreement_id
|
LEFT JOIN slt_agreement_info sai ON sai.agreement_id = bai.agreement_id
|
||||||
|
|
@ -65,7 +70,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
sd.dept_name like concat('%', #{keyWord}, '%')
|
sd.dept_name like concat('%', #{keyWord}, '%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isFinish != null and isFinish == 1">
|
||||||
|
AND bp.actual_end_date is not null
|
||||||
|
</if>
|
||||||
|
<if test="isFinish != null and isFinish == 0">
|
||||||
|
AND bp.actual_end_date is null
|
||||||
|
</if>
|
||||||
<if test="unitId != null">
|
<if test="unitId != null">
|
||||||
and bu.unit_id = #{unitId}
|
and bu.unit_id = #{unitId}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
|
|
@ -171,9 +171,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
t.rent_price,t.buy_price,t.pay_ratio,t.pay_price,t.tax_ratio,t.level,t.rated_load,t.test_load,
|
t.rent_price,t.buy_price,t.pay_ratio,t.pay_price,t.tax_ratio,t.level,t.rated_load,t.test_load,
|
||||||
t.holding_time,t.warn_num,t.create_by,t.create_time,t.update_by,t.update_time,t.is_plan,
|
t.holding_time,t.warn_num,t.create_by,t.create_time,t.update_by,t.update_time,t.is_plan,
|
||||||
t.is_ancuo,t.remark,t.fac_model,t.intelligent_code,t.is_test,t.is_enter,
|
t.is_ancuo,t.remark,t.fac_model,t.intelligent_code,t.is_test,t.is_enter,
|
||||||
GROUP_CONCAT(distinct su.user_name) as keeper_nick_name,
|
GROUP_CONCAT(distinct su.nick_name) as keeper_nick_name,
|
||||||
GROUP_CONCAT(distinct su.user_id) as keeperId,
|
GROUP_CONCAT(distinct su.user_id) as keeperId,
|
||||||
GROUP_CONCAT(distinct su2.user_name) as repair_nick_name,
|
GROUP_CONCAT(distinct su2.nick_name) as repair_nick_name,
|
||||||
GROUP_CONCAT(distinct su2.user_id) as repairerId,
|
GROUP_CONCAT(distinct su2.user_id) as repairerId,
|
||||||
hi.house_name,
|
hi.house_name,
|
||||||
t.sampling_ratio,
|
t.sampling_ratio,
|
||||||
|
|
@ -937,7 +937,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<insert id="insertTypeKeeper">
|
<insert id="insertTypeKeeper">
|
||||||
insert into ma_type_keeper(type_id, user_id) values (#{typeId},#{keeperId})
|
insert into ma_type_keeper(type_id, user_id, create_time) values (#{typeId},#{keeperId}, NOW())
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -946,7 +946,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<insert id="insertTypeRepairer">
|
<insert id="insertTypeRepairer">
|
||||||
insert into ma_type_repair(type_id, user_id) values (#{typeId},#{repairerId})
|
insert into ma_type_repair(type_id, user_id, create_time) values (#{typeId},#{repairerId}, NOW())
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<insert id="addMaTypeStockNum">
|
<insert id="addMaTypeStockNum">
|
||||||
|
|
@ -1317,4 +1317,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
END DESC,
|
END DESC,
|
||||||
m.create_time DESC
|
m.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectUserIdsByPatentId" resultType="com.bonus.material.ma.domain.Type">
|
||||||
|
SELECT
|
||||||
|
GROUP_CONCAT( DISTINCT su.user_id ) AS keepIds,
|
||||||
|
GROUP_CONCAT( DISTINCT su2.user_id ) AS repairIds
|
||||||
|
FROM
|
||||||
|
ma_type t
|
||||||
|
LEFT JOIN ma_type_keeper mtk ON t.type_id = mtk.type_id
|
||||||
|
LEFT JOIN ma_type_repair mtr ON t.type_id = mtr.type_id
|
||||||
|
LEFT JOIN sys_user su ON mtk.user_id = su.user_id
|
||||||
|
AND su.del_flag = 0
|
||||||
|
LEFT JOIN sys_user su2 ON mtr.user_id = su2.user_id
|
||||||
|
AND su2.del_flag = 0
|
||||||
|
WHERE
|
||||||
|
t.del_flag = 0 AND t.parent_id = #{parentId}
|
||||||
|
LIMIT 1
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -883,7 +883,16 @@
|
||||||
SUM(IF(sad.slt_type = '3' AND sad.is_charge = '1',sad.money,0)) AS repairCost,
|
SUM(IF(sad.slt_type = '3' AND sad.is_charge = '1',sad.money,0)) AS repairCost,
|
||||||
SUM(IF(sad.slt_type = '4' AND sad.is_charge = '1',sad.money,0)) AS scrapCost,
|
SUM(IF(sad.slt_type = '4' AND sad.is_charge = '1',sad.money,0)) AS scrapCost,
|
||||||
case when saa.status = '1' then '1' when saa.status = '2' then '2' when saa.status = '3' then '3' end as sltStatus,
|
case when saa.status = '1' then '1' when saa.status = '2' then '2' when saa.status = '3' then '3' end as sltStatus,
|
||||||
sd.dept_name AS impUnitName
|
sd.dept_name AS impUnitName,
|
||||||
|
CASE
|
||||||
|
WHEN bp.actual_end_date is not null THEN '1'
|
||||||
|
ELSE '0'
|
||||||
|
END as isFinish,
|
||||||
|
bp.actual_end_date as actualEndDate,
|
||||||
|
CASE
|
||||||
|
WHEN bp.actual_end_date is not null THEN '已竣工'
|
||||||
|
ELSE '未竣工'
|
||||||
|
END as proStatus
|
||||||
FROM
|
FROM
|
||||||
bm_agreement_info bai
|
bm_agreement_info bai
|
||||||
LEFT JOIN bm_project bp ON bp.pro_id = bai.project_id
|
LEFT JOIN bm_project bp ON bp.pro_id = bai.project_id
|
||||||
|
|
@ -932,6 +941,12 @@
|
||||||
<if test="impUnitName != null and impUnitName != ''">
|
<if test="impUnitName != null and impUnitName != ''">
|
||||||
AND sd.dept_name = #{impUnitName}
|
AND sd.dept_name = #{impUnitName}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isFinish != null and isFinish == 1">
|
||||||
|
AND bp.actual_end_date is not null
|
||||||
|
</if>
|
||||||
|
<if test="isFinish != null and isFinish == 0">
|
||||||
|
AND bp.actual_end_date is null
|
||||||
|
</if>
|
||||||
GROUP BY bai.agreement_id, saa.settlement_type
|
GROUP BY bai.agreement_id, saa.settlement_type
|
||||||
ORDER BY saa.create_time desc
|
ORDER BY saa.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue