作者 雷海东

月工时信息、工资导入判断工时

正在显示 35 个修改的文件 包含 603 行增加57 行删除
@@ -17,14 +17,22 @@ import javax.sql.DataSource; @@ -17,14 +17,22 @@ import javax.sql.DataSource;
17 @Configuration 17 @Configuration
18 @EnableTransactionManagement 18 @EnableTransactionManagement
19 public class AppConfig { 19 public class AppConfig {
  20 + @Value("${spring.datasource.dynamic.datasource.master.url}")
  21 + private String url;
  22 + @Value("${spring.datasource.dynamic.datasource.master.username}")
  23 + private String username;
  24 + @Value("${spring.datasource.dynamic.datasource.master.password}")
  25 + private String password;
  26 + @Value("${spring.datasource.dynamic.datasource.master.driver-class-name}")
  27 + private String className;
20 @Bean 28 @Bean
21 public DataSource dataSource() { 29 public DataSource dataSource() {
22 // 配置数据源 30 // 配置数据源
23 DriverManagerDataSource dataSource = new DriverManagerDataSource(); 31 DriverManagerDataSource dataSource = new DriverManagerDataSource();
24 - dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");  
25 - dataSource.setUrl("jdbc:mysql://rm-2zeiuncjm75qti641ho.mysql.rds.aliyuncs.com:3306/jeecg-boot");  
26 - dataSource.setUsername("ntsd_root");  
27 - dataSource.setPassword("L3bHRJwg6lJ2SC4WFfGA"); 32 + dataSource.setDriverClassName(className);
  33 + dataSource.setUrl(url);
  34 + dataSource.setUsername(username);
  35 + dataSource.setPassword(password);
28 return dataSource; 36 return dataSource;
29 } 37 }
30 @Bean 38 @Bean
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 import com.baomidou.mybatisplus.extension.service.IService; 6 import com.baomidou.mybatisplus.extension.service.IService;
7 import lombok.extern.slf4j.Slf4j; 7 import lombok.extern.slf4j.Slf4j;
8 import org.apache.commons.beanutils.PropertyUtils; 8 import org.apache.commons.beanutils.PropertyUtils;
  9 +import org.apache.poi.hpsf.Decimal;
9 import org.apache.poi.ss.formula.functions.T; 10 import org.apache.poi.ss.formula.functions.T;
10 import org.apache.shiro.SecurityUtils; 11 import org.apache.shiro.SecurityUtils;
11 import org.jeecg.common.api.vo.Result; 12 import org.jeecg.common.api.vo.Result;
@@ -34,6 +35,8 @@ import javax.servlet.http.HttpServletRequest; @@ -34,6 +35,8 @@ import javax.servlet.http.HttpServletRequest;
34 import javax.servlet.http.HttpServletResponse; 35 import javax.servlet.http.HttpServletResponse;
35 import java.io.IOException; 36 import java.io.IOException;
36 import java.lang.reflect.Field; 37 import java.lang.reflect.Field;
  38 +import java.math.BigDecimal;
  39 +import java.text.SimpleDateFormat;
37 import java.util.*; 40 import java.util.*;
38 import java.util.stream.Collectors; 41 import java.util.stream.Collectors;
39 42
@@ -45,7 +48,7 @@ import java.util.stream.Collectors; @@ -45,7 +48,7 @@ import java.util.stream.Collectors;
45 */ 48 */
46 @Slf4j 49 @Slf4j
47 50
48 -public class JeecgController2<T, t, b, V extends IService<t>, S extends IService<T>, B extends IService<b>> { 51 +public class JeecgController2<T, t, b,w, V extends IService<t>, S extends IService<T>, B extends IService<b>,W extends IService<w>> {
49 /** 52 /**
50 * issues/2933 JeecgController注入service时改用protected修饰,能避免重复引用service 53 * issues/2933 JeecgController注入service时改用protected修饰,能避免重复引用service
51 */ 54 */
@@ -55,6 +58,8 @@ public class JeecgController2<T, t, b, V extends IService<t>, S extends IService @@ -55,6 +58,8 @@ public class JeecgController2<T, t, b, V extends IService<t>, S extends IService
55 protected V servicevo; 58 protected V servicevo;
56 @Autowired 59 @Autowired
57 protected B servicebase; 60 protected B servicebase;
  61 + @Autowired
  62 + protected W serviceTime;
58 63
59 64
60 @Value("${jeecg.path.upload}") 65 @Value("${jeecg.path.upload}")
@@ -303,7 +308,7 @@ public class JeecgController2<T, t, b, V extends IService<t>, S extends IService @@ -303,7 +308,7 @@ public class JeecgController2<T, t, b, V extends IService<t>, S extends IService
303 //工资导入 308 //工资导入
304 309
305 @Transactional 310 @Transactional
306 - public Result<?> importExcelgz(HttpServletRequest request, HttpServletResponse response, Class<T> clazz, Class<b> base) { 311 + public Result<?> importExcelgz(HttpServletRequest request, HttpServletResponse response, Class<T> clazz, Class<b> base,Class<w> workTime) {
307 MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; 312 MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
308 Map<String, MultipartFile> fileMap = multipartRequest.getFileMap(); 313 Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
309 for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) { 314 for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
@@ -352,10 +357,31 @@ public class JeecgController2<T, t, b, V extends IService<t>, S extends IService @@ -352,10 +357,31 @@ public class JeecgController2<T, t, b, V extends IService<t>, S extends IService
352 // 如果至少有一个字段值不为空,则保存数据到待保存列表 357 // 如果至少有一个字段值不为空,则保存数据到待保存列表
353 // 使用工号和姓名去基本信息表中检查是否存在对应的员工信息 358 // 使用工号和姓名去基本信息表中检查是否存在对应的员工信息
354 b employeeExists = checkEmployeeExists(data); 359 b employeeExists = checkEmployeeExists(data);
355 - 360 + boolean select=selectWorkTime(data);
356 if (employeeExists != null) { 361 if (employeeExists != null) {
357 - // 如果员工存在,则保存这条数据到数据库中  
358 - shuju.add(data); 362 + if(select){
  363 + // 如果员工存在,则保存这条数据到数据库中
  364 + shuju.add(data);
  365 + }else {
  366 + // 获取 data 对象的类
  367 + Class<?> clazz2 = data.getClass();
  368 +
  369 + // 获取 工号 字段的值
  370 + Field jobId = clazz2.getDeclaredField("jobId");
  371 + jobId.setAccessible(true); // 设置可访问性,因为字段可能是私有的
  372 + String jobid = (String) jobId.get(data);
  373 + // 获取 姓名 字段的值
  374 + Field name = clazz2.getDeclaredField("userName");
  375 + name.setAccessible(true); // 设置可访问性,因为字段可能是私有的
  376 + String userName = (String) name.get(data);
  377 +
  378 + // 如果员工不存在,则记录下当前数据的位置信息,比如行号
  379 + int rowNumber = rowIndex + 1; // 行号从1开始
  380 + // 这里可以根据需要将数据位置信息存储起来,比如记录到日志中或者构建一个错误信息列表等
  381 + // 示例:errorList.add("第 " + rowNumber + " 行的工号 " + data.get工号() + "、姓名 " + data.get姓名() + " 不存在对应的员工");
  382 + // 或者直接在此处输出错误信息
  383 + return Result.error("导入失败,第 " + rowNumber + " 行的工号 :" + jobid+ "、姓名 :" + userName + " 的标准工时数与工时信息表工时不匹配");
  384 + }
359 } else { 385 } else {
360 // 获取 data 对象的类 386 // 获取 data 对象的类
361 Class<?> clazz2 = data.getClass(); 387 Class<?> clazz2 = data.getClass();
@@ -368,6 +394,7 @@ public class JeecgController2<T, t, b, V extends IService<t>, S extends IService @@ -368,6 +394,7 @@ public class JeecgController2<T, t, b, V extends IService<t>, S extends IService
368 Field name = clazz2.getDeclaredField("userName"); 394 Field name = clazz2.getDeclaredField("userName");
369 name.setAccessible(true); // 设置可访问性,因为字段可能是私有的 395 name.setAccessible(true); // 设置可访问性,因为字段可能是私有的
370 String userName = (String) name.get(data); 396 String userName = (String) name.get(data);
  397 +
371 // 如果员工不存在,则记录下当前数据的位置信息,比如行号 398 // 如果员工不存在,则记录下当前数据的位置信息,比如行号
372 int rowNumber = rowIndex + 1; // 行号从1开始 399 int rowNumber = rowIndex + 1; // 行号从1开始
373 // 这里可以根据需要将数据位置信息存储起来,比如记录到日志中或者构建一个错误信息列表等 400 // 这里可以根据需要将数据位置信息存储起来,比如记录到日志中或者构建一个错误信息列表等
@@ -422,6 +449,47 @@ public class JeecgController2<T, t, b, V extends IService<t>, S extends IService @@ -422,6 +449,47 @@ public class JeecgController2<T, t, b, V extends IService<t>, S extends IService
422 return Result.error("文件导入失败!"); 449 return Result.error("文件导入失败!");
423 } 450 }
424 451
  452 + private boolean selectWorkTime(T data) {
  453 + try {
  454 + QueryWrapper<w> queryWrapper = new QueryWrapper<>();
  455 + // 获取 data 对象的类
  456 + Class<?> clazz2 = data.getClass();
  457 + // 获取 标准工时数 字段的值
  458 + Field hours = clazz2.getDeclaredField("workingHours");
  459 + hours.setAccessible(true); // 设置可访问性,因为字段可能是私有的
  460 + BigDecimal workingHours = (BigDecimal) hours.get(data);
  461 + // 获取 姓名 字段的值
  462 + Field name = clazz2.getDeclaredField("userName");
  463 + name.setAccessible(true); // 设置可访问性,因为字段可能是私有的
  464 + String userName = (String) name.get(data);
  465 + // 获取 月份 字段的值
  466 + Field month = clazz2.getDeclaredField("salaryMonth");
  467 + month.setAccessible(true); // 设置可访问性,因为字段可能是私有的
  468 + Date salaryMonth = (Date) month.get(data);
  469 + SimpleDateFormat outputFormat = new SimpleDateFormat("yyyy-MM");
  470 + String outputDateString = outputFormat.format(salaryMonth);
  471 +
  472 + queryWrapper.eq("name",userName+"(普工)");
  473 + List<w> list = serviceTime.list(queryWrapper);
  474 + if(list.size()==0) {
  475 + return true;
  476 + }else {
  477 + queryWrapper.eq("work_time",workingHours);
  478 + queryWrapper.eq("name",userName+"(普工)");
  479 + queryWrapper.apply("DATE_FORMAT(salary_month, '%Y-%m') = '" + outputDateString + "'");
  480 + System.out.println("输出:"+serviceTime.getOne(queryWrapper));
  481 + w one2 = serviceTime.getOne(queryWrapper);
  482 + if(one2!=null){
  483 + return true;
  484 + }
  485 + }
  486 + return false;
  487 + } catch (Exception e) {
  488 + e.printStackTrace();
  489 + return false;
  490 + }
  491 + }
  492 +
425 private b checkEmployeeExists(T data) { 493 private b checkEmployeeExists(T data) {
426 try { 494 try {
427 QueryWrapper<b> queryWrapper = new QueryWrapper<>(); 495 QueryWrapper<b> queryWrapper = new QueryWrapper<>();
@@ -21,5 +21,4 @@ public interface TblDepotMapper extends BaseMapper<TblDepot> { @@ -21,5 +21,4 @@ public interface TblDepotMapper extends BaseMapper<TblDepot> {
21 List<Map<String,Object>> selectPartNumberAndCreateTime(); 21 List<Map<String,Object>> selectPartNumberAndCreateTime();
22 22
23 int updateDepot(@Param("partNumber") String partNumber,@Param("createTime") String createTime); 23 int updateDepot(@Param("partNumber") String partNumber,@Param("createTime") String createTime);
24 -  
25 } 24 }
@@ -4,6 +4,8 @@ import io.swagger.models.auth.In; @@ -4,6 +4,8 @@ import io.swagger.models.auth.In;
4 import org.jeecg.modules.erp.depot.entity.TblDepot; 4 import org.jeecg.modules.erp.depot.entity.TblDepot;
5 import com.baomidou.mybatisplus.extension.service.IService; 5 import com.baomidou.mybatisplus.extension.service.IService;
6 6
  7 +import java.util.List;
  8 +
7 /** 9 /**
8 * @Description: tbl_depot 10 * @Description: tbl_depot
9 * @Author: jeecg-boot 11 * @Author: jeecg-boot
@@ -8,6 +8,8 @@ import org.springframework.stereotype.Service; @@ -8,6 +8,8 @@ import org.springframework.stereotype.Service;
8 8
9 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 9 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
10 10
  11 +import java.util.List;
  12 +
11 /** 13 /**
12 * @Description: tbl_depot 14 * @Description: tbl_depot
13 * @Author: jeecg-boot 15 * @Author: jeecg-boot
@@ -3,6 +3,8 @@ package org.jeecg.modules.erp.depot_stock.mapper; @@ -3,6 +3,8 @@ package org.jeecg.modules.erp.depot_stock.mapper;
3 import com.baomidou.mybatisplus.core.mapper.BaseMapper; 3 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 import org.jeecg.modules.erp.depot_stock.entity.ViewDepotStock; 4 import org.jeecg.modules.erp.depot_stock.entity.ViewDepotStock;
5 5
  6 +import java.util.List;
  7 +
6 /** 8 /**
7 * @Description: view_depot_stock 9 * @Description: view_depot_stock
8 * @Author: jeecg-boot 10 * @Author: jeecg-boot
@@ -17,4 +19,6 @@ public interface ViewDepotStockMapper extends BaseMapper<ViewDepotStock> { @@ -17,4 +19,6 @@ public interface ViewDepotStockMapper extends BaseMapper<ViewDepotStock> {
17 * @param productName 19 * @param productName
18 */ 20 */
19 ViewDepotStock pageProductName (String productName); 21 ViewDepotStock pageProductName (String productName);
  22 +
  23 + List<ViewDepotStock> pageTblOrderFormDate(Integer day);
20 } 24 }
@@ -13,4 +13,24 @@ @@ -13,4 +13,24 @@
13 WHERE 13 WHERE
14 product_name = #{productName} 14 product_name = #{productName}
15 </select> 15 </select>
  16 + <select id="pageTblOrderFormDate" resultType="org.jeecg.modules.erp.depot_stock.entity.ViewDepotStock">
  17 + SELECT
  18 + d.id,
  19 + o.order_id,
  20 + o.order_date,
  21 + d.part_number,
  22 + d.product_name,
  23 + d.oper_number
  24 + FROM
  25 + tbl_order_form as o,tbl_bidding_shenq as s,view_depot_stock as d
  26 + WHERE
  27 + DATEDIFF(
  28 + o.order_date,
  29 + NOW()) <![CDATA[ < ]]> #{day}
  30 + AND DATEDIFF(
  31 + o.order_date,
  32 + NOW())>= 0
  33 + AND o.verify_status = 0
  34 + AND o.order_id=s.order_id AND s.part_number=d.part_number
  35 + </select>
16 </mapper> 36 </mapper>
@@ -3,6 +3,8 @@ package org.jeecg.modules.erp.depot_stock.service; @@ -3,6 +3,8 @@ package org.jeecg.modules.erp.depot_stock.service;
3 import org.jeecg.modules.erp.depot_stock.entity.ViewDepotStock; 3 import org.jeecg.modules.erp.depot_stock.entity.ViewDepotStock;
4 import com.baomidou.mybatisplus.extension.service.IService; 4 import com.baomidou.mybatisplus.extension.service.IService;
5 5
  6 +import java.util.List;
  7 +
6 /** 8 /**
7 * @Description: view_depot_stock 9 * @Description: view_depot_stock
8 * @Author: jeecg-boot 10 * @Author: jeecg-boot
@@ -18,4 +20,5 @@ public interface IViewDepotStockService extends IService<ViewDepotStock> { @@ -18,4 +20,5 @@ public interface IViewDepotStockService extends IService<ViewDepotStock> {
18 */ 20 */
19 ViewDepotStock pageProductName (String productName); 21 ViewDepotStock pageProductName (String productName);
20 22
  23 + List<ViewDepotStock> pageTblOrderFormDate(Integer day);
21 } 24 }
@@ -7,6 +7,8 @@ import org.jeecg.modules.erp.depot_stock.service.IViewDepotStockService; @@ -7,6 +7,8 @@ import org.jeecg.modules.erp.depot_stock.service.IViewDepotStockService;
7 import org.springframework.beans.factory.annotation.Autowired; 7 import org.springframework.beans.factory.annotation.Autowired;
8 import org.springframework.stereotype.Service; 8 import org.springframework.stereotype.Service;
9 9
  10 +import java.util.List;
  11 +
10 /** 12 /**
11 * @Description: view_depot_stock 13 * @Description: view_depot_stock
12 * @Author: jeecg-boot 14 * @Author: jeecg-boot
@@ -23,4 +25,9 @@ public class ViewDepotStockServiceImpl extends ServiceImpl<ViewDepotStockMapper, @@ -23,4 +25,9 @@ public class ViewDepotStockServiceImpl extends ServiceImpl<ViewDepotStockMapper,
23 public ViewDepotStock pageProductName(String productName) { 25 public ViewDepotStock pageProductName(String productName) {
24 return viewDepotStockMapper.pageProductName(productName); 26 return viewDepotStockMapper.pageProductName(productName);
25 } 27 }
  28 +
  29 + @Override
  30 + public List<ViewDepotStock> pageTblOrderFormDate(Integer day) {
  31 + return viewDepotStockMapper.pageTblOrderFormDate(day);
  32 + }
26 } 33 }
@@ -5,6 +5,8 @@ import lombok.extern.slf4j.Slf4j; @@ -5,6 +5,8 @@ import lombok.extern.slf4j.Slf4j;
5 import org.jeecg.common.api.vo.Result; 5 import org.jeecg.common.api.vo.Result;
6 import org.jeecg.modules.erp.baseLibrary.entity.TblFinishProduct; 6 import org.jeecg.modules.erp.baseLibrary.entity.TblFinishProduct;
7 import org.jeecg.modules.erp.baseLibrary.service.ITblFinishProductService; 7 import org.jeecg.modules.erp.baseLibrary.service.ITblFinishProductService;
  8 +import org.jeecg.modules.erp.depot.entity.TblDepot;
  9 +import org.jeecg.modules.erp.depot.service.ITblDepotService;
8 import org.jeecg.modules.erp.depot_stock.entity.ViewDepotStock; 10 import org.jeecg.modules.erp.depot_stock.entity.ViewDepotStock;
9 import org.jeecg.modules.erp.depot_stock.service.IViewDepotStockService; 11 import org.jeecg.modules.erp.depot_stock.service.IViewDepotStockService;
10 import org.jeecg.modules.erp.meterial_statistics.entity.MeterialQueryParam; 12 import org.jeecg.modules.erp.meterial_statistics.entity.MeterialQueryParam;
@@ -15,6 +17,8 @@ import org.jeecg.modules.erp.order_form.entity.TblOrderForm; @@ -15,6 +17,8 @@ import org.jeecg.modules.erp.order_form.entity.TblOrderForm;
15 import org.jeecg.modules.erp.order_form.entity.TblWorkOrder; 17 import org.jeecg.modules.erp.order_form.entity.TblWorkOrder;
16 import org.jeecg.modules.erp.order_form.service.ITblOrderFormService; 18 import org.jeecg.modules.erp.order_form.service.ITblOrderFormService;
17 import org.jeecg.modules.erp.order_form.service.ITblWorkOrderService; 19 import org.jeecg.modules.erp.order_form.service.ITblWorkOrderService;
  20 +import org.jeecg.modules.erp.production.entity.TblProductionGongxu;
  21 +import org.jeecg.modules.erp.production.service.ITblProductionGongxuService;
18 import org.springframework.beans.factory.annotation.Autowired; 22 import org.springframework.beans.factory.annotation.Autowired;
19 import org.springframework.web.bind.annotation.GetMapping; 23 import org.springframework.web.bind.annotation.GetMapping;
20 import org.springframework.web.bind.annotation.RequestMapping; 24 import org.springframework.web.bind.annotation.RequestMapping;
@@ -45,36 +49,52 @@ public class MeterialStatisticsController { @@ -45,36 +49,52 @@ public class MeterialStatisticsController {
45 @Autowired 49 @Autowired
46 private MeterialStatisticsService statisticsService; 50 private MeterialStatisticsService statisticsService;
47 51
  52 + @Autowired
  53 + private IViewDepotStockService depotService;
  54 +
48 private List<MeterialStatistics> meterialStatistics = new ArrayList<>(); 55 private List<MeterialStatistics> meterialStatistics = new ArrayList<>();
49 56
50 private Map<String,Integer> mapNum; 57 private Map<String,Integer> mapNum;
51 58
52 59
  60 +// @ApiOperation(value = "物料统计", notes = "物料统计")
  61 +// @GetMapping(value = "/list")
  62 +// public Result<List<Map<String, Object>>> queryPageList(MeterialQueryParam meterialStatistic,
  63 +// @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
  64 +// @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
  65 +// HttpServletRequest req) {
  66 +// meterialStatistics = new ArrayList<>();
  67 +// mapNum = new HashMap<>();
  68 +// List<Map<String, Object>> mapO = new ArrayList<>();
  69 +// List<TblOrderForm> tblOrderForms = tblOrderFormService.pageTblOrderFormDate(meterialStatistic.getDay());
  70 +// if(tblOrderForms.size() > 0){
  71 +// for (TblOrderForm tblOrderForm: tblOrderForms) {
  72 +// List<TblWorkOrder> tblWorkOrders = workOrderService.selectByMainId(tblOrderForm.getId());
  73 +// if(tblWorkOrders==null) {
  74 +// return Result.error("未找到对应数据");
  75 +// }
  76 +// getOrder(tblWorkOrders,tblOrderForm.getOrderDate(),meterialStatistic.getProductName());
  77 +// mapO = getMapO();
  78 +// }
  79 +// }else{
  80 +// return Result.OK(mapO);
  81 +// }
  82 +//
  83 +//
  84 +// return Result.OK(mapO);
  85 +// }
  86 +
53 @ApiOperation(value = "物料统计", notes = "物料统计") 87 @ApiOperation(value = "物料统计", notes = "物料统计")
54 @GetMapping(value = "/list") 88 @GetMapping(value = "/list")
55 - public Result<List<Map<String, Object>>> queryPageList(MeterialQueryParam meterialStatistic,  
56 - @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,  
57 - @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,  
58 - HttpServletRequest req) { 89 + public Result<?> queryPageList(MeterialQueryParam meterialStatistic,
  90 + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
  91 + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
  92 + HttpServletRequest req) {
59 meterialStatistics = new ArrayList<>(); 93 meterialStatistics = new ArrayList<>();
60 mapNum = new HashMap<>(); 94 mapNum = new HashMap<>();
61 List<Map<String, Object>> mapO = new ArrayList<>(); 95 List<Map<String, Object>> mapO = new ArrayList<>();
62 - List<TblOrderForm> tblOrderForms = tblOrderFormService.pageTblOrderFormDate(meterialStatistic.getDay());  
63 - if(tblOrderForms.size() > 0){  
64 - for (TblOrderForm tblOrderForm: tblOrderForms) {  
65 - List<TblWorkOrder> tblWorkOrders = workOrderService.selectByMainId(tblOrderForm.getId());  
66 - if(tblWorkOrders==null) {  
67 - return Result.error("未找到对应数据");  
68 - }  
69 - getOrder(tblWorkOrders,tblOrderForm.getOrderDate(),meterialStatistic.getProductName());  
70 - mapO = getMapO();  
71 - }  
72 - }else{  
73 - return Result.OK(mapO);  
74 - }  
75 -  
76 -  
77 - return Result.OK(mapO); 96 + List<ViewDepotStock> tblOrderForms = depotService.pageTblOrderFormDate(meterialStatistic.getDay());
  97 + return Result.OK(tblOrderForms);
78 } 98 }
79 99
80 public List<Map<String,Object>> getMapO(){ 100 public List<Map<String,Object>> getMapO(){
  1 +package org.jeecg.modules.erp.order_form.controller;
  2 +
  3 +import java.text.ParseException;
  4 +import java.text.SimpleDateFormat;
  5 +import java.time.LocalDate;
  6 +import java.util.*;
  7 +import java.util.stream.Collectors;
  8 +import java.io.IOException;
  9 +import java.io.UnsupportedEncodingException;
  10 +import java.net.URLDecoder;
  11 +import javax.servlet.http.HttpServletRequest;
  12 +import javax.servlet.http.HttpServletResponse;
  13 +import org.jeecg.common.api.vo.Result;
  14 +import org.jeecg.common.system.query.QueryGenerator;
  15 +import org.jeecg.common.util.oConvertUtils;
  16 +
  17 +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
  18 +import com.baomidou.mybatisplus.core.metadata.IPage;
  19 +import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  20 +import lombok.extern.slf4j.Slf4j;
  21 +
  22 +import org.jeecg.modules.erp.order_form.entity.TblWorkTime;
  23 +import org.jeecg.modules.erp.order_form.service.ITblWorkTimeService;
  24 +import org.jeecgframework.poi.excel.ExcelImportUtil;
  25 +import org.jeecgframework.poi.excel.def.NormalExcelConstants;
  26 +import org.jeecgframework.poi.excel.entity.ExportParams;
  27 +import org.jeecgframework.poi.excel.entity.ImportParams;
  28 +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
  29 +import org.jeecg.common.system.base.controller.JeecgController;
  30 +import org.springframework.beans.factory.annotation.Autowired;
  31 +import org.springframework.web.bind.annotation.*;
  32 +import org.springframework.web.multipart.MultipartFile;
  33 +import org.springframework.web.multipart.MultipartHttpServletRequest;
  34 +import org.springframework.web.servlet.ModelAndView;
  35 +import com.alibaba.fastjson.JSON;
  36 +import io.swagger.annotations.Api;
  37 +import io.swagger.annotations.ApiOperation;
  38 +import org.jeecg.common.aspect.annotation.AutoLog;
  39 +
  40 + /**
  41 + * @Description: tbl_work_time
  42 + * @Author: jeecg-boot
  43 + * @Date: 2024-06-13
  44 + * @Version: V1.0
  45 + */
  46 +@Api(tags="tbl_work_time")
  47 +@RestController
  48 +@RequestMapping("/work_time/tblWorkTime")
  49 +@Slf4j
  50 +public class TblWorkTimeController extends JeecgController<TblWorkTime, ITblWorkTimeService> {
  51 + @Autowired
  52 + private ITblWorkTimeService tblWorkTimeService;
  53 +
  54 + /**
  55 + * 分页列表查询
  56 + *
  57 + * @param tblWorkTime
  58 + * @param pageNo
  59 + * @param pageSize
  60 + * @param req
  61 + * @return
  62 + */
  63 + //@AutoLog(value = "tbl_work_time-分页列表查询")
  64 + @ApiOperation(value="tbl_work_time-分页列表查询", notes="tbl_work_time-分页列表查询")
  65 + @GetMapping(value = "/list")
  66 + public Result<IPage<TblWorkTime>> queryPageList(TblWorkTime tblWorkTime,
  67 + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
  68 + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
  69 + HttpServletRequest req) {
  70 + QueryWrapper<TblWorkTime> queryWrapper = new QueryWrapper<>();
  71 + queryWrapper.orderByDesc("salary_month");
  72 + if(tblWorkTime.getName()!=null && !tblWorkTime.getName().isEmpty()){
  73 + String name = tblWorkTime.getName().replace("*", "");
  74 + queryWrapper.like("name", "%" + name + "%");
  75 + }
  76 + if(tblWorkTime.getSalaryMonth()!=null){
  77 + Date salaryMonth = tblWorkTime.getSalaryMonth();
  78 + SimpleDateFormat outputFormat = new SimpleDateFormat("yyyy-MM");
  79 + String outputDateString = outputFormat.format(salaryMonth);
  80 + queryWrapper.apply("DATE_FORMAT(salary_month, '%Y-%m') = '" + outputDateString + "'");
  81 + }
  82 + Page<TblWorkTime> page = new Page<TblWorkTime>(pageNo, pageSize);
  83 + IPage<TblWorkTime> pageList = tblWorkTimeService.page(page, queryWrapper);
  84 + return Result.OK(pageList);
  85 + }
  86 +
  87 + /**
  88 + * 添加
  89 + *
  90 + * @param tblWorkTime
  91 + * @return
  92 + */
  93 + @AutoLog(value = "tbl_work_time-添加")
  94 + @ApiOperation(value="tbl_work_time-添加", notes="tbl_work_time-添加")
  95 + @PostMapping(value = "/add")
  96 + public Result<String> add(@RequestBody TblWorkTime tblWorkTime) {
  97 + tblWorkTimeService.save(tblWorkTime);
  98 + return Result.OK("添加成功!");
  99 + }
  100 +
  101 + /**
  102 + * 编辑
  103 + *
  104 + * @param tblWorkTime
  105 + * @return
  106 + */
  107 + @AutoLog(value = "tbl_work_time-编辑")
  108 + @ApiOperation(value="tbl_work_time-编辑", notes="tbl_work_time-编辑")
  109 + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
  110 + public Result<String> edit(@RequestBody TblWorkTime tblWorkTime) {
  111 + tblWorkTimeService.updateById(tblWorkTime);
  112 + return Result.OK("编辑成功!");
  113 + }
  114 +
  115 + /**
  116 + * 通过id删除
  117 + *
  118 + * @param id
  119 + * @return
  120 + */
  121 + @AutoLog(value = "tbl_work_time-通过id删除")
  122 + @ApiOperation(value="tbl_work_time-通过id删除", notes="tbl_work_time-通过id删除")
  123 + @DeleteMapping(value = "/delete")
  124 + public Result<String> delete(@RequestParam(name="id",required=true) String id) {
  125 + tblWorkTimeService.removeById(id);
  126 + return Result.OK("删除成功!");
  127 + }
  128 +
  129 + /**
  130 + * 批量删除
  131 + *
  132 + * @param ids
  133 + * @return
  134 + */
  135 + @AutoLog(value = "tbl_work_time-批量删除")
  136 + @ApiOperation(value="tbl_work_time-批量删除", notes="tbl_work_time-批量删除")
  137 + @DeleteMapping(value = "/deleteBatch")
  138 + public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
  139 + this.tblWorkTimeService.removeByIds(Arrays.asList(ids.split(",")));
  140 + return Result.OK("批量删除成功!");
  141 + }
  142 +
  143 + /**
  144 + * 通过id查询
  145 + *
  146 + * @param id
  147 + * @return
  148 + */
  149 + //@AutoLog(value = "tbl_work_time-通过id查询")
  150 + @ApiOperation(value="tbl_work_time-通过id查询", notes="tbl_work_time-通过id查询")
  151 + @GetMapping(value = "/queryById")
  152 + public Result<TblWorkTime> queryById(@RequestParam(name="id",required=true) String id) {
  153 + TblWorkTime tblWorkTime = tblWorkTimeService.getById(id);
  154 + if(tblWorkTime==null) {
  155 + return Result.error("未找到对应数据");
  156 + }
  157 + return Result.OK(tblWorkTime);
  158 + }
  159 +
  160 + /**
  161 + * 导出excel
  162 + *
  163 + * @param request
  164 + * @param tblWorkTime
  165 + */
  166 + @RequestMapping(value = "/exportXls")
  167 + public ModelAndView exportXls(HttpServletRequest request, TblWorkTime tblWorkTime) {
  168 + return super.exportXls(request, tblWorkTime, TblWorkTime.class, "tbl_work_time");
  169 + }
  170 +
  171 + /**
  172 + * 通过excel导入数据
  173 + *
  174 + * @param request
  175 + * @param response
  176 + * @return
  177 + */
  178 + @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
  179 + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
  180 + return super.importExcel(request, response, TblWorkTime.class);
  181 + }
  182 +
  183 +}
  1 +package org.jeecg.modules.erp.order_form.entity;
  2 +
  3 +import com.baomidou.mybatisplus.annotation.IdType;
  4 +import com.baomidou.mybatisplus.annotation.TableId;
  5 +import com.baomidou.mybatisplus.annotation.TableName;
  6 +import com.fasterxml.jackson.annotation.JsonFormat;
  7 +import io.swagger.annotations.ApiModel;
  8 +import io.swagger.annotations.ApiModelProperty;
  9 +import lombok.Data;
  10 +import lombok.EqualsAndHashCode;
  11 +import lombok.experimental.Accessors;
  12 +import org.jeecgframework.poi.excel.annotation.Excel;
  13 +import org.springframework.format.annotation.DateTimeFormat;
  14 +
  15 +import java.io.Serializable;
  16 +import java.math.BigDecimal;
  17 +
  18 +/**
  19 + * @Description: tbl_work_time
  20 + * @Author: jeecg-boot
  21 + * @Date: 2024-06-13
  22 + * @Version: V1.0
  23 + */
  24 +@Data
  25 +@TableName("tbl_work_time")
  26 +@Accessors(chain = true)
  27 +@EqualsAndHashCode(callSuper = false)
  28 +@ApiModel(value="tbl_work_time对象", description="tbl_work_time")
  29 +public class TblWorkTime implements Serializable {
  30 + private static final long serialVersionUID = 1L;
  31 +
  32 + /**id*/
  33 + @TableId(type = IdType.ASSIGN_ID)
  34 + @ApiModelProperty(value = "id")
  35 + private java.lang.Integer id;
  36 + /**月份*/
  37 + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM")
  38 + @DateTimeFormat(pattern="yyyy-MM")
  39 + @ApiModelProperty(value = "月份")
  40 + private java.util.Date salaryMonth;
  41 + /**姓名*/
  42 + @ApiModelProperty(value = "姓名")
  43 + private java.lang.String name;
  44 + /**月总工时*/
  45 + @ApiModelProperty(value = "月总工时")
  46 + private BigDecimal workTime;
  47 + /**创建人*/
  48 + @ApiModelProperty(value = "创建人")
  49 + private java.lang.String createBy;
  50 + /**创建日期*/
  51 + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
  52 + @DateTimeFormat(pattern="yyyy-MM-dd")
  53 + @ApiModelProperty(value = "创建日期")
  54 + private java.util.Date createTime;
  55 + /**更新人*/
  56 + @ApiModelProperty(value = "更新人")
  57 + private java.lang.String updateBy;
  58 + /**更新日期*/
  59 + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
  60 + @DateTimeFormat(pattern="yyyy-MM-dd")
  61 + @ApiModelProperty(value = "更新日期")
  62 + private java.util.Date updateTime;
  63 +}
  1 +package org.jeecg.modules.erp.order_form.mapper;
  2 +
  3 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  4 +import org.jeecg.modules.erp.order_form.entity.TblWorkTime;
  5 +
  6 +public interface TblWorkTimeMapper extends BaseMapper<TblWorkTime> {
  7 +
  8 +}
@@ -4,21 +4,23 @@ @@ -4,21 +4,23 @@
4 4
5 <select id="pageTblOrderFormDate" parameterType="java.lang.Integer" resultType="org.jeecg.modules.erp.order_form.entity.TblOrderForm"> 5 <select id="pageTblOrderFormDate" parameterType="java.lang.Integer" resultType="org.jeecg.modules.erp.order_form.entity.TblOrderForm">
6 SELECT 6 SELECT
7 - id,  
8 - order_id,  
9 - order_company,  
10 - order_date,  
11 - delivery_date 7 + d.id,
  8 + o.order_id,
  9 + o.order_date,
  10 + d.part_number,
  11 + d.product_name,
  12 + d.oper_number
12 FROM 13 FROM
13 - tbl_order_form 14 + tbl_order_form as o,tbl_bidding_shenq as s,view_depot_stock as d
14 WHERE 15 WHERE
15 - DATEDIFF(  
16 - order_date,  
17 - NOW()) <![CDATA[ < ]]> #{id} 16 + DATEDIFF(
  17 + o.order_date,
  18 + NOW()) <![CDATA[ < ]]> #{integer}
18 AND DATEDIFF( 19 AND DATEDIFF(
19 - order_date,  
20 - NOW())>= 0  
21 - AND STATUS = '生产中' 20 + o.order_date,
  21 + NOW())>= 0
  22 + AND o.verify_status = 0
  23 + AND o.order_id=s.order_id AND s.part_number=d.part_number
22 </select> 24 </select>
23 <!-- <select id="selectAll" resultType="org.jeecg.modules.erp.order_form.entity.TblOrderForm">--> 25 <!-- <select id="selectAll" resultType="org.jeecg.modules.erp.order_form.entity.TblOrderForm">-->
24 <!-- SELECT--> 26 <!-- SELECT-->
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="org.jeecg.modules.erp.order_form.mapper.TblWorkTimeMapper">
  4 +
  5 +</mapper>
  1 +package org.jeecg.modules.erp.order_form.service;
  2 +
  3 +import com.baomidou.mybatisplus.extension.service.IService;
  4 +import org.jeecg.modules.erp.order_form.entity.TblWorkTime;
  5 +
  6 +public interface ITblWorkTimeService extends IService<TblWorkTime> {
  7 +}
  1 +package org.jeecg.modules.erp.order_form.service.impl;
  2 +
  3 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  4 +import org.jeecg.modules.erp.order_form.entity.TblWorkTime;
  5 +import org.jeecg.modules.erp.order_form.mapper.TblWorkTimeMapper;
  6 +import org.jeecg.modules.erp.order_form.service.ITblWorkTimeService;
  7 +import org.springframework.stereotype.Service;
  8 +
  9 +@Service
  10 +public class TblWorkTimeServiceImpl extends ServiceImpl<TblWorkTimeMapper, TblWorkTime> implements ITblWorkTimeService {
  11 +}
@@ -21,6 +21,7 @@ import lombok.extern.slf4j.Slf4j; @@ -21,6 +21,7 @@ import lombok.extern.slf4j.Slf4j;
21 21
22 import org.jeecg.common.system.base.controller.JeecgController; 22 import org.jeecg.common.system.base.controller.JeecgController;
23 import org.springframework.beans.factory.annotation.Autowired; 23 import org.springframework.beans.factory.annotation.Autowired;
  24 +import org.springframework.transaction.annotation.Transactional;
24 import org.springframework.web.bind.annotation.*; 25 import org.springframework.web.bind.annotation.*;
25 import org.springframework.web.servlet.ModelAndView; 26 import org.springframework.web.servlet.ModelAndView;
26 import io.swagger.annotations.Api; 27 import io.swagger.annotations.Api;
@@ -74,6 +75,7 @@ public class TblProductionGongxuController extends JeecgController<TblProduction @@ -74,6 +75,7 @@ public class TblProductionGongxuController extends JeecgController<TblProduction
74 @AutoLog(value = "tbl_production_gongxu-添加") 75 @AutoLog(value = "tbl_production_gongxu-添加")
75 @ApiOperation(value="tbl_production_gongxu-添加", notes="tbl_production_gongxu-添加") 76 @ApiOperation(value="tbl_production_gongxu-添加", notes="tbl_production_gongxu-添加")
76 @PostMapping(value = "/add") 77 @PostMapping(value = "/add")
  78 + @Transactional(rollbackFor = Exception.class)
77 public Result<?> add(@RequestBody List<TblProductionGongxu> tblProductionGongxuList) { 79 public Result<?> add(@RequestBody List<TblProductionGongxu> tblProductionGongxuList) {
78 tblProductionGongxuService.saveOrUpdateBatch(tblProductionGongxuList); 80 tblProductionGongxuService.saveOrUpdateBatch(tblProductionGongxuList);
79 TblOrderForm tblOrderForm=new TblOrderForm(); 81 TblOrderForm tblOrderForm=new TblOrderForm();
@@ -97,11 +99,13 @@ public class TblProductionGongxuController extends JeecgController<TblProduction @@ -97,11 +99,13 @@ public class TblProductionGongxuController extends JeecgController<TblProduction
97 99
98 //批量修改工序验收 100 //批量修改工序验收
99 @PutMapping("/updateYan") 101 @PutMapping("/updateYan")
  102 + @Transactional(rollbackFor = Exception.class)
100 public Result<?> updateYan(@RequestBody List<TblProductionGongxu> tblProductionGongxuList){ 103 public Result<?> updateYan(@RequestBody List<TblProductionGongxu> tblProductionGongxuList){
101 boolean b = tblProductionGongxuService.updateBatchById(tblProductionGongxuList); 104 boolean b = tblProductionGongxuService.updateBatchById(tblProductionGongxuList);
102 LambdaQueryWrapper<TblProductionGongxu> queryWrapper=new LambdaQueryWrapper<TblProductionGongxu>() 105 LambdaQueryWrapper<TblProductionGongxu> queryWrapper=new LambdaQueryWrapper<TblProductionGongxu>()
103 .eq(TblProductionGongxu::getOrderNumber,tblProductionGongxuList.get(0).getOrderNumber()); 106 .eq(TblProductionGongxu::getOrderNumber,tblProductionGongxuList.get(0).getOrderNumber());
104 if(b){ 107 if(b){
  108 + tblProductionGongxuService.selectAdd();//查询已合格工序并汇总工时
105 List<TblProductionGongxu> list = tblProductionGongxuService.list(queryWrapper); 109 List<TblProductionGongxu> list = tblProductionGongxuService.list(queryWrapper);
106 boolean allHhhQualified = true; 110 boolean allHhhQualified = true;
107 for (TblProductionGongxu productionGongxu : list) { 111 for (TblProductionGongxu productionGongxu : list) {
1 package org.jeecg.modules.erp.production.controller; 1 package org.jeecg.modules.erp.production.controller;
2 2
  3 +import java.text.SimpleDateFormat;
  4 +import java.util.Date;
3 import java.util.List; 5 import java.util.List;
4 import javax.servlet.http.HttpServletRequest; 6 import javax.servlet.http.HttpServletRequest;
5 import javax.servlet.http.HttpServletResponse; 7 import javax.servlet.http.HttpServletResponse;
6 8
7 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 9 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  10 +import com.fasterxml.jackson.annotation.JsonFormat;
8 import org.jeecg.common.api.vo.Result; 11 import org.jeecg.common.api.vo.Result;
9 import org.jeecg.common.system.query.QueryGenerator; 12 import org.jeecg.common.system.query.QueryGenerator;
10 import org.jeecg.modules.erp.order_form.entity.TblOrderForm; 13 import org.jeecg.modules.erp.order_form.entity.TblOrderForm;
  14 +import org.jeecg.modules.erp.order_form.entity.TblWorkTime;
11 import org.jeecg.modules.erp.order_form.service.ITblOrderFormService; 15 import org.jeecg.modules.erp.order_form.service.ITblOrderFormService;
12 import org.jeecg.modules.erp.product_design.entity.TblProductDesign; 16 import org.jeecg.modules.erp.product_design.entity.TblProductDesign;
13 import org.jeecg.modules.erp.product_design.service.ITblProductDesignService; 17 import org.jeecg.modules.erp.product_design.service.ITblProductDesignService;
@@ -21,6 +25,7 @@ import lombok.extern.slf4j.Slf4j; @@ -21,6 +25,7 @@ import lombok.extern.slf4j.Slf4j;
21 25
22 import org.jeecg.common.system.base.controller.JeecgController; 26 import org.jeecg.common.system.base.controller.JeecgController;
23 import org.springframework.beans.factory.annotation.Autowired; 27 import org.springframework.beans.factory.annotation.Autowired;
  28 +import org.springframework.format.annotation.DateTimeFormat;
24 import org.springframework.web.bind.annotation.*; 29 import org.springframework.web.bind.annotation.*;
25 import org.springframework.web.servlet.ModelAndView; 30 import org.springframework.web.servlet.ModelAndView;
26 import io.swagger.annotations.Api; 31 import io.swagger.annotations.Api;
@@ -91,6 +96,22 @@ public class TblProductionPlanController extends JeecgController<TblOrderForm, I @@ -91,6 +96,22 @@ public class TblProductionPlanController extends JeecgController<TblOrderForm, I
91 List<TblProductionGongxu> list = gongxuService.list(queryWrapper); 96 List<TblProductionGongxu> list = gongxuService.list(queryWrapper);
92 return Result.OK(list); 97 return Result.OK(list);
93 } 98 }
  99 +
  100 + // 根据日期、姓名查找工序
  101 + @GetMapping(value = "/querygxone")
  102 + public Result<?> querygxone(@RequestParam(name = "salaryMonth")
  103 + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM")
  104 + @DateTimeFormat(pattern="yyyy-MM")
  105 + Date salaryMonth, @RequestParam(name="name",required=true) String name) {
  106 + QueryWrapper<TblProductionGongxu> queryWrapper = new QueryWrapper<>();
  107 + SimpleDateFormat outputFormat = new SimpleDateFormat("yyyy-MM");
  108 + String outputDateString = outputFormat.format(salaryMonth);
  109 + queryWrapper.apply("DATE_FORMAT(yan_time, '%Y-%m') = '" + outputDateString + "'");
  110 + queryWrapper.eq("undertaker",name);
  111 + queryWrapper.eq("yan_result","合格入库");
  112 + List<TblProductionGongxu> list = gongxuService.list(queryWrapper);
  113 + return Result.OK(list);
  114 + }
94 /** 115 /**
95 * 导出excel 116 * 导出excel
96 * 117 *
@@ -4,6 +4,7 @@ import java.util.List; @@ -4,6 +4,7 @@ import java.util.List;
4 4
5 import org.apache.ibatis.annotations.Param; 5 import org.apache.ibatis.annotations.Param;
6 import org.jeecg.modules.erp.order_form.entity.TblOrderForm; 6 import org.jeecg.modules.erp.order_form.entity.TblOrderForm;
  7 +import org.jeecg.modules.erp.order_form.entity.TblWorkOrder;
7 import org.jeecg.modules.erp.production.entity.TblProductionGongxu; 8 import org.jeecg.modules.erp.production.entity.TblProductionGongxu;
8 import com.baomidou.mybatisplus.core.mapper.BaseMapper; 9 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
9 10
@@ -22,4 +23,6 @@ public interface TblProductionGongxuMapper extends BaseMapper<TblProductionGongx @@ -22,4 +23,6 @@ public interface TblProductionGongxuMapper extends BaseMapper<TblProductionGongx
22 void updateByStatus(String orderNumber); 23 void updateByStatus(String orderNumber);
23 24
24 Integer deleteByOrderId(String orderId); 25 Integer deleteByOrderId(String orderId);
  26 +
  27 + void selectAdd();
25 } 28 }
@@ -13,6 +13,14 @@ @@ -13,6 +13,14 @@
13 <select id="getByhours" resultType="org.jeecg.modules.erp.order_form.entity.TblOrderForm"> 13 <select id="getByhours" resultType="org.jeecg.modules.erp.order_form.entity.TblOrderForm">
14 select * from tbl_order_form where order_id=#{orderNumber} 14 select * from tbl_order_form where order_id=#{orderNumber}
15 </select> 15 </select>
  16 + <insert id="selectAdd">
  17 + INSERT INTO tbl_work_time(`name`, salary_month, work_time)
  18 + SELECT undertaker,yan_time, SUM(work_hours)
  19 + FROM tbl_production_gongxu
  20 + WHERE yan_result = '合格入库' AND yan_time!='null'
  21 + GROUP BY undertaker, CONCAT(YEAR(yan_time), '-', LPAD(MONTH(yan_time), 2, '0'))
  22 + ON DUPLICATE KEY UPDATE work_time = VALUES(work_time);
  23 + </insert>
16 <delete id="deleteByOrderId" parameterType="java.lang.String"> 24 <delete id="deleteByOrderId" parameterType="java.lang.String">
17 delete from tbl_production_gongxu where order_number = #{orderId} 25 delete from tbl_production_gongxu where order_number = #{orderId}
18 </delete> 26 </delete>
@@ -2,9 +2,12 @@ package org.jeecg.modules.erp.production.service; @@ -2,9 +2,12 @@ package org.jeecg.modules.erp.production.service;
2 2
3 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 3 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4 import org.jeecg.modules.erp.order_form.entity.TblOrderForm; 4 import org.jeecg.modules.erp.order_form.entity.TblOrderForm;
  5 +import org.jeecg.modules.erp.order_form.entity.TblWorkOrder;
5 import org.jeecg.modules.erp.production.entity.TblProductionGongxu; 6 import org.jeecg.modules.erp.production.entity.TblProductionGongxu;
6 import com.baomidou.mybatisplus.extension.service.IService; 7 import com.baomidou.mybatisplus.extension.service.IService;
7 8
  9 +import java.util.List;
  10 +
8 /** 11 /**
9 * @Description: tbl_production_gongxu 12 * @Description: tbl_production_gongxu
10 * @Author: jeecg-boot 13 * @Author: jeecg-boot
@@ -20,4 +23,6 @@ public interface ITblProductionGongxuService extends IService<TblProductionGongx @@ -20,4 +23,6 @@ public interface ITblProductionGongxuService extends IService<TblProductionGongx
20 void updateByStatus(String orderNumber); 23 void updateByStatus(String orderNumber);
21 24
22 Integer deleteByOrderId(String orderId); 25 Integer deleteByOrderId(String orderId);
  26 +
  27 + void selectAdd();
23 } 28 }
1 package org.jeecg.modules.erp.production.service.impl; 1 package org.jeecg.modules.erp.production.service.impl;
2 2
3 import org.jeecg.modules.erp.order_form.entity.TblOrderForm; 3 import org.jeecg.modules.erp.order_form.entity.TblOrderForm;
  4 +import org.jeecg.modules.erp.order_form.entity.TblWorkOrder;
4 import org.jeecg.modules.erp.order_form.mapper.TblOrderFormMapper; 5 import org.jeecg.modules.erp.order_form.mapper.TblOrderFormMapper;
5 import org.jeecg.modules.erp.production.entity.TblProductionGongxu; 6 import org.jeecg.modules.erp.production.entity.TblProductionGongxu;
6 import org.jeecg.modules.erp.production.mapper.TblProductionGongxuMapper; 7 import org.jeecg.modules.erp.production.mapper.TblProductionGongxuMapper;
@@ -10,6 +11,8 @@ import org.springframework.stereotype.Service; @@ -10,6 +11,8 @@ import org.springframework.stereotype.Service;
10 11
11 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 12 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
12 13
  14 +import java.util.List;
  15 +
13 /** 16 /**
14 * @Description: tbl_production_gongxu 17 * @Description: tbl_production_gongxu
15 * @Author: jeecg-boot 18 * @Author: jeecg-boot
@@ -40,4 +43,10 @@ public class TblProductionGongxuServiceImpl extends ServiceImpl<TblProductionGon @@ -40,4 +43,10 @@ public class TblProductionGongxuServiceImpl extends ServiceImpl<TblProductionGon
40 public Integer deleteByOrderId(String orderId) { 43 public Integer deleteByOrderId(String orderId) {
41 return tblProductionGongxuMapper.deleteByOrderId(orderId); 44 return tblProductionGongxuMapper.deleteByOrderId(orderId);
42 } 45 }
  46 +
  47 + @Override
  48 + public void selectAdd() {
  49 + tblProductionGongxuMapper.selectAdd();
  50 + }
  51 +
43 } 52 }
@@ -13,6 +13,7 @@ import org.jeecg.common.aspect.annotation.AutoLog; @@ -13,6 +13,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
13 import org.jeecg.common.constant.CommonConstant; 13 import org.jeecg.common.constant.CommonConstant;
14 import org.jeecg.common.system.base.controller.JeecgController; 14 import org.jeecg.common.system.base.controller.JeecgController;
15 import org.jeecg.common.system.query.QueryGenerator; 15 import org.jeecg.common.system.query.QueryGenerator;
  16 +import org.jeecg.modules.erp.order_form.entity.TblOrderForm;
16 import org.jeecg.modules.erp.salary.entity.TblSalaryBase; 17 import org.jeecg.modules.erp.salary.entity.TblSalaryBase;
17 import org.jeecg.modules.erp.salary.entity.TblSalarySuanfa; 18 import org.jeecg.modules.erp.salary.entity.TblSalarySuanfa;
18 import org.jeecg.modules.erp.salary.service.ITblSalarySuanfaService; 19 import org.jeecg.modules.erp.salary.service.ITblSalarySuanfaService;
@@ -23,6 +24,7 @@ import org.springframework.web.bind.annotation.*; @@ -23,6 +24,7 @@ import org.springframework.web.bind.annotation.*;
23 import org.springframework.web.servlet.ModelAndView; 24 import org.springframework.web.servlet.ModelAndView;
24 25
25 import javax.servlet.http.HttpServletRequest; 26 import javax.servlet.http.HttpServletRequest;
  27 +import javax.servlet.http.HttpServletResponse;
26 import java.util.*; 28 import java.util.*;
27 29
28 /** 30 /**
@@ -56,9 +58,43 @@ public class TblSalaryBaseController extends JeecgController<TblSalaryBase, Tbl @@ -56,9 +58,43 @@ public class TblSalaryBaseController extends JeecgController<TblSalaryBase, Tbl
56 @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, 58 @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
57 @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, 59 @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
58 HttpServletRequest req){ 60 HttpServletRequest req){
  61 +
59 QueryWrapper<TblSalaryBase> queryWrapper = QueryGenerator.initQueryWrapper(tblSalaryBase, req.getParameterMap()); 62 QueryWrapper<TblSalaryBase> queryWrapper = QueryGenerator.initQueryWrapper(tblSalaryBase, req.getParameterMap());
60 Page<TblSalaryBase> page = new Page<>(pageNo, pageSize); 63 Page<TblSalaryBase> page = new Page<>(pageNo, pageSize);
61 IPage<TblSalaryBase> pageList = tblSalaryBaseService.page(page,queryWrapper); 64 IPage<TblSalaryBase> pageList = tblSalaryBaseService.page(page,queryWrapper);
  65 + // 查询所有符合条件的记录
  66 + List<TblSalaryBase> recordsToUpdate = tblSalaryBaseService.list(queryWrapper);
  67 + List<TblSalaryBase> updateList = new ArrayList<>();
  68 + // 在这里可以根据需要进行更新操作
  69 + for (TblSalaryBase item : recordsToUpdate) {
  70 + // 根据业务需求更新字段
  71 + if(item.getJobTitle() == null || item.getJobTitle().isEmpty()) {
  72 +
  73 + if (item.getJobName().equals("普工")) {
  74 + item.setJobTitle("WorkshopGeneralWorker");
  75 + } else if (item.getJobName().equals("装配主管")) {
  76 + item.setJobTitle("AssemblySupervisor");
  77 + } else if (item.getJobName().equals("装配工")) {
  78 + item.setJobTitle("Assembler");
  79 + } else if (item.getJobName().equals("采购主管")) {
  80 + item.setJobTitle("ProcurementSupervisor");
  81 + } else if (item.getJobName().equals("采购员")) {
  82 + item.setJobTitle("PurchasingOfficer");
  83 + } else if (item.getJobName().equals("车间辅助人员")) {
  84 + item.setJobTitle("WorkshopAuxiliaryPersonnel");
  85 + } else if (item.getJobName().equals("车间技术员")) {
  86 + item.setJobTitle("WorkshopTechnician");
  87 + } else if (item.getJobName().equals("车间技术主管")) {
  88 + item.setJobTitle("WorkshopTechnicalManager");
  89 + } else if (item.getJobName().equals("车间管理员")) {
  90 + item.setJobTitle("WorkshopDirector");
  91 + } else if (item.getJobName().equals("办公室行政人员")) {
  92 + item.setJobTitle("OfficeAdministrative");
  93 + }
  94 + updateList.add(item); // 将需要更新的对象加入集合
  95 + }
  96 + }
  97 + tblSalaryBaseService.updateBatchById(updateList); // 批量更新数据
62 return Result.OK(pageList); 98 return Result.OK(pageList);
63 } 99 }
64 100
@@ -69,6 +105,13 @@ public class TblSalaryBaseController extends JeecgController<TblSalaryBase, Tbl @@ -69,6 +105,13 @@ public class TblSalaryBaseController extends JeecgController<TblSalaryBase, Tbl
69 return Result.ok(list); 105 return Result.ok(list);
70 } 106 }
71 107
  108 + //普工人员下拉
  109 + @GetMapping(value = "/listSalary2")
  110 + public Result<List<Map<String,String>>> listSalary2(){
  111 + List<Map<String,String>> list = tblSalaryBaseService.selectUserPg();
  112 + return Result.ok(list);
  113 + }
  114 +
72 @ApiOperation(value = "tbl_salary_base-手机号验证") 115 @ApiOperation(value = "tbl_salary_base-手机号验证")
73 @GetMapping(value = "/listphone") 116 @GetMapping(value = "/listphone")
74 public Result<?> listphone(@RequestParam(name = "phone", required = true) String phone){ 117 public Result<?> listphone(@RequestParam(name = "phone", required = true) String phone){
@@ -160,4 +203,17 @@ public class TblSalaryBaseController extends JeecgController<TblSalaryBase, Tbl @@ -160,4 +203,17 @@ public class TblSalaryBaseController extends JeecgController<TblSalaryBase, Tbl
160 public ModelAndView exportXls(HttpServletRequest request, TblSalaryBase tblSalaryBase) { 203 public ModelAndView exportXls(HttpServletRequest request, TblSalaryBase tblSalaryBase) {
161 return super.exportXls(request, tblSalaryBase, TblSalaryBase.class, "基础信息"); 204 return super.exportXls(request, tblSalaryBase, TblSalaryBase.class, "基础信息");
162 } 205 }
  206 +
  207 +
  208 + /**
  209 + * 通过excel导入数据
  210 + *
  211 + * @param request
  212 + * @param response
  213 + * @return
  214 + */
  215 + @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
  216 + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
  217 + return super.importExcel(request, response, TblSalaryBase.class);
  218 + }
163 } 219 }
@@ -13,6 +13,8 @@ import org.jeecg.common.aspect.annotation.AutoLog; @@ -13,6 +13,8 @@ import org.jeecg.common.aspect.annotation.AutoLog;
13 import org.jeecg.common.system.base.controller.JeecgController2; 13 import org.jeecg.common.system.base.controller.JeecgController2;
14 import org.jeecg.common.system.query.QueryGenerator; 14 import org.jeecg.common.system.query.QueryGenerator;
15 import org.jeecg.common.util.oConvertUtils; 15 import org.jeecg.common.util.oConvertUtils;
  16 +import org.jeecg.modules.erp.order_form.entity.TblWorkTime;
  17 +import org.jeecg.modules.erp.order_form.service.ITblWorkTimeService;
16 import org.jeecg.modules.erp.salary.entity.TblSalaryBase; 18 import org.jeecg.modules.erp.salary.entity.TblSalaryBase;
17 import org.jeecg.modules.erp.salary.entity.TblSalaryCalculation; 19 import org.jeecg.modules.erp.salary.entity.TblSalaryCalculation;
18 import org.jeecg.modules.erp.salary.entity.TblSalaryCalculationVo; 20 import org.jeecg.modules.erp.salary.entity.TblSalaryCalculationVo;
@@ -26,6 +28,7 @@ import org.springframework.core.io.ClassPathResource; @@ -26,6 +28,7 @@ import org.springframework.core.io.ClassPathResource;
26 import org.springframework.core.io.Resource; 28 import org.springframework.core.io.Resource;
27 import org.springframework.format.annotation.DateTimeFormat; 29 import org.springframework.format.annotation.DateTimeFormat;
28 import org.springframework.http.*; 30 import org.springframework.http.*;
  31 +import org.springframework.transaction.annotation.Transactional;
29 import org.springframework.web.bind.annotation.*; 32 import org.springframework.web.bind.annotation.*;
30 33
31 import org.springframework.core.io.ClassPathResource; 34 import org.springframework.core.io.ClassPathResource;
@@ -68,7 +71,7 @@ import static org.apache.poi.hemf.record.emfplus.HemfPlusRecordType.object; @@ -68,7 +71,7 @@ import static org.apache.poi.hemf.record.emfplus.HemfPlusRecordType.object;
68 @RestController 71 @RestController
69 @RequestMapping("/salary/calculation") 72 @RequestMapping("/salary/calculation")
70 @Slf4j 73 @Slf4j
71 -public class TblSalaryCalculationController extends JeecgController2<TblSalaryCalculation, TblSalaryCalculationVo, TblSalaryBase, ITblSalaryCalculationVoService, ITblSalaryCalculationService, TblSalaryBaseService> { 74 +public class TblSalaryCalculationController extends JeecgController2<TblSalaryCalculation, TblSalaryCalculationVo, TblSalaryBase, TblWorkTime, ITblSalaryCalculationVoService, ITblSalaryCalculationService, TblSalaryBaseService, ITblWorkTimeService> {
72 @Autowired 75 @Autowired
73 private ITblSalaryCalculationService tblSalaryCalculationService; 76 private ITblSalaryCalculationService tblSalaryCalculationService;
74 @Autowired 77 @Autowired
@@ -91,7 +94,7 @@ public class TblSalaryCalculationController extends JeecgController2<TblSalaryCa @@ -91,7 +94,7 @@ public class TblSalaryCalculationController extends JeecgController2<TblSalaryCa
91 HttpServletRequest req) { 94 HttpServletRequest req) {
92 QueryWrapper<TblSalaryCalculation> queryWrapper = QueryGenerator.initQueryWrapper(tblSalaryCalculation, req.getParameterMap()); 95 QueryWrapper<TblSalaryCalculation> queryWrapper = QueryGenerator.initQueryWrapper(tblSalaryCalculation, req.getParameterMap());
93 Page<TblSalaryCalculation> page = new Page<>(pageNo, pageSize); 96 Page<TblSalaryCalculation> page = new Page<>(pageNo, pageSize);
94 - tblSalaryCalculationService.selectAll(); 97 + tblSalaryCalculationService.selectAndUpd();
95 IPage<TblSalaryCalculation> pageList = tblSalaryCalculationService.page(page, queryWrapper); 98 IPage<TblSalaryCalculation> pageList = tblSalaryCalculationService.page(page, queryWrapper);
96 return Result.OK(pageList); 99 return Result.OK(pageList);
97 } 100 }
@@ -223,7 +226,7 @@ public class TblSalaryCalculationController extends JeecgController2<TblSalaryCa @@ -223,7 +226,7 @@ public class TblSalaryCalculationController extends JeecgController2<TblSalaryCa
223 @ApiOperation(value="tbl_salary_calculation-导入", notes="tbl_salary_calculation-导入") 226 @ApiOperation(value="tbl_salary_calculation-导入", notes="tbl_salary_calculation-导入")
224 @RequestMapping(value = "/importExcel", method = RequestMethod.POST) 227 @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
225 public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { 228 public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
226 - return super.importExcelgz(request, response, TblSalaryCalculation.class,TblSalaryBase.class); 229 + return super.importExcelgz(request, response, TblSalaryCalculation.class,TblSalaryBase.class,TblWorkTime.class);
227 } 230 }
228 231
229 232
@@ -236,12 +239,13 @@ public class TblSalaryCalculationController extends JeecgController2<TblSalaryCa @@ -236,12 +239,13 @@ public class TblSalaryCalculationController extends JeecgController2<TblSalaryCa
236 @AutoLog(value = "tbl_salary_calculation-查询修改记录") 239 @AutoLog(value = "tbl_salary_calculation-查询修改记录")
237 @ApiOperation(value="tbl_salary_calculation-查询修改记录", notes="tbl_salary_calculation-查询修改记录") 240 @ApiOperation(value="tbl_salary_calculation-查询修改记录", notes="tbl_salary_calculation-查询修改记录")
238 @RequestMapping(value = "/selectup") 241 @RequestMapping(value = "/selectup")
  242 + @Transactional(rollbackFor = Exception.class)
239 public Result<String> selectup(@RequestParam(name = "salaryMonth") 243 public Result<String> selectup(@RequestParam(name = "salaryMonth")
240 @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM") 244 @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM")
241 @DateTimeFormat(pattern="yyyy-MM") 245 @DateTimeFormat(pattern="yyyy-MM")
242 Date salaryMonth){ 246 Date salaryMonth){
243 // tblSalaryCalculationService.jin(); 247 // tblSalaryCalculationService.jin();
244 - Boolean zhi= tblSalaryCalculationService.selectup(salaryMonth); 248 + Boolean zhi= tblSalaryCalculationService.updateByBase(salaryMonth);
245 if(zhi){ 249 if(zhi){
246 tblSalaryCalculationService.upjisuan(tblSalaryCalculationService.select(salaryMonth)); 250 tblSalaryCalculationService.upjisuan(tblSalaryCalculationService.select(salaryMonth));
247 return Result.OK("成功!"); 251 return Result.OK("成功!");
@@ -43,10 +43,14 @@ public class TblSalaryBase implements Serializable { @@ -43,10 +43,14 @@ public class TblSalaryBase implements Serializable {
43 @Excel(name = "姓名", width = 15) 43 @Excel(name = "姓名", width = 15)
44 @ApiModelProperty(value = "姓名") 44 @ApiModelProperty(value = "姓名")
45 private String userName; 45 private String userName;
  46 + /**岗位编号*/
  47 +// @Excel(name = "岗位编号", width = 15)
  48 + @ApiModelProperty(value = "岗位编号")
  49 + private String jobTitle;
46 /**岗位*/ 50 /**岗位*/
47 @Excel(name = "岗位", width = 15) 51 @Excel(name = "岗位", width = 15)
48 @ApiModelProperty(value = "岗位") 52 @ApiModelProperty(value = "岗位")
49 - private String jobTitle; 53 + private String jobName;
50 /**工时标准*/ 54 /**工时标准*/
51 @Excel(name = "工时标准", width = 15) 55 @Excel(name = "工时标准", width = 15)
52 @ApiModelProperty(value = "工时标准") 56 @ApiModelProperty(value = "工时标准")
@@ -16,6 +16,8 @@ import java.util.Map; @@ -16,6 +16,8 @@ import java.util.Map;
16 public interface TblSalaryBaseMapper extends BaseMapper<TblSalaryBase> { 16 public interface TblSalaryBaseMapper extends BaseMapper<TblSalaryBase> {
17 17
18 List<Map<String,String>> selectUserAll(); 18 List<Map<String,String>> selectUserAll();
  19 +
  20 + List<Map<String, String>> selectUserPg();
19 } 21 }
20 22
21 23
@@ -24,11 +24,11 @@ public interface TblSalaryCalculationMapper extends BaseMapper<TblSalaryCalculat @@ -24,11 +24,11 @@ public interface TblSalaryCalculationMapper extends BaseMapper<TblSalaryCalculat
24 24
25 void jisuan(TblSalaryCalculation sc); 25 void jisuan(TblSalaryCalculation sc);
26 26
27 - Boolean selectup(Date salaryMonth); 27 + Boolean updateByBase(Date salaryMonth);
28 28
29 List<TblSalaryCalculation> select(Date salaryMonth); 29 List<TblSalaryCalculation> select(Date salaryMonth);
30 30
31 - void selectAll(); 31 + void selectAndUpd();
32 32
33 TblSalaryBase all(String jobId, String userName); 33 TblSalaryBase all(String jobId, String userName);
34 34
@@ -32,4 +32,13 @@ @@ -32,4 +32,13 @@
32 <select id="selectUserAll" resultType="java.util.Map"> 32 <select id="selectUserAll" resultType="java.util.Map">
33 SELECT a.job_id jobId,CONCAT(a.user_name,'(',b.job_title,')') as userName from tbl_salary_base a left join tbl_salary_suanfa b on a.job_title = b.job_id 33 SELECT a.job_id jobId,CONCAT(a.user_name,'(',b.job_title,')') as userName from tbl_salary_base a left join tbl_salary_suanfa b on a.job_title = b.job_id
34 </select> 34 </select>
  35 + <select id="selectUserPg" resultType="java.util.Map">
  36 + SELECT
  37 + a.job_id jobId,
  38 + CONCAT( a.user_name, '(', b.job_title, ')' ) AS userName
  39 + FROM
  40 + tbl_salary_base a
  41 + LEFT JOIN tbl_salary_suanfa b ON a.job_title = b.job_id
  42 + WHERE a.job_title='WorkshopGeneralWorker'
  43 + </select>
35 </mapper> 44 </mapper>
@@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
28 working_hours=#{workingHours} 28 working_hours=#{workingHours}
29 where salary_month=#{salaryMonth} and user_name=#{userName} and job_id=#{jobId} 29 where salary_month=#{salaryMonth} and user_name=#{userName} and job_id=#{jobId}
30 </update> 30 </update>
31 - <update id="selectup"> 31 + <update id="updateByBase">
32 UPDATE tbl_salary_calculation AS sc 32 UPDATE tbl_salary_calculation AS sc
33 JOIN tbl_salary_base AS sb ON sc.user_name = sb.user_name and sc.job_id =sb.job_id 33 JOIN tbl_salary_base AS sb ON sc.user_name = sb.user_name and sc.job_id =sb.job_id
34 SET 34 SET
@@ -43,7 +43,7 @@ @@ -43,7 +43,7 @@
43 select * from tbl_salary_calculation 43 select * from tbl_salary_calculation
44 where salary_month=#{salaryMonth} 44 where salary_month=#{salaryMonth}
45 </select> 45 </select>
46 - <select id="selectAll"> 46 + <select id="selectAndUpd">
47 UPDATE tbl_salary_calculation AS sc 47 UPDATE tbl_salary_calculation AS sc
48 JOIN tbl_salary_base AS sb ON sc.user_name = sb.user_name and sc.job_id =sb.job_id 48 JOIN tbl_salary_base AS sb ON sc.user_name = sb.user_name and sc.job_id =sb.job_id
49 SET 49 SET
@@ -22,9 +22,9 @@ public interface ITblSalaryCalculationService extends IService<TblSalaryCalculat @@ -22,9 +22,9 @@ public interface ITblSalaryCalculationService extends IService<TblSalaryCalculat
22 22
23 void upjisuan(List<TblSalaryCalculation> list); 23 void upjisuan(List<TblSalaryCalculation> list);
24 24
25 - Boolean selectup(Date salaryMonth); 25 + Boolean updateByBase(Date salaryMonth);
26 26
27 List<TblSalaryCalculation> select(Date salaryMonth); 27 List<TblSalaryCalculation> select(Date salaryMonth);
28 28
29 - void selectAll(); 29 + void selectAndUpd();
30 } 30 }
@@ -15,4 +15,6 @@ import java.util.Map; @@ -15,4 +15,6 @@ import java.util.Map;
15 public interface TblSalaryBaseService extends IService<TblSalaryBase> { 15 public interface TblSalaryBaseService extends IService<TblSalaryBase> {
16 16
17 List<Map<String,String>> selectUserAll(); 17 List<Map<String,String>> selectUserAll();
  18 +
  19 + List<Map<String, String>> selectUserPg();
18 } 20 }
@@ -28,6 +28,11 @@ public class TblSalaryBaseServiceImpl extends ServiceImpl<TblSalaryBaseMapper, T @@ -28,6 +28,11 @@ public class TblSalaryBaseServiceImpl extends ServiceImpl<TblSalaryBaseMapper, T
28 public List<Map<String, String>> selectUserAll() { 28 public List<Map<String, String>> selectUserAll() {
29 return tblSalaryBaseMapper.selectUserAll(); 29 return tblSalaryBaseMapper.selectUserAll();
30 } 30 }
  31 +
  32 + @Override
  33 + public List<Map<String, String>> selectUserPg() {
  34 + return tblSalaryBaseMapper.selectUserPg();
  35 + }
31 } 36 }
32 37
33 38
@@ -41,8 +41,8 @@ public class TblSalaryCalculationServiceImpl extends ServiceImpl<TblSalaryCalcul @@ -41,8 +41,8 @@ public class TblSalaryCalculationServiceImpl extends ServiceImpl<TblSalaryCalcul
41 } 41 }
42 42
43 @Override 43 @Override
44 - public Boolean selectup(Date salaryMonth) {  
45 - return tblSalaryCalculationMapper.selectup(salaryMonth); 44 + public Boolean updateByBase(Date salaryMonth) {
  45 + return tblSalaryCalculationMapper.updateByBase(salaryMonth);
46 } 46 }
47 47
48 @Override 48 @Override
@@ -51,8 +51,8 @@ public class TblSalaryCalculationServiceImpl extends ServiceImpl<TblSalaryCalcul @@ -51,8 +51,8 @@ public class TblSalaryCalculationServiceImpl extends ServiceImpl<TblSalaryCalcul
51 } 51 }
52 52
53 @Override 53 @Override
54 - public void selectAll() {  
55 - tblSalaryCalculationMapper.selectAll(); 54 + public void selectAndUpd() {
  55 + tblSalaryCalculationMapper.selectAndUpd();
56 } 56 }
57 57
58 @Override 58 @Override
@@ -16,6 +16,7 @@ import lombok.extern.slf4j.Slf4j; @@ -16,6 +16,7 @@ import lombok.extern.slf4j.Slf4j;
16 16
17 import org.jeecg.common.system.base.controller.JeecgController; 17 import org.jeecg.common.system.base.controller.JeecgController;
18 import org.springframework.beans.factory.annotation.Autowired; 18 import org.springframework.beans.factory.annotation.Autowired;
  19 +import org.springframework.transaction.annotation.Transactional;
19 import org.springframework.web.bind.annotation.*; 20 import org.springframework.web.bind.annotation.*;
20 import org.springframework.web.servlet.ModelAndView; 21 import org.springframework.web.servlet.ModelAndView;
21 import io.swagger.annotations.Api; 22 import io.swagger.annotations.Api;
@@ -48,6 +49,7 @@ public class TblTradZongController extends JeecgController<TblTradZong, TblTradZ @@ -48,6 +49,7 @@ public class TblTradZongController extends JeecgController<TblTradZong, TblTradZ
48 //@AutoLog(value = "tbl_trad_zong-分页列表查询") 49 //@AutoLog(value = "tbl_trad_zong-分页列表查询")
49 @ApiOperation(value="tbl_trad_zong-分页列表查询", notes="tbl_trad_zong-分页列表查询") 50 @ApiOperation(value="tbl_trad_zong-分页列表查询", notes="tbl_trad_zong-分页列表查询")
50 @GetMapping(value = "/list") 51 @GetMapping(value = "/list")
  52 + @Transactional(rollbackFor = Exception.class)
51 public Result<IPage<TblTradZong>> queryPageList(TblTradZong tblTradZong, 53 public Result<IPage<TblTradZong>> queryPageList(TblTradZong tblTradZong,
52 @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, 54 @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
53 @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, 55 @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,