bug修复
This commit is contained in:
parent
5d4bdbca1f
commit
83e350a4cb
|
|
@ -12,6 +12,7 @@ import com.bonus.sgzb.common.core.constant.TaskTypeConstants;
|
||||||
import com.bonus.sgzb.common.core.enums.TaskStatusEnum;
|
import com.bonus.sgzb.common.core.enums.TaskStatusEnum;
|
||||||
import com.bonus.sgzb.common.core.enums.TaskTypeEnum;
|
import com.bonus.sgzb.common.core.enums.TaskTypeEnum;
|
||||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||||
|
import com.bonus.sgzb.common.core.utils.StringHelper;
|
||||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -623,26 +624,29 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
|
||||||
Date nowDate = DateUtils.getNowDate();
|
Date nowDate = DateUtils.getNowDate();
|
||||||
String format = dateFormat.format(nowDate);
|
String format = dateFormat.format(nowDate);
|
||||||
// 退料报废
|
// 退料待报废
|
||||||
Integer taskNum = backReceiveMapper.selectTaskNumByMonthWx(nowDate, taskType);
|
String taskNum = tmTaskMapper.selectTaskNumByMonths(nowDate, taskType);
|
||||||
// 维修报废
|
// 维修待报废
|
||||||
Integer wxTaskNum = backReceiveMapper.selectTaskNumByMonthWx(nowDate, 21);
|
String TlTaskNum = tmTaskMapper.selectTaskNumByMonths(nowDate, 21);
|
||||||
// 比较taskNum和wxTaskNum的值,取大值
|
// 比较taskNum和TlTaskNum的大小,取大值
|
||||||
if (taskNum != null && wxTaskNum != null) {
|
if (StringHelper.isNotEmpty(taskNum) && StringHelper.isNotEmpty(TlTaskNum)) {
|
||||||
taskNum = Math.max(taskNum, wxTaskNum);
|
int tkNum = Integer.parseInt(taskNum);
|
||||||
} else if (taskNum == null && wxTaskNum != null) {
|
int TlNum = Integer.parseInt(TlTaskNum);
|
||||||
taskNum = wxTaskNum;
|
int num = Math.max(tkNum, TlNum);
|
||||||
}
|
|
||||||
String taskNumStr = "";
|
|
||||||
if (taskNum != null) {
|
|
||||||
// 将字符串转换为整数
|
|
||||||
// int num = Integer.parseInt(taskNum);
|
|
||||||
// 执行加一操作
|
|
||||||
taskNum++;
|
|
||||||
// 将结果转换回字符串格式,并确保结果是四位数,不足四位则在前面补0
|
// 将结果转换回字符串格式,并确保结果是四位数,不足四位则在前面补0
|
||||||
taskNumStr = String.format("%04d", taskNum);
|
taskNum = String.valueOf(num);
|
||||||
|
} else if (StringHelper.isEmpty(taskNum) && StringHelper.isNotEmpty(TlTaskNum)) {
|
||||||
|
taskNum = TlTaskNum;
|
||||||
|
}
|
||||||
|
if (StringHelper.isNotEmpty(taskNum)) {
|
||||||
|
// 将字符串转换为整数
|
||||||
|
int num = Integer.parseInt(taskNum);
|
||||||
|
// 执行加一操作
|
||||||
|
num++;
|
||||||
|
// 将结果转换回字符串格式,并确保结果是四位数,不足四位则在前面补0
|
||||||
|
taskNum = String.format("%04d", num);
|
||||||
} else {
|
} else {
|
||||||
taskNumStr = "0001";
|
taskNum = "0001";
|
||||||
}
|
}
|
||||||
String code = "";
|
String code = "";
|
||||||
if (TaskTypeEnum.MAINTENANCE_TASK.getCode().equals(taskType)) {
|
if (TaskTypeEnum.MAINTENANCE_TASK.getCode().equals(taskType)) {
|
||||||
|
|
@ -652,7 +656,7 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
if (TaskTypeEnum.RETURNED_MATERIALS_TO_BE_SCRAPPED.getCode().equals(taskType)) {
|
if (TaskTypeEnum.RETURNED_MATERIALS_TO_BE_SCRAPPED.getCode().equals(taskType)) {
|
||||||
code = TaskTypeConstants.YBF;
|
code = TaskTypeConstants.YBF;
|
||||||
}
|
}
|
||||||
code = code + format + "-" + taskNumStr;
|
code = code + format + "-" + taskNum;
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,6 @@ public class BmProjectLotController extends BaseController {
|
||||||
@ApiOperation(value = "导出标段工程项目")
|
@ApiOperation(value = "导出标段工程项目")
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, BmProjectLot bmProjectLot) {
|
public void export(HttpServletResponse response, BmProjectLot bmProjectLot) {
|
||||||
startPage();
|
|
||||||
List<BmProjectLot> list = bmProjectLotService.getProjectLotAll(bmProjectLot);
|
List<BmProjectLot> list = bmProjectLotService.getProjectLotAll(bmProjectLot);
|
||||||
ExcelUtil<BmProjectLot> util = new ExcelUtil<BmProjectLot>(BmProjectLot.class);
|
ExcelUtil<BmProjectLot> util = new ExcelUtil<BmProjectLot>(BmProjectLot.class);
|
||||||
util.exportExcel(response, list, "标段工程");
|
util.exportExcel(response, list, "标段工程");
|
||||||
|
|
|
||||||
|
|
@ -674,7 +674,12 @@
|
||||||
WHERE
|
WHERE
|
||||||
tt.task_status IN ( 38, 39, 40 )
|
tt.task_status IN ( 38, 39, 40 )
|
||||||
<if test="keyWord != null and keyWord != ''">
|
<if test="keyWord != null and keyWord != ''">
|
||||||
and bai.code like concat('%', #{keyWord}, '%')
|
and (
|
||||||
|
bai.code like concat('%', #{keyWord}, '%') or
|
||||||
|
bai.back_person like concat('%', #{keyWord}, '%') or
|
||||||
|
bpl.lot_name like concat('%', #{keyWord}, '%') or
|
||||||
|
bui.unit_name like concat('%', #{keyWord}, '%')
|
||||||
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="unitId != null and unitId != ''">
|
<if test="unitId != null and unitId != ''">
|
||||||
and bui.unit_id = #{unitId}
|
and bui.unit_id = #{unitId}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue