Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
111ac4ab8f
|
|
@ -47,6 +47,12 @@ public class LargeScreenController extends BaseController {
|
||||||
return service.getTotalOwnership();
|
return service.getTotalOwnership();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Log(title = "各公司机具保有量",businessType = BusinessType.QUERY)
|
||||||
|
@PostMapping("getTotalOwnershipByCompany")
|
||||||
|
public AjaxResult getTotalOwnershipByCompany() {
|
||||||
|
return service.getTotalOwnershipByCompany();
|
||||||
|
}
|
||||||
|
|
||||||
@Log(title = "当月报废分析", businessType = BusinessType.QUERY)
|
@Log(title = "当月报废分析", businessType = BusinessType.QUERY)
|
||||||
@PostMapping("getScrapAnalysisByMonth")
|
@PostMapping("getScrapAnalysisByMonth")
|
||||||
public AjaxResult getScrapAnalysisByMonth(ParamsDto dto) {
|
public AjaxResult getScrapAnalysisByMonth(ParamsDto dto) {
|
||||||
|
|
|
||||||
|
|
@ -21,4 +21,9 @@ public class ParamsDto {
|
||||||
|
|
||||||
/** 类型*/
|
/** 类型*/
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司id
|
||||||
|
*/
|
||||||
|
private String companyId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,4 +27,14 @@ public class TotalOwnershipVo {
|
||||||
/** 报废机具/工器具*/
|
/** 报废机具/工器具*/
|
||||||
private int scrapNum;
|
private int scrapNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司名称
|
||||||
|
*/
|
||||||
|
private String companyName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司id
|
||||||
|
*/
|
||||||
|
private String companyId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -101,4 +101,11 @@ public interface LargeScreenMapper {
|
||||||
* @date 2023/12/21 9:53
|
* @date 2023/12/21 9:53
|
||||||
*/
|
*/
|
||||||
List<MaintenanceWarningVo> getMaintenanceWarning(ParamsDto dto);
|
List<MaintenanceWarningVo> getMaintenanceWarning(ParamsDto dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取公司
|
||||||
|
* @param
|
||||||
|
* @return List<TotalOwnershipVo>
|
||||||
|
*/
|
||||||
|
List<TotalOwnershipVo> getCompany();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -96,4 +96,11 @@ public interface ILargeScreenService {
|
||||||
* @date 2023/12/21 9:42
|
* @date 2023/12/21 9:42
|
||||||
*/
|
*/
|
||||||
AjaxResult getMaintenanceWarning();
|
AjaxResult getMaintenanceWarning();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 各公司机具保有量
|
||||||
|
* @param
|
||||||
|
* @return AjaxResult
|
||||||
|
*/
|
||||||
|
AjaxResult getTotalOwnershipByCompany();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,15 +74,33 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult getTotalOwnershipByCompany() {
|
||||||
|
List<TotalOwnershipVo> list = new ArrayList<>();
|
||||||
|
try {
|
||||||
|
//查询所有公司
|
||||||
|
list=mapper.getCompany();
|
||||||
|
if (list.size()>0){
|
||||||
|
for (TotalOwnershipVo vo:list){
|
||||||
|
TotalOwnershipVo vos= countNum(null,null,vo.getCompanyId(), "2");
|
||||||
|
vo.setTotalOwnershipNum(vos.getTotalOwnershipNum());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("各公司机具保有量", e);
|
||||||
|
}
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult getTotalOwnership() {
|
public AjaxResult getTotalOwnership() {
|
||||||
List<TotalOwnershipVo> list = new ArrayList<>();
|
List<TotalOwnershipVo> list = new ArrayList<>();
|
||||||
ParamsDto dto = new ParamsDto();
|
ParamsDto dto = new ParamsDto();
|
||||||
try {
|
try {
|
||||||
// 施工机具
|
// 施工机具
|
||||||
TotalOwnershipVo vo = countNum("1", CommonConstants.JJ);
|
TotalOwnershipVo vo = countNum("1", CommonConstants.JJ,"","1");
|
||||||
// 安全工器具
|
// 安全工器具
|
||||||
TotalOwnershipVo vo2 = countNum("2", CommonConstants.TS);
|
TotalOwnershipVo vo2 = countNum("2", CommonConstants.TS,"","1");
|
||||||
list.add(vo);
|
list.add(vo);
|
||||||
list.add(vo2);
|
list.add(vo2);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
@ -103,11 +121,16 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
|
||||||
* @author cwchen
|
* @author cwchen
|
||||||
* @date 2023/12/15 19:33
|
* @date 2023/12/15 19:33
|
||||||
*/
|
*/
|
||||||
public TotalOwnershipVo countNum(String maType, String maTypeName) {
|
public TotalOwnershipVo countNum(String maType, String maTypeName,String companyId,String type) {
|
||||||
TotalOwnershipVo vo = new TotalOwnershipVo();
|
TotalOwnershipVo vo = new TotalOwnershipVo();
|
||||||
ParamsDto dto = new ParamsDto();
|
ParamsDto dto = new ParamsDto();
|
||||||
dto.setMaType(maType);
|
dto.setMaType(maType);
|
||||||
dto.setMaTypeName(maTypeName);
|
dto.setMaTypeName(maTypeName);
|
||||||
|
if ("2".equals(type)){
|
||||||
|
dto.setCompanyId(companyId);
|
||||||
|
}else {
|
||||||
|
dto.setCompanyId("");
|
||||||
|
}
|
||||||
// 在库数量
|
// 在库数量
|
||||||
dto.setType("1");
|
dto.setType("1");
|
||||||
List<ScrapAnalysisVo> zkValueList = mapper.getTotalOwnership(dto);
|
List<ScrapAnalysisVo> zkValueList = mapper.getTotalOwnership(dto);
|
||||||
|
|
@ -331,6 +354,7 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
|
||||||
}
|
}
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -169,6 +169,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="maType!=null and maType == 2">
|
<if test="maType!=null and maType == 2">
|
||||||
AND sd.dept_name = #{maTypeName}
|
AND sd.dept_name = #{maTypeName}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="companyId!=null and companyId !=''">
|
||||||
|
AND sd.dept_id = #{companyId}
|
||||||
|
</if>
|
||||||
</if>
|
</if>
|
||||||
/*待入库 新购/修试*/
|
/*待入库 新购/修试*/
|
||||||
<if test="type == 2">
|
<if test="type == 2">
|
||||||
|
|
@ -185,6 +188,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="maType!=null and maType == 2">
|
<if test="maType!=null and maType == 2">
|
||||||
AND sd.dept_name = #{maTypeName}
|
AND sd.dept_name = #{maTypeName}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="companyId!=null and companyId !=''">
|
||||||
|
AND sd.dept_id = #{companyId}
|
||||||
|
</if>
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT rid.repair_num AS num,
|
SELECT rid.repair_num AS num,
|
||||||
rid.input_num AS num2,
|
rid.input_num AS num2,
|
||||||
|
|
@ -199,6 +205,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="maType!=null and maType == 2">
|
<if test="maType!=null and maType == 2">
|
||||||
AND sd.dept_name = #{maTypeName}
|
AND sd.dept_name = #{maTypeName}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="companyId!=null and companyId !=''">
|
||||||
|
AND sd.dept_id = #{companyId}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</if>
|
</if>
|
||||||
/*在用*/
|
/*在用*/
|
||||||
|
|
@ -216,6 +225,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="maType!=null and maType == 2">
|
<if test="maType!=null and maType == 2">
|
||||||
AND sd.dept_name = #{maTypeName}
|
AND sd.dept_name = #{maTypeName}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="companyId!=null and companyId !=''">
|
||||||
|
AND sd.dept_id = #{companyId}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT bad.audit_num AS num,
|
SELECT bad.audit_num AS num,
|
||||||
|
|
@ -231,6 +243,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="maType!=null and maType == 2">
|
<if test="maType!=null and maType == 2">
|
||||||
AND sd.dept_name = #{maTypeName}
|
AND sd.dept_name = #{maTypeName}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="companyId!=null and companyId !=''">
|
||||||
|
AND sd.dept_id = #{companyId}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</if>
|
</if>
|
||||||
/*在修*/
|
/*在修*/
|
||||||
|
|
@ -249,6 +264,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="maType!=null and maType == 2">
|
<if test="maType!=null and maType == 2">
|
||||||
AND sd.dept_name = #{maTypeName}
|
AND sd.dept_name = #{maTypeName}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="companyId!=null and companyId !=''">
|
||||||
|
AND sd.dept_id = #{companyId}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</if>
|
</if>
|
||||||
/*报废*/
|
/*报废*/
|
||||||
|
|
@ -265,6 +283,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="maType!=null and maType == 2">
|
<if test="maType!=null and maType == 2">
|
||||||
AND sd.dept_name = #{maTypeName}
|
AND sd.dept_name = #{maTypeName}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="companyId!=null and companyId !=''">
|
||||||
|
AND sd.dept_id = #{companyId}
|
||||||
|
</if>
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<!--检修预警-->
|
<!--检修预警-->
|
||||||
|
|
@ -282,4 +303,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
)a ON mm.type_id = a.type_id
|
)a ON mm.type_id = a.type_id
|
||||||
WHERE mm.next_check_time BETWEEN #{startDate} AND #{endDate}
|
WHERE mm.next_check_time BETWEEN #{startDate} AND #{endDate}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getCompany" resultType="com.bonus.sgzb.largeScreen.domain.TotalOwnershipVo">
|
||||||
|
SELECT
|
||||||
|
sd2.dept_id as companyId,
|
||||||
|
sd2.dept_name as companyName
|
||||||
|
FROM
|
||||||
|
sys_dept sd
|
||||||
|
LEFT JOIN sys_dept sd2 on sd2.parent_id=sd.dept_id
|
||||||
|
WHERE
|
||||||
|
sd.del_flag='0'
|
||||||
|
and sd2.del_flag='0'
|
||||||
|
and sd.parent_id='0'
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -13,8 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
IFNULL(subquery2.repairNum, 0) as repairNum,
|
IFNULL(subquery2.repairNum, 0) as repairNum,
|
||||||
IFNULL(subquery3.repairInputNum, 0) as repairInputNum,
|
IFNULL(subquery3.repairInputNum, 0) as repairInputNum,
|
||||||
IFNULL(subquery4.inputNum, 0) as inputNum,
|
IFNULL(subquery4.inputNum, 0) as inputNum,
|
||||||
IFNULL(subquery1.usNum, 0) + IFNULL(subquery2.repairNum, 0) + IFNULL(subquery3.repairInputNum, 0) +
|
IFNULL(mt.num, 0) + IFNULL(subquery1.usNum, 0) + IFNULL(subquery2.repairNum, 0) + IFNULL(subquery3.repairInputNum, 0) as allNum,
|
||||||
IFNULL(subquery4.inputNum, 0) as allNum,
|
|
||||||
CASE mt.manage_type
|
CASE mt.manage_type
|
||||||
WHEN 0 THEN
|
WHEN 0 THEN
|
||||||
'否'
|
'否'
|
||||||
|
|
|
||||||
|
|
@ -176,9 +176,9 @@
|
||||||
<el-button size="mini" plain icon="el-icon-zoom-in" @click="handleSee(scope.row, 'see')">
|
<el-button size="mini" plain icon="el-icon-zoom-in" @click="handleSee(scope.row, 'see')">
|
||||||
查看
|
查看
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="mini" type="warning" @click="handleReturn(scope.row, 'see')">
|
<!-- <el-button size="mini" type="warning" @click="handleReturn(scope.row, 'see')">
|
||||||
退料
|
退料
|
||||||
</el-button>
|
</el-button> -->
|
||||||
<el-button size="mini" type="primary" @click="handlePrint(scope.row)">
|
<el-button size="mini" type="primary" @click="handlePrint(scope.row)">
|
||||||
退料单
|
退料单
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
v-show="scope.row.checkNum<scope.row.purchaseNum"
|
v-show="scope.row.checkNum<scope.row.purchaseNum&&(scope.row.status==0||scope.row.status==1)"
|
||||||
@click="handleCheck(scope.row)"
|
@click="handleCheck(scope.row)"
|
||||||
>验收</el-button>
|
>验收</el-button>
|
||||||
<!-- <el-button
|
<!-- <el-button
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue