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.TaskTypeEnum;
|
||||
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 org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -623,26 +624,29 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
|||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
|
||||
Date nowDate = DateUtils.getNowDate();
|
||||
String format = dateFormat.format(nowDate);
|
||||
// 退料报废
|
||||
Integer taskNum = backReceiveMapper.selectTaskNumByMonthWx(nowDate, taskType);
|
||||
// 维修报废
|
||||
Integer wxTaskNum = backReceiveMapper.selectTaskNumByMonthWx(nowDate, 21);
|
||||
// 比较taskNum和wxTaskNum的值,取大值
|
||||
if (taskNum != null && wxTaskNum != null) {
|
||||
taskNum = Math.max(taskNum, wxTaskNum);
|
||||
} else if (taskNum == null && wxTaskNum != null) {
|
||||
taskNum = wxTaskNum;
|
||||
}
|
||||
String taskNumStr = "";
|
||||
if (taskNum != null) {
|
||||
// 将字符串转换为整数
|
||||
// int num = Integer.parseInt(taskNum);
|
||||
// 执行加一操作
|
||||
taskNum++;
|
||||
// 退料待报废
|
||||
String taskNum = tmTaskMapper.selectTaskNumByMonths(nowDate, taskType);
|
||||
// 维修待报废
|
||||
String TlTaskNum = tmTaskMapper.selectTaskNumByMonths(nowDate, 21);
|
||||
// 比较taskNum和TlTaskNum的大小,取大值
|
||||
if (StringHelper.isNotEmpty(taskNum) && StringHelper.isNotEmpty(TlTaskNum)) {
|
||||
int tkNum = Integer.parseInt(taskNum);
|
||||
int TlNum = Integer.parseInt(TlTaskNum);
|
||||
int num = Math.max(tkNum, TlNum);
|
||||
// 将结果转换回字符串格式,并确保结果是四位数,不足四位则在前面补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 {
|
||||
taskNumStr = "0001";
|
||||
taskNum = "0001";
|
||||
}
|
||||
String code = "";
|
||||
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)) {
|
||||
code = TaskTypeConstants.YBF;
|
||||
}
|
||||
code = code + format + "-" + taskNumStr;
|
||||
code = code + format + "-" + taskNum;
|
||||
return code;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@ public class BmProjectLotController extends BaseController {
|
|||
@ApiOperation(value = "导出标段工程项目")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BmProjectLot bmProjectLot) {
|
||||
startPage();
|
||||
List<BmProjectLot> list = bmProjectLotService.getProjectLotAll(bmProjectLot);
|
||||
ExcelUtil<BmProjectLot> util = new ExcelUtil<BmProjectLot>(BmProjectLot.class);
|
||||
util.exportExcel(response, list, "标段工程");
|
||||
|
|
|
|||
|
|
@ -674,7 +674,12 @@
|
|||
WHERE
|
||||
tt.task_status IN ( 38, 39, 40 )
|
||||
<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 test="unitId != null and unitId != ''">
|
||||
and bui.unit_id = #{unitId}
|
||||
|
|
|
|||
Loading…
Reference in New Issue