工程成本
This commit is contained in:
parent
1feb8ab8bc
commit
abd1b40a09
|
|
@ -0,0 +1,23 @@
|
|||
package com.securitycontrol.entity.background.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author:cwchen
|
||||
* @date:2024-04-01-19:09
|
||||
* @version:1.0
|
||||
* @description:标段工程成本
|
||||
*/
|
||||
@Data
|
||||
public class ProjectCostVo {
|
||||
|
||||
@ApiModelProperty("成本")
|
||||
private String amount;
|
||||
|
||||
@ApiModelProperty("支出项")
|
||||
private String expenditure;
|
||||
|
||||
@ApiModelProperty("支出日期")
|
||||
private String expenditureDate;
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ package com.securitycontrol.background.mapper;
|
|||
|
||||
import com.securitycontrol.entity.background.dto.ParamDto;
|
||||
import com.securitycontrol.entity.background.vo.HumanManageVo;
|
||||
import com.securitycontrol.entity.background.vo.ProjectCostVo;
|
||||
import com.securitycontrol.entity.background.vo.VehicleVo;
|
||||
import com.securitycontrol.entity.system.base.vo.ProVo;
|
||||
import com.securitycontrol.entity.system.vo.ResourceFileVo;
|
||||
|
|
@ -116,6 +117,7 @@ public interface IAppMapper {
|
|||
|
||||
/**
|
||||
* 获取工序或杆塔名称
|
||||
*
|
||||
* @param proType
|
||||
* @param bidCode
|
||||
* @param gxId
|
||||
|
|
@ -125,4 +127,14 @@ public interface IAppMapper {
|
|||
* @date 2024/3/29 14:20
|
||||
*/
|
||||
String getGtOrGxName(@Param("proType") String proType, @Param("bidCode") String bidCode, @Param("gxId") String gxId);
|
||||
|
||||
/**
|
||||
* 标段工程成本
|
||||
* @param dto
|
||||
* @return List<ProjectCostVo>
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/1 19:12
|
||||
*/
|
||||
List<ProjectCostVo> getProCost(ParamDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import com.securitycontrol.common.core.utils.aes.DateTimeHelper;
|
|||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.entity.background.dto.ParamDto;
|
||||
import com.securitycontrol.entity.background.vo.HumanManageVo;
|
||||
import com.securitycontrol.entity.background.vo.ProjectCostVo;
|
||||
import com.securitycontrol.entity.background.vo.VehicleVo;
|
||||
import com.securitycontrol.entity.system.base.vo.ProVo;
|
||||
import com.securitycontrol.entity.system.vo.ResourceFileVo;
|
||||
|
|
@ -203,6 +204,7 @@ public class AppServiceImpl implements IAppService {
|
|||
ProVo vo = new ProVo();
|
||||
JSONObject item = new JSONObject();
|
||||
List<Map<String, Object>> proGxPlanList = new ArrayList<>();
|
||||
List<ProjectCostVo> proCostList = new ArrayList<>();
|
||||
try {
|
||||
// 工程详情
|
||||
vo = mapper.getProBrief(dto);
|
||||
|
|
@ -220,40 +222,15 @@ public class AppServiceImpl implements IAppService {
|
|||
mapData.put("name",name);
|
||||
});
|
||||
}
|
||||
// 标段工程成本
|
||||
proCostList = mapper.getProCost(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("工程管理", e);
|
||||
}
|
||||
dataMap.put("vo",vo);
|
||||
dataMap.put("item",item);
|
||||
dataMap.put("proGxPlan",proGxPlanList);
|
||||
dataMap.put("proCost",getProCostData());
|
||||
dataMap.put("proCost",proCostList);
|
||||
return AjaxResult.success(dataMap);
|
||||
}
|
||||
|
||||
public Map<String, Object> getProCostData(){
|
||||
Map<String, Object> dataMap = new HashMap<>(16);
|
||||
dataMap.put("planCost","1200.0");
|
||||
dataMap.put("expenditureCost","523.4");
|
||||
dataMap.put("residueCost","676.6");
|
||||
List<Map<String, Object>> proCostList = new ArrayList<>();
|
||||
for (int i = 0; i < Constant.CELL_3; i++) {
|
||||
Map<String, Object> map = new HashMap<>(3);
|
||||
if(i == 0){
|
||||
map.put("expenditureDate","2024-03-05");
|
||||
map.put("expenditure","设备购买");
|
||||
map.put("amount","200.1");
|
||||
}else if(i == 1){
|
||||
map.put("expenditureDate","2024-03-12");
|
||||
map.put("expenditure","工人工资");
|
||||
map.put("amount","23.3");
|
||||
}else if(i == 2){
|
||||
map.put("expenditureDate","2024-03-15");
|
||||
map.put("expenditure","设备安装");
|
||||
map.put("amount","300.0");
|
||||
}
|
||||
proCostList.add(map);
|
||||
}
|
||||
dataMap.put("proCostPlanList",proCostList);
|
||||
return dataMap;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,4 +117,11 @@
|
|||
WHERE sd.dict_code = '400' AND sd2.dict_code = #{gxId} AND sd.del_flag = 0
|
||||
</if>
|
||||
</select>
|
||||
<!--标段工程成本-->
|
||||
<select id="getProCost" resultType="com.securitycontrol.entity.background.vo.ProjectCostVo">
|
||||
SELECT cost AS amount,
|
||||
remark AS expenditure,
|
||||
curry_day AS expenditureDate
|
||||
FROM tb_project_cost tpc WHERE tpc.bid_code = #{bidCode}
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue