This commit is contained in:
parent
88d1c12a64
commit
c3359b8e2e
|
|
@ -142,4 +142,14 @@ public class ProjUsingRecord {
|
|||
private BigDecimal allUsNum;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 库管员id数集
|
||||
*/
|
||||
private String keepIds;
|
||||
/**
|
||||
* 维修员id数集
|
||||
*/
|
||||
private String repairIds;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -264,4 +264,11 @@ public interface TypeMapper {
|
|||
* @return
|
||||
*/
|
||||
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);
|
||||
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();
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import lombok.EqualsAndHashCode;
|
|||
import lombok.ToString;
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* 结算信息对象 slt_agreement_info
|
||||
|
|
@ -294,4 +295,12 @@ public class SltAgreementInfo extends BaseEntity {
|
|||
|
||||
@ApiModelProperty("机具类型(1机具,2安全工器具)")
|
||||
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.experimental.Accessors;
|
||||
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
|
@ -173,6 +174,12 @@ public class SltInfoVo {
|
|||
|
||||
/** 工程是否竣工 */
|
||||
@ApiModelProperty(value = "工程是否竣工")
|
||||
@Excel(name = "工程是否竣工",readConverterExp = "0=未竣工,1=已竣工")
|
||||
@Excel(name = "竣工状态",readConverterExp = "0=未竣工,1=已竣工")
|
||||
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 ),
|
||||
2
|
||||
) 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
|
||||
bm_agreement_info bai
|
||||
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}, '%')
|
||||
)
|
||||
</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">
|
||||
and bu.unit_id = #{unitId}
|
||||
</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.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,
|
||||
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 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,
|
||||
hi.house_name,
|
||||
t.sampling_ratio,
|
||||
|
|
@ -937,7 +937,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
|
|
@ -946,7 +946,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<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 id="addMaTypeStockNum">
|
||||
|
|
@ -1317,4 +1317,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
END DESC,
|
||||
m.create_time DESC
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -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 = '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,
|
||||
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
|
||||
bm_agreement_info bai
|
||||
LEFT JOIN bm_project bp ON bp.pro_id = bai.project_id
|
||||
|
|
@ -932,6 +941,12 @@
|
|||
<if test="impUnitName != null and impUnitName != ''">
|
||||
AND sd.dept_name = #{impUnitName}
|
||||
</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
|
||||
ORDER BY saa.create_time desc
|
||||
</select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue