Browse Source

需求回归

master
zth 5 months ago
parent
commit
3be05bc0f4
  1. 24
      jwtech-admin-page/src/views/building/peasantWorkerSystem/options/clockingIn.vue
  2. 2
      jwtech-admin-page/src/views/building/peasantWorkerSystem/options/index.vue
  3. 16
      jwtech-admin-page/src/views/building/peasantWorkerSystem/options/payroll.vue
  4. 11
      jwtech-admin-page/src/views/building/peasantWorkerSystem/options/realNameSystem.vue
  5. 8
      jwtech-pc-page/config/index.js
  6. 2
      jwtech-pc-page/static/config.js
  7. 4
      jwtech-pc/src/main/resources/application-dev.yml
  8. 12
      jwtech-pc/src/main/resources/application-druid-test.yml
  9. 6
      jwtech-pc/src/main/resources/application-test.yml
  10. 21
      jwtech-system/src/main/java/com/kms/build/controller/BsSgcJsjdBuiAttendanceInformationController.java
  11. 9
      jwtech-system/src/main/java/com/kms/build/controller/BsSgcJsjdBuiRealNameController.java
  12. 16
      jwtech-system/src/main/java/com/kms/build/controller/BsSgcJsjdBuiSalaryPayableController.java
  13. 2
      jwtech-system/src/main/java/com/kms/build/domain/BsSgcJsjdBuiAttendanceInformation.java
  14. 4
      jwtech-system/src/main/java/com/kms/build/domain/BsSgcJsjdBuiRealNameExcel.java
  15. 4
      jwtech-system/src/main/java/com/kms/build/domain/BsSgcJsjdBuiSalaryPayableExcel.java
  16. 2
      jwtech-system/src/main/java/com/kms/build/domain/vo/BsSgcJsjdBuiAttendanceInformationExcel.java

24
jwtech-admin-page/src/views/building/peasantWorkerSystem/options/clockingIn.vue

@ -459,7 +459,7 @@ export default {
{ required: true, message: "请输入考勤年月天数", trigger: "blur" },
{
// pattern: /(^[1-9][0-9]{0,8}$)|((^(0){1}$))/,
pattern: /(^[0-9]$)|(^[1-2][0-9]$)|(^30$)/,
pattern: /^\d*\.?\d?$/,
message: "请输入0-30正整数,包含0",
trigger: "blur",
},
@ -549,6 +549,7 @@ export default {
cellDates: true,
});
}
var i1=0
outdata = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]); //outdataexcel西
this.da = [...outdata];
let arr = [];
@ -558,7 +559,7 @@ export default {
let obj = {};
obj.attendanceDay = v["考勤天数"]; //ip
let attendanceYear = v["考勤所属年月 格式:xx年xx月"];
let attendanceYear = v["考勤所属年月 格式:xxxx年xx月"];
// let yearMonth = attendanceYear.split("");
// let year = parseInt(yearMonth[0]);
// let month = parseInt(yearMonth[1].replace("", ""));
@ -569,11 +570,14 @@ export default {
try {
match= attendanceYear.match(regex);
}catch (error){
_this.$message({
type: "warning",
message:
"错误日期格式"
});
if (i1<1) {
_this.$message({
type: "warning",
message:
"错误日期格式"
});
i1++
}
}
if (match) {
@ -585,19 +589,21 @@ export default {
attendanceYear= '';
}
attendanceYear = new Date(attendanceYear)
attendanceYear = new Date(attendanceYear)
attendanceYear.setSeconds(attendanceYear.getSeconds() + 44);
obj.attendanceYear = _this.parseTime(attendanceYear, "{y}-{m}"); //ip
console.log(obj.attendanceYear)
// obj.attendanceYear = v[""]; //ip
// obj.attendanceYear = v[""]?.setMonth(
// v[""]?.getMonth() + 1
// ); //ip
obj.idNo = v["身份证"]; //ip
obj.name = v["姓名"]; //ip
if (obj.idNo && obj.name &&match) {
if (obj.idNo && obj.name && match) {
successNo += 1;
arr.push(obj);
}

2
jwtech-admin-page/src/views/building/peasantWorkerSystem/options/index.vue

@ -216,7 +216,7 @@ export default {
handleClick(tab, event) {
// console.log("", tab, event);
// console.log("", this.routeList[1].routeName);
this.routeList[1].routeName = tab.label;
},
goBack() {
this.$router.back();

16
jwtech-admin-page/src/views/building/peasantWorkerSystem/options/payroll.vue

@ -793,6 +793,7 @@ export default {
var bytes = new Uint8Array(reader.result);
// console.log(reader.result);
var length = bytes.byteLength;
var i1=0
for (var i = 0; i < length; i++) {
binary += String.fromCharCode(bytes[i]);
}
@ -819,7 +820,7 @@ export default {
let obj = {};
let salaryTime = v["工资年月格式:xx年xx月"];
let salaryTime = v["工资年月格式:xxxx年xx月"];
// let yearMonth = salaryTime.split("");
// let year = parseInt(yearMonth[0]);
// let month = parseInt(yearMonth[1].replace("", ""));
@ -829,11 +830,14 @@ export default {
try {
match= salaryTime.match(regex);
}catch (error){
_this.$message({
type: "warning",
message:
"错误日期格式"
});
if (i1<1) {
_this.$message({
type: "warning",
message:
"错误日期格式"
});
i1++
}
}
if (match) {

11
jwtech-admin-page/src/views/building/peasantWorkerSystem/options/realNameSystem.vue

@ -897,6 +897,7 @@ export default {
});
},
methods: {
// excel
handleRemove(file, fileList) {
// console.log(11111111);
@ -978,21 +979,21 @@ export default {
obj.politicalAffiliation = v["政治面貌"]; //ip
obj.belowUnit = v["所属单位"]; //ip
let admissionTime = new Date(v["进场日期"]);
let admissionTime = new Date(v["进场日期:日期格式 xxxx/xx/xx"]);
if (admissionTime) {
if (isNaN(admissionTime.getSeconds())) {
admissionTime = v["进场日期"];
admissionTime = v["进场日期:日期格式 xxxx/xx/xx"];
} else {
// 44
admissionTime.setSeconds(admissionTime.getSeconds() + 44);
}
}
obj.admissionTime = _this.parseTime(admissionTime, "{y}-{m}-{d}"); //ip
let exitTime = new Date(v["退场日期"]);
let exitTime = new Date(v["退场日期:日期格式 xxxx/xx/xx"]);
if (v["退场日期"]){
if (v["退场日期:日期格式 xxxx/xx/xx"]){
if (isNaN(exitTime.getSeconds())){
exitTime=v["退场日期"];
exitTime=v["退场日期:日期格式 xxxx/xx/xx"];
}else
(
exitTime.setSeconds(exitTime.getSeconds() + 44)

8
jwtech-pc-page/config/index.js

@ -31,13 +31,13 @@ module.exports = {
// }
// },
proxyTable: {
'/kms-pc-web': {
'/jgThinking/thinking': {
// target: 'http://127.0.0.1:18080/kms-pc-web',
target: 'http://localhost:18080/kms-pc-web',
target: 'http://127.0.0.1:8096',
// target: 'http://192.168.2.100:18082/tianhui-admin-web',
changeOrigin: true,
pathRewrite: {
'^/kms-pc-web': '/'
'^/jgThinking/thinking': '/kms-pc-web'
}
}
},
@ -45,7 +45,7 @@ module.exports = {
// 使用 localhost:18080 或者 本机地址:18080 访问系统页面
host: 'localhost', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
port: 8082, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true,
errorOverlay: true,
notifyOnErrors: true,

2
jwtech-pc-page/static/config.js

@ -10,7 +10,7 @@ window.g = {
// url: "http://106.2.224.58:1036/kms-pc-web/api",
// url: "http://106.2.224.58:1039/kms-pc-web",
// url: "http://192.168.2.100:18082/tianhui-admin-web",
url: "http://localhost:18080/kms-pc-web",
url: "http://19.25.74.73:8002/jgThinking/thinking/",
// url: "http://127.0.0.1:18082/kms-pc-web",
// url: "http://192.168.1.113:8083/kms-pc-web",

4
jwtech-pc/src/main/resources/application-dev.yml

@ -129,12 +129,14 @@ spring:
# redis 配置
redis:
# 地址
host: 192.168.1.20
host: 172.17.0.4
# cluster:
# nodes: 192.168.1.20:7001,192.168.1.20:7002,192.168.1.20:7003,192.168.1.20:7004,192.168.1.20:7005,192.168.1.20:7006
# max-redirects: 3
# 端口,默认为6379
port: 6379
database: 13
# 密码
password:
# 连接超时时间

12
jwtech-pc/src/main/resources/application-druid-test.yml

@ -7,12 +7,12 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:mysql://172.17.0.2:23306/ruoyi_mybatisplus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
username: root
password: mySql*ztFjs2023
# url: jdbc:mysql://47.93.254.187:3306/shui_pro?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&allowMultiQueries=true
# username: shuili
# password: wuxukgdvJ1!@!
# url: jdbc:mysql://172.17.0.2:23306/ruoyi_mybatisplus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
# username: root
# password: mySql*ztFjs2023
url: jdbc:mysql://47.93.254.187:3306/shui_pro?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&allowMultiQueries=true
username: shuili
password: wuxukgdvJ1!@!
# 从库数据源
slave:
# 从数据源开关/默认关闭

6
jwtech-pc/src/main/resources/application-test.yml

@ -131,16 +131,16 @@ spring:
# redis 配置
redis:
# 地址
host: 172.17.0.4
host: 127.0.0.1
# host: 192.168.2.189
# cluster:
# nodes: 192.168.1.20:7001,192.168.1.20:7002,192.168.1.20:7003,192.168.1.20:7004,192.168.1.20:7005,192.168.1.20:7006
# max-redirects: 3
# 端口,默认为6379
database: 13
# database: 13
port: 6379
# 密码
password: xB239MCfg3321Pq002
# password: xB239MCfg3321Pq002
# 连接超时时间
timeout: 10s
lettuce:

21
jwtech-system/src/main/java/com/kms/build/controller/BsSgcJsjdBuiAttendanceInformationController.java

@ -160,14 +160,16 @@ public class BsSgcJsjdBuiAttendanceInformationController extends BaseController
BsSgcJsjdBuiAttendanceInformation bsSgcJsjdBuiAttendanceInformation = new BsSgcJsjdBuiAttendanceInformation();
BeanUtils.copyProperties(bsSgcJsjdBuiAttendanceInformationExcel, bsSgcJsjdBuiAttendanceInformation);
if (StringUtils.isNotEmpty(bsSgcJsjdBuiAttendanceInformationExcel.getAttendanceYear())) {
// String[] yearMonth = bsSgcJsjdBuiAttendanceInformationExcel.getAttendanceYear().split("年");
// int year = Integer.parseInt(yearMonth[0]);
// int month = Integer.parseInt(yearMonth[1].replace("月", ""));
LocalDate baseDate = LocalDate.of(1900, 1, 1);
LocalDate date = baseDate.plusDays(Integer.parseInt(bsSgcJsjdBuiAttendanceInformationExcel.getAttendanceYear()) - 2);
Date attYear = Date.from(date.atStartOfDay(ZoneId.systemDefault()).toInstant());
// Excel 中的日期基准是1900年1月1日,但是Excel有一个bug会将1900年当成闰年
// 因此实际处理时需要针对这个bug进行修正
String formattedDateString = bsSgcJsjdBuiAttendanceInformationExcel.getAttendanceYear().replace("年", "-").replace("月", "-01");
// 解析日期
LocalDate parsedDate = LocalDate.parse(formattedDateString, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
// 解析日期
//
Date attYear = Date.from(parsedDate.atStartOfDay(ZoneId.systemDefault()).toInstant());
bsSgcJsjdBuiAttendanceInformation.setAttendanceYear(attYear);
}
BsSgcJsjdBuiRealName one = bsSgcJsjdBuiRealNameService.getOne(Wrappers.lambdaQuery(BsSgcJsjdBuiRealName.class)
@ -175,7 +177,6 @@ public class BsSgcJsjdBuiAttendanceInformationController extends BaseController
// .eq(BsSgcJsjdBuiRealName::getName, bsSgcJsjdBuiAttendanceInformationExcel.getWorkerName())
.eq(BsSgcJsjdBuiRealName::getProNo, proNo), false);
if (ObjectUtil.isEmpty(one)) {
stringList.add(new ExcelException(bsSgcJsjdBuiAttendanceInformationExcel.getWorkerName(), "农民工花名册不存在身份证信息" + bsSgcJsjdBuiAttendanceInformationExcel.getIdNo()));
} else {
bsSgcJsjdBuiAttendanceInformation.setName(one.getName());
@ -198,7 +199,7 @@ public class BsSgcJsjdBuiAttendanceInformationController extends BaseController
if (CollectionUtil.isNotEmpty(stringList)){
return util1.exportExcel(stringList,"错误信息");
}else {
return AjaxResult.success();
return AjaxResult.success();
}
}

9
jwtech-system/src/main/java/com/kms/build/controller/BsSgcJsjdBuiRealNameController.java

@ -65,10 +65,17 @@ public class BsSgcJsjdBuiRealNameController extends BaseController
@ApiOperation("农民工人员实名制信息列表")
public IPage list(@RequestBody SearchParam<BsSgcJsjdBuiRealName> sp)
{
return bsSgcJsjdBuiRealNameService.selectPage(sp);
}
@PostMapping("/all")
public IPage getAllRelName(@RequestBody SearchParam<BsSgcJsjdBuiRealName> sp)
{
sp.setPageNum(1);
sp.setPageSize(9999);
return bsSgcJsjdBuiRealNameService.selectPage(sp);
}
/**
* 导出农民工人员实名制信息列表
*/

16
jwtech-system/src/main/java/com/kms/build/controller/BsSgcJsjdBuiSalaryPayableController.java

@ -141,9 +141,9 @@ public class BsSgcJsjdBuiSalaryPayableController extends BaseController
return util.exportExcel(new ArrayList<>(),"农民工人工资支付表信息导入模板");
}
@Log(title = "农民工人员考勤信息导入", businessType = BusinessType.EXPORT)
@Log(title = "农民工人工资支付表信息导入", businessType = BusinessType.EXPORT)
@PostMapping("/importData")
@ApiOperation("农民工人员考勤信息导入")
@ApiOperation("农民工人工资支付表信息导入")
@Transactional
public AjaxResult importData(@RequestParam(value = "file") MultipartFile file,
@RequestParam(value = "proCode") String proCode,
@ -165,10 +165,14 @@ public class BsSgcJsjdBuiSalaryPayableController extends BaseController
// Date salaryTime = new Date(year - 1900, month - 1, 1);
bsSgcJsjdBuiSalaryPayable.setProNo(proNo);
if (StringUtils.isNotEmpty(bs.getSalaryTime())) {
LocalDate baseDate = LocalDate.of(1900, 1, 1);
LocalDate date = baseDate.plusDays(Integer.parseInt(bs.getSalaryTime()) - 2);
Date attYear = Date.from(date.atStartOfDay(ZoneId.systemDefault()).toInstant());
bs.setSalaryTime(String.valueOf(attYear));
String formattedDateString = bs.getSalaryTime().replace("年", "-").replace("月", "-01");
// 解析日期
LocalDate parsedDate = LocalDate.parse(formattedDateString, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
// 解析日期
//
Date attYear = Date.from(parsedDate.atStartOfDay(ZoneId.systemDefault()).toInstant());
bsSgcJsjdBuiSalaryPayable.setSalaryTime(attYear);
}
SysDictData wagePaymentMethod = sysDictDataService.getOne(Wrappers.lambdaQuery(SysDictData.class)
.eq(SysDictData::getDictType, "wage_payment_method")

2
jwtech-system/src/main/java/com/kms/build/domain/BsSgcJsjdBuiAttendanceInformation.java

@ -42,7 +42,7 @@ public class BsSgcJsjdBuiAttendanceInformation extends BaseEntity
/** 考勤所属年月 */
@JsonFormat(pattern = "yyyy-MM")
@Excel(name = "考勤所属年月", width = 30, dateFormat = "yyyy-MM")
@Excel(name = "考勤所属年月", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("考勤所属年月")
private Date attendanceYear;

4
jwtech-system/src/main/java/com/kms/build/domain/BsSgcJsjdBuiRealNameExcel.java

@ -39,11 +39,11 @@ public class BsSgcJsjdBuiRealNameExcel {
@Excel(name = "所属单位统一社会信用代码(必填)")
private String socialCreditCode;
@Excel(name="进场日期",width = 20,dateFormat = "yyyy-MM-dd")
@Excel(name="进场日期:日期格式 xxxx/xx/xx",width = 20,dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
private Date admissionTime;
@Excel(name="退场日期",width = 20,dateFormat = "yyyy-MM-dd")
@Excel(name="退场日期:日期格式 xxxx/xx/xx",width = 20,dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
private Date exitTime;
}

4
jwtech-system/src/main/java/com/kms/build/domain/BsSgcJsjdBuiSalaryPayableExcel.java

@ -34,8 +34,8 @@ public class BsSgcJsjdBuiSalaryPayableExcel {
@ApiModelProperty("工资专用账户")
private String bankAccount;
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "工资年月格式:xx年xx月", width = 30, dateFormat = "yyyy-MM")
@JsonFormat(pattern = "yyyy-MM")
@Excel(name = "工资年月格式:xxxx年xx月", width = 30, dateFormat = "yyyy-MM")
@ApiModelProperty("工资年月")
private String salaryTime;

2
jwtech-system/src/main/java/com/kms/build/domain/vo/BsSgcJsjdBuiAttendanceInformationExcel.java

@ -16,7 +16,7 @@ public class BsSgcJsjdBuiAttendanceInformationExcel {
/** 考勤所属年月 */
@JsonFormat(pattern = "yyyy-MM")
@Excel(name = "考勤所属年月 格式:xx年xx月", width = 40,cellType = Excel.ColumnType.STRING)
@Excel(name = "考勤所属年月 格式:xxxx年xx月", width = 40,cellType = Excel.ColumnType.STRING)
@ApiModelProperty("考勤所属年月")
public String attendanceYear;

Loading…
Cancel
Save