bug修改

This commit is contained in:
方亮 2025-10-14 11:06:10 +08:00
parent 704bd94130
commit 6b595cd4ae
9 changed files with 24 additions and 37 deletions

View File

@ -42,11 +42,9 @@ public class CommonUtils {
public static String getRequestBodyKey(HttpServletRequest req) {
Map<String, String> headerMap = getHeaderMap(req);
StringBuilder key = new StringBuilder();
key.append(headerMap.get(Constant.DEVICE_HEADER_DEV_ID)).append("_")
.append(headerMap.get(Constant.DEVICE_HEADER_TRANS_ID)).append("_")
.append(headerMap.get(Constant.DEVICE_HEADER_REQUEST_CODE)).append("_")
.append(headerMap.get(Constant.DEVICE_HEADER_CONTENT_LENGTH));
return key.toString();
return headerMap.get(Constant.DEVICE_HEADER_DEV_ID) + "_" +
headerMap.get(Constant.DEVICE_HEADER_TRANS_ID) + "_" +
headerMap.get(Constant.DEVICE_HEADER_REQUEST_CODE) + "_" +
headerMap.get(Constant.DEVICE_HEADER_CONTENT_LENGTH);
}
}

View File

@ -172,8 +172,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
*/
public static Date toDate(LocalDate localDate) {
LocalDateTime localDateTime = localDate.atTime(0, 0, 0);
ZonedDateTime zdt = localDateTime.atZone(ZoneId.systemDefault());
return Date.from(zdt.toInstant());
return toDate(localDateTime);
}
/**
@ -461,9 +460,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
* @return 指定日期后几天的日期
*/
public static Date getDateAfter(Date date, int days) {
LocalDateTime localDateTime = toLocalDateTime(date);
localDateTime = localDateTime.plusDays(days);
return toDate(localDateTime);
return addDays(date, days);
}
/**

View File

@ -204,15 +204,14 @@ public class FileUtils {
public static void setAttachmentResponseHeader(HttpServletResponse response, String realFileName) throws UnsupportedEncodingException {
String percentEncodedFileName = percentEncode(realFileName);
StringBuilder contentDispositionValue = new StringBuilder();
contentDispositionValue.append("attachment; filename=")
.append(percentEncodedFileName)
.append(";")
.append("filename*=")
.append("utf-8''")
.append(percentEncodedFileName);
String contentDispositionValue = "attachment; filename=" +
percentEncodedFileName +
";" +
"filename*=" +
"utf-8''" +
percentEncodedFileName;
response.setHeader("Content-disposition", contentDispositionValue.toString());
response.setHeader("Content-disposition", contentDispositionValue);
response.setHeader("download-filename", percentEncodedFileName);
}

View File

@ -91,8 +91,7 @@ import java.util.List;
* @return
*/
public static JSONObject jsonStrToJsonObj(String str) {
Object o = JSON.parseObject(str);
return (JSONObject) o;
return JSON.parseObject(str);
}
/**

View File

@ -1148,7 +1148,7 @@ public class ExcelUtil<T>
try
{
Object instance = excel.handler().newInstance();
Method formatMethod = excel.handler().getMethod("format", new Class[] { Object.class, String[].class, Cell.class, Workbook.class });
Method formatMethod = excel.handler().getMethod("format", Object.class, String[].class, Cell.class, Workbook.class);
value = formatMethod.invoke(instance, value, excel.args(), cell, this.wb);
}
catch (Exception e)
@ -1502,7 +1502,7 @@ public class ExcelUtil<T>
Object value;
try
{
value = subMethod.invoke(obj, new Object[] {});
value = subMethod.invoke(obj);
}
catch (Exception e)
{
@ -1526,7 +1526,7 @@ public class ExcelUtil<T>
Method method = null;
try
{
method = pojoClass.getMethod(getMethodName.toString(), new Class[] {});
method = pojoClass.getMethod(getMethodName.toString());
}
catch (Exception e)
{
@ -1591,7 +1591,6 @@ public class ExcelUtil<T>
for (int columnIndex = 0; columnIndex <= sheet.getRow(0).getLastCellNum(); columnIndex++) {
Cell cell = sheet.getRow(0).getCell(columnIndex);
if (cell == null) {
continue;
}
else if (fieldName.equals(cell.getStringCellValue())){
return columnIndex;

View File

@ -166,7 +166,7 @@ public final class UUID implements java.io.Serializable, Comparable<UUID>
}
for (int i = 0; i < componentsLength; i++)
{
components[i] = new StringBuilder("0x").append(components[i]).toString();
components[i] = "0x" + components[i];
}
long mostSigBits = Long.decode(components[0]).longValue();

View File

@ -129,11 +129,6 @@ public class RepairCardApplyServiceImpl implements RepairCardApplyService {
@Override
public AjaxResult saverepairCardApply(RepairCardApplyDto cardApplyDto, FileBasicMsgDto fileBasicMsgDto) {
cardApplyDto.setApplyUser(SecurityUtils.getLoginUser().getUsername());
// //查询工程月份是否封档
// boolean isClose =repairCardApplyMapper.getSalaryStatus(cardApplyDto);
// if (isClose) {
// return AjaxResult.error("工程"+cardApplyDto.getRepairMonth()+"已封档,无法再 补卡");
// }
Integer num = repairCardApplyMapper.saverepairCardApply(cardApplyDto);
if (num > 0) {
repairCardApplyMapper.saverepairCardDetails(cardApplyDto.getId(), cardApplyDto.getRepairCardRecords());
@ -257,7 +252,7 @@ public class RepairCardApplyServiceImpl implements RepairCardApplyService {
List<RepairCardApplyDto> list = repairCardApplyMapper.getRepairCardApplyByProMonth(cardApplyDto);
for (RepairCardApplyDto repairCardApplyDto : list) {
repairCardApplyDto.setCheckStatus(2);
repairCardApplyDto.setRepairRemark(cardApplyDto.getRepairMonth() +"数据已封档,包含此月份的补卡自动退回");
repairCardApplyDto.setRefuseRemark(cardApplyDto.getRepairMonth() +"数据已封档,包含此月份的补卡自动退回");
audit(repairCardApplyDto);
}
return 1;

View File

@ -338,11 +338,11 @@
brca.id
FROM
bm_repair_card_apply brca
LEFT JOIN bm_repair_card_date brcd ON brca.id = brcd.apply_id
inner JOIN bm_repair_card_record brcd ON brca.id = brcd.apply_id
WHERE
brca.is_active = 1
AND brca.check_status = 0
AND DATE_FORMAT(brcd.current_day, '%Y-%m') = #{repairMonth}
AND brcd.repair_date REGEXP concat('(^|,)', #{repairMonth}, '-(0[1-9]|[12][0-9]|30)(,|$)')
AND brca.pro_id = #{proId}
</select>

View File

@ -179,7 +179,7 @@ public class SysLogServiceImpl implements ISysLogService {
public R<String> setLogsSet(String capacity) {
try{
if(StringUtils.isNotEmpty(capacity)){
if(SystemGlobal.ERR_NUM.equals(capacity.toUpperCase())){
if(SystemGlobal.ERR_NUM.equalsIgnoreCase(capacity)){
return R.fail("请输入数字");
}
}else{