bug
This commit is contained in:
parent
4f9cb5e37e
commit
d58c1b788d
|
|
@ -172,7 +172,7 @@ public class TmTaskController extends BaseController {
|
||||||
if (StringUtils.isNull(task)) {
|
if (StringUtils.isNull(task)) {
|
||||||
return AjaxResult.error("参数错误");
|
return AjaxResult.error("参数错误");
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotNull(task.getLeaseApplyInfo().getPhone())) {
|
if (StringUtils.isNotBlank(task.getLeaseApplyInfo().getPhone())) {
|
||||||
String phone = task.getLeaseApplyInfo().getPhone();
|
String phone = task.getLeaseApplyInfo().getPhone();
|
||||||
if (!PhoneUtil.isMobile(phone)){
|
if (!PhoneUtil.isMobile(phone)){
|
||||||
logger.error("手机号格式错误 :{}", phone);
|
logger.error("手机号格式错误 :{}", phone);
|
||||||
|
|
|
||||||
|
|
@ -400,8 +400,12 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
|
||||||
List<ScrapAnalysisVo> bfValueList = mapper.getTotalOwnership(dto);
|
List<ScrapAnalysisVo> bfValueList = mapper.getTotalOwnership(dto);
|
||||||
Integer bfValue = commonUtil.setBFData(bfValueList);
|
Integer bfValue = commonUtil.setBFData(bfValueList);
|
||||||
vo.setScrapNum(bfValue);
|
vo.setScrapNum(bfValue);
|
||||||
// 总保有量
|
// 修饰待入库
|
||||||
vo.setTotalOwnershipNum(zkValue + drkValue + useValue + zxValue);
|
dto.setType("6");
|
||||||
|
List<ScrapAnalysisVo> decoratedValueList = mapper.getTotalOwnership(dto);
|
||||||
|
Integer decoratedValue = commonUtil.setDeData(decoratedValueList);
|
||||||
|
// 总保有量 = 在库+在用+在修+修试后待入库
|
||||||
|
vo.setTotalOwnershipNum(zkValue + decoratedValue + useValue + zxValue);
|
||||||
return vo;
|
return vo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -366,4 +366,28 @@ public class CommonUtil {
|
||||||
double doubleTotalValue = totalValue.doubleValue();
|
double doubleTotalValue = totalValue.doubleValue();
|
||||||
return (int) Math.round(doubleTotalValue);
|
return (int) Math.round(doubleTotalValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修饰待入库
|
||||||
|
* @param list
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Integer setDeData(List<ScrapAnalysisVo> list) {
|
||||||
|
if (CollectionUtils.isEmpty(list)){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
BigDecimal finalValue = new BigDecimal(new Double(0).toString());
|
||||||
|
BigDecimal totalValue = new BigDecimal(new Double(0).toString());
|
||||||
|
BigDecimal totalValue2 = new BigDecimal(new Double(0).toString());
|
||||||
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
ScrapAnalysisVo vo = list.get(i);
|
||||||
|
BigDecimal value = new BigDecimal(new Double(String.valueOf(vo.getNum())));
|
||||||
|
totalValue = totalValue.add(value);
|
||||||
|
BigDecimal value2 = new BigDecimal(new Double(String.valueOf(vo.getNum2())));
|
||||||
|
totalValue2 = totalValue2.add(value2);
|
||||||
|
}
|
||||||
|
finalValue = totalValue.subtract(totalValue2);
|
||||||
|
double doubleValue = finalValue.doubleValue();
|
||||||
|
return (int) Math.round(doubleValue);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -287,6 +287,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
AND sd.dept_id = #{companyId}
|
AND sd.dept_id = #{companyId}
|
||||||
</if>
|
</if>
|
||||||
</if>
|
</if>
|
||||||
|
/*修饰待入库*/
|
||||||
|
<if test="type == 6">
|
||||||
|
SELECT rid.repair_num AS num,
|
||||||
|
rid.input_num AS num2,
|
||||||
|
mt.type_name AS typeName
|
||||||
|
FROM repair_input_details rid
|
||||||
|
LEFT JOIN ma_type mt ON rid.type_id = mt.type_id AND mt.`level` = '4'
|
||||||
|
LEFT JOIN sys_dept sd ON sd.dept_id = mt.company_id
|
||||||
|
<where>
|
||||||
|
<if test="maType!=null and maType == 1">
|
||||||
|
sd.dept_name = #{maTypeName}
|
||||||
|
</if>
|
||||||
|
<if test="maType!=null and maType == 2">
|
||||||
|
AND sd.dept_name = #{maTypeName}
|
||||||
|
</if>
|
||||||
|
<if test="companyId!=null and companyId !=''">
|
||||||
|
AND sd.dept_id = #{companyId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<!--检修预警-->
|
<!--检修预警-->
|
||||||
<select id="getMaintenanceWarning" resultType="com.bonus.sgzb.largeScreen.domain.MaintenanceWarningVo">
|
<select id="getMaintenanceWarning" resultType="com.bonus.sgzb.largeScreen.domain.MaintenanceWarningVo">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue