1
@ -89,6 +89,49 @@
|
||||
<warName>${project.artifactId}</warName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>2.6</version>
|
||||
<configuration>
|
||||
<!-- 如果是true 在打出来的包/路径上面会增加这个Assembly的id显示-->
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
<descriptors>
|
||||
<!-- assembly描述文件位置 -->
|
||||
<descriptor>src/main/resources/assembly.xml</descriptor>
|
||||
</descriptors>
|
||||
<!-- 打包完成后文件输出位置 这里为target目录-->
|
||||
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<!-- 主要用来打包主jar-->
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.3.0</version>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<!--启动文件入口类,就是springboot启动main方法所在类 -->
|
||||
<mainClass>com.staffing.StaffingApplication</mainClass>
|
||||
<!-- 主jar依赖的jar包路径-->
|
||||
<classpathPrefix>lib/</classpathPrefix>
|
||||
<addClasspath>true</addClasspath>
|
||||
</manifest>
|
||||
</archive>
|
||||
<!-- 不把配置文件和html文件打进主jar内-->
|
||||
<excludes>
|
||||
<exclude>*.java</exclude>
|
||||
<exclude>static/</exclude>
|
||||
<exclude>db/</exclude>
|
||||
<exclude>templates/</exclude>
|
||||
<exclude>*.yml</exclude>
|
||||
<exclude>*.txt</exclude>
|
||||
<exclude>logback.xml</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
</build>
|
||||
|
@ -2,7 +2,17 @@ package com.staffing.web.controller.custom;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.staffing.common.core.domain.entity.SysUser;
|
||||
import com.staffing.common.core.redis.RedisCache;
|
||||
import com.staffing.common.utils.SecurityUtils;
|
||||
import com.staffing.custom.domain.StTask;
|
||||
import com.staffing.custom.domain.StTaskSign;
|
||||
import com.staffing.custom.mapper.StTaskMapper;
|
||||
import com.staffing.custom.service.IStTaskService;
|
||||
import com.staffing.custom.service.IStTaskSignService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -22,6 +32,9 @@ import com.staffing.custom.service.IStEmployeeService;
|
||||
import com.staffing.common.utils.poi.ExcelUtil;
|
||||
import com.staffing.common.core.page.TableDataInfo;
|
||||
|
||||
import static com.staffing.common.constant.Constants.DELETED_USER_KEY;
|
||||
import static com.staffing.common.utils.PageUtils.startPage;
|
||||
|
||||
/**
|
||||
* 员工Controller
|
||||
*
|
||||
@ -34,11 +47,17 @@ public class StEmployeeController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IStEmployeeService stEmployeeService;
|
||||
@Autowired
|
||||
private IStTaskSignService taskSignService;
|
||||
@Autowired
|
||||
private StTaskMapper stTaskMapper;
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
/**
|
||||
* 查询员工列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('employee:employee:list')")
|
||||
@PreAuthorize("@ss.hasPermi('employee:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(StEmployee stEmployee)
|
||||
{
|
||||
@ -50,7 +69,7 @@ public class StEmployeeController extends BaseController
|
||||
/**
|
||||
* 导出员工列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('employee:employee:export')")
|
||||
@PreAuthorize("@ss.hasPermi('employee:export')")
|
||||
@Log(title = "员工", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, StEmployee stEmployee)
|
||||
@ -63,7 +82,7 @@ public class StEmployeeController extends BaseController
|
||||
/**
|
||||
* 获取员工详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('employee:employee:query')")
|
||||
@PreAuthorize("@ss.hasPermi('employee:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
@ -73,7 +92,7 @@ public class StEmployeeController extends BaseController
|
||||
/**
|
||||
* 新增员工
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('employee:employee:add')")
|
||||
@PreAuthorize("@ss.hasPermi('employee:add')")
|
||||
@Log(title = "员工", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody StEmployee stEmployee)
|
||||
@ -89,23 +108,48 @@ public class StEmployeeController extends BaseController
|
||||
/**
|
||||
* 修改员工
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('employee:employee:edit')")
|
||||
@PreAuthorize("@ss.hasPermi('employee:edit')")
|
||||
@Log(title = "员工", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody StEmployee stEmployee)
|
||||
{
|
||||
stEmployee.setUpdateTime(new Date());
|
||||
stEmployee.setPhone(null);//不允许修改手机号
|
||||
return toAjax(stEmployeeService.updateStEmployeeOrNull(stEmployee));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除员工
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('employee:employee:remove')")
|
||||
@PreAuthorize("@ss.hasPermi('employee:remove')")
|
||||
@Log(title = "员工", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(stEmployeeService.deleteStEmployeeByIds(ids));
|
||||
//有报名任务,则不能删除了
|
||||
for (Long id : ids) {
|
||||
StTaskSign stTaskSign = new StTaskSign();
|
||||
stTaskSign.setEmployeeId(id);
|
||||
List<StTaskSign> stTaskSigns = taskSignService.selectStTaskSignList(stTaskSign);
|
||||
|
||||
if (!stTaskSigns.isEmpty()){
|
||||
StTask stTask = new StTask();
|
||||
List<Long> taskIds = stTaskSigns.stream().map(stTask1 -> stTask1.getTaskId()).collect(Collectors.toList());
|
||||
stTask.setTaskIds(taskIds);
|
||||
List<StTask> stTasks = stTaskMapper.selectStTaskList(stTask);
|
||||
|
||||
if (!stTasks.isEmpty()){
|
||||
return error("该员工已报名了任务["+ stTasks.get(0).getTaskName() +"], 不能删除");
|
||||
}
|
||||
}
|
||||
}
|
||||
int i = stEmployeeService.deleteStEmployeeByIds(ids);
|
||||
if(i > 0){
|
||||
for (Long id : ids) {
|
||||
//清除缓存,用户踢下线
|
||||
redisCache.setCacheMapValue(DELETED_USER_KEY, id+"", true);
|
||||
}
|
||||
}
|
||||
return toAjax(i);
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ public class StEmployeeFundRecordController extends BaseController
|
||||
/**
|
||||
* 查询员工资金流水列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fund:fund:list')")
|
||||
@PreAuthorize("@ss.hasPermi('fund:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(StEmployeeFundRecord stEmployeeFundRecord)
|
||||
{
|
||||
@ -58,7 +58,7 @@ public class StEmployeeFundRecordController extends BaseController
|
||||
/**
|
||||
* 导出员工资金流水列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fund:fund:export')")
|
||||
@PreAuthorize("@ss.hasPermi('fund:export')")
|
||||
@Log(title = "员工资金流水", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, StEmployeeFundRecord stEmployeeFundRecord)
|
||||
@ -90,7 +90,7 @@ public class StEmployeeFundRecordController extends BaseController
|
||||
/**
|
||||
* 获取员工资金流水详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fund:fund:query')")
|
||||
@PreAuthorize("@ss.hasPermi('fund:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
@ -100,7 +100,7 @@ public class StEmployeeFundRecordController extends BaseController
|
||||
/**
|
||||
* 新增员工资金流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fund:fund:add')")
|
||||
@PreAuthorize("@ss.hasPermi('fund:add')")
|
||||
@Log(title = "员工资金流水", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody StEmployeeFundRecord stEmployeeFundRecord)
|
||||
@ -112,7 +112,7 @@ public class StEmployeeFundRecordController extends BaseController
|
||||
/**
|
||||
* 修改员工资金流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fund:fund:edit')")
|
||||
@PreAuthorize("@ss.hasPermi('fund:edit')")
|
||||
@Log(title = "员工资金流水", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody StEmployeeFundRecord stEmployeeFundRecord)
|
||||
@ -124,7 +124,7 @@ public class StEmployeeFundRecordController extends BaseController
|
||||
/**
|
||||
* 删除员工资金流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fund:fund:remove')")
|
||||
@PreAuthorize("@ss.hasPermi('fund:remove')")
|
||||
@Log(title = "员工资金流水", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
@ -133,7 +133,7 @@ public class StEmployeeFundRecordController extends BaseController
|
||||
}
|
||||
|
||||
@Log(title = "流水导入", businessType = BusinessType.IMPORT)
|
||||
@PreAuthorize("@ss.hasPermi('fund:fund:export')")
|
||||
@PreAuthorize("@ss.hasPermi('fund:export')")
|
||||
@PostMapping("/importData")
|
||||
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
|
||||
{
|
||||
|
@ -8,6 +8,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.staffing.common.utils.MinioUtil;
|
||||
import com.staffing.common.utils.QRCodeGenerator;
|
||||
import com.staffing.custom.domain.StTaskSign;
|
||||
import io.minio.ObjectWriteResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -50,7 +51,9 @@ public class StTaskController extends BaseController
|
||||
if (task.getCodePic() == null){
|
||||
continue;
|
||||
}
|
||||
task.setCodePic(minioUtil.getObjectURL( "yonggong", task.getCodePic()));
|
||||
|
||||
task.setCodePic("https://www.tulkj.cn/file/yonggong/" + task.getCodePic());
|
||||
// task.setCodePic(minioUtil.getObjectURL( "yonggong", task.getCodePic()));
|
||||
}
|
||||
return getDataTable(list);
|
||||
}
|
||||
@ -73,7 +76,7 @@ public class StTaskController extends BaseController
|
||||
/**
|
||||
* 获取任务详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('task:query')")
|
||||
@PreAuthorize("@ss.hasPermi('task:list')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
@ -93,7 +96,7 @@ public class StTaskController extends BaseController
|
||||
stTask.setUpdateTime(new Date());
|
||||
stTaskService.insertStTask(stTask);
|
||||
|
||||
String url = "http://yg.pusonggroup.com:81/index.html?id=" + stTask.getId();
|
||||
String url = "http://www.tulkj.cn:81/index.html?id=" + stTask.getId();
|
||||
InputStream inputStream = QRCodeGenerator.generateQRCodeImage(url, 500, 500);
|
||||
String fileName = System.currentTimeMillis() + stTask.getId() + ".png";
|
||||
try {
|
||||
@ -118,10 +121,30 @@ public class StTaskController extends BaseController
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody StTask stTask)
|
||||
{
|
||||
//已发放金额的任务不许删除
|
||||
StTask stTask1 = stTaskService.selectStTaskById(stTask.getId(), true);
|
||||
for (StTaskSign stTaskSign : stTask1.getListSign()) {
|
||||
if (stTaskSign.getStEmployeeFundRecord().getPayStatus() == 1){
|
||||
return error("已发薪的任务禁止修改");
|
||||
}
|
||||
}
|
||||
|
||||
stTask.setUpdateTime(new Date());
|
||||
return toAjax(stTaskService.updateStTask(stTask));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改任务
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('task:edit')")
|
||||
@Log(title = "任务", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("shangjia")
|
||||
public AjaxResult shangjia(@RequestBody StTask stTask)
|
||||
{
|
||||
stTask.setUpdateTime(new Date());
|
||||
return toAjax(stTaskService.updateStTask(stTask, false));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除任务
|
||||
*/
|
||||
@ -130,6 +153,16 @@ public class StTaskController extends BaseController
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
//已发放金额的任务不许删除
|
||||
for (Long id : ids) {
|
||||
StTask stTask = stTaskService.selectStTaskById(id, true);
|
||||
for (StTaskSign stTaskSign : stTask.getListSign()) {
|
||||
if (stTaskSign.getStEmployeeFundRecord().getPayStatus() == 1){
|
||||
return error("已发薪的任务禁止删除");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return toAjax(stTaskService.deleteStTaskByIds(ids));
|
||||
}
|
||||
}
|
||||
|
@ -45,6 +45,14 @@ public class StTaskSignController extends BaseController
|
||||
List<StTaskSign> list = stTaskSignService.selectStTaskSignList(stTaskSign);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('taskSign:sign:list')")
|
||||
@GetMapping("/selectStTaskSignByTaskIds")
|
||||
public TableDataInfo selectStTaskSignByTaskIds(Long taskId)
|
||||
{
|
||||
startPage();
|
||||
List<StTaskSign> list = stTaskSignService.selectStTaskSignByTaskIds(taskId);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出签到列表
|
||||
@ -56,7 +64,9 @@ public class StTaskSignController extends BaseController
|
||||
{
|
||||
List<StTaskSign> list = stTaskSignService.selectStTaskSignList(stTaskSign);
|
||||
for (StTaskSign taskSign : list) {
|
||||
if (taskSign.getStatus() == 0){
|
||||
if (taskSign.getStatus() == -1){
|
||||
taskSign.setStatusStr("未点名");
|
||||
}else if (taskSign.getStatus() == 0){
|
||||
taskSign.setStatusStr("未签到");
|
||||
}else {
|
||||
taskSign.setStatusStr("已签到");
|
||||
|
@ -11,6 +11,7 @@ import com.staffing.custom.domain.StTaskSign;
|
||||
import com.staffing.custom.service.IStEmployeeService;
|
||||
import com.staffing.custom.service.IStTaskService;
|
||||
import com.staffing.custom.service.IStTaskSignService;
|
||||
import com.staffing.framework.web.service.TokenService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -37,6 +38,8 @@ public class EmployeeTaskController extends BaseController
|
||||
|
||||
@Autowired
|
||||
private IStEmployeeService stEmployeeService;
|
||||
@Autowired
|
||||
private TokenService tokenService;
|
||||
/**
|
||||
* 查询任务列表
|
||||
*/
|
||||
@ -52,17 +55,17 @@ public class EmployeeTaskController extends BaseController
|
||||
stTask.setStatus(1);
|
||||
// 获取当前时间
|
||||
ZonedDateTime now = ZonedDateTime.now();
|
||||
// 将当前时间加上一天,然后设置为0点0分
|
||||
ZonedDateTime nextDayStart = now.plusDays(1).truncatedTo(ChronoUnit.DAYS);
|
||||
Date nextDayZero = Date.from(nextDayStart.toInstant());
|
||||
// 今日0点
|
||||
ZonedDateTime nextDayStart = now.plusDays(0).truncatedTo(ChronoUnit.DAYS);
|
||||
Date dayZero = Date.from(nextDayStart.toInstant());
|
||||
|
||||
if (stTask.getDateStatus() != 0){
|
||||
stTask.setTaskDateCompare(nextDayZero);
|
||||
stTask.setTaskDateCompare(dayZero);
|
||||
}
|
||||
SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||
long userId = user.getUserId();
|
||||
List<StTask> list;
|
||||
stTask.getParams().put("order", nextDayZero);
|
||||
stTask.getParams().put("order", dayZero);
|
||||
if (!self){
|
||||
list = stTaskService.selectStTaskList(stTask, userId);
|
||||
}else{
|
||||
@ -77,6 +80,25 @@ public class EmployeeTaskController extends BaseController
|
||||
@GetMapping("/baoming")
|
||||
public AjaxResult baoming(StTaskSign taskSign)
|
||||
{
|
||||
SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||
long userId = user.getUserId();
|
||||
|
||||
StEmployee stEmploye = new StEmployee();
|
||||
stEmploye.setId(userId);
|
||||
stEmploye.setRealName(taskSign.getEmployeeName());
|
||||
stEmploye.setIdCard(taskSign.getIdCard());
|
||||
stEmployeeService.updateStEmployee(stEmploye);
|
||||
|
||||
|
||||
user = SecurityUtils.getLoginUser().getUser();
|
||||
user.setNickName(taskSign.getEmployeeName());
|
||||
user.setPhonenumber(taskSign.getPhone());
|
||||
user.setIdCard(taskSign.getIdCard());
|
||||
tokenService.refreshToken(SecurityUtils.getLoginUser());
|
||||
|
||||
|
||||
|
||||
|
||||
return stTaskSignService.baoming(taskSign);
|
||||
}
|
||||
/**
|
||||
|
@ -182,7 +182,7 @@ public class EmployeeUserController extends BaseController
|
||||
{
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
// 生成令牌
|
||||
String token = loginService.wxLogin(loginBody.getLoginCode(), loginBody.getPhoneCode());
|
||||
String token = loginService.wxLogin(loginBody.getLoginCode(), loginBody.getPhoneCode(), 1);
|
||||
ajax.put(Constants.TOKEN, token);
|
||||
return ajax;
|
||||
}
|
||||
@ -206,6 +206,12 @@ public class EmployeeUserController extends BaseController
|
||||
ajax.put("permissions", permissions);
|
||||
return ajax;
|
||||
}
|
||||
@GetMapping("verifyToken")
|
||||
public AjaxResult verifyToken()
|
||||
{
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
return ajax;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取路由信息
|
||||
|
@ -52,12 +52,12 @@ public class MerchantTaskController extends BaseController
|
||||
// 获取当前时间
|
||||
ZonedDateTime now = ZonedDateTime.now();
|
||||
// 将当前时间加上一天,然后设置为0点0分
|
||||
ZonedDateTime nextDayStart = now.plusDays(1).truncatedTo(ChronoUnit.DAYS);
|
||||
Date nextDayZero = Date.from(nextDayStart.toInstant());
|
||||
ZonedDateTime nextDayStart = now.plusDays(0).truncatedTo(ChronoUnit.DAYS);
|
||||
Date dayZero = Date.from(nextDayStart.toInstant());
|
||||
if (stTask.getDateStatus() != 0){
|
||||
stTask.setTaskDateCompare(nextDayZero);
|
||||
stTask.setTaskDateCompare(dayZero);
|
||||
}
|
||||
stTask.getParams().put("order", nextDayZero);
|
||||
stTask.getParams().put("order", dayZero);
|
||||
List<StTask> list = stTaskService.selectStTaskList(stTask, 0);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
@ -170,8 +170,9 @@ public class MerchantUserController extends BaseController
|
||||
{
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
// 生成令牌
|
||||
String token = loginService.wxMerchantLogin(loginBody.getLoginCode(), loginBody.getPhoneCode());
|
||||
String token = loginService.wxLogin(loginBody.getLoginCode(), loginBody.getPhoneCode(), loginBody.getType());
|
||||
ajax.put(Constants.TOKEN, token);
|
||||
ajax.put("role", loginBody.getType());
|
||||
return ajax;
|
||||
}
|
||||
/**
|
||||
|
@ -6,9 +6,9 @@ spring:
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:mysql://192.168.18.119:3307/staffing?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
url: jdbc:mysql://192.168.18.119:3308/staffing?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: Ps123456@
|
||||
password: Ps123456
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
|
@ -34,8 +34,8 @@ server:
|
||||
# 日志配置
|
||||
logging:
|
||||
level:
|
||||
com.staffing: debug
|
||||
org.springframework: warn
|
||||
com.staffing: DEBUG
|
||||
org.springframework: WARN
|
||||
|
||||
# 用户配置
|
||||
user:
|
||||
@ -165,7 +165,7 @@ xss:
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||
|
||||
minio:
|
||||
ip: 120.55.69.166
|
||||
ip: 8.155.21.176
|
||||
port: 9000
|
||||
access-key: root
|
||||
secret-key: root_1234
|
||||
secret-key: root_6688
|
@ -110,6 +110,11 @@ public class Constants
|
||||
*/
|
||||
public static final String LOGIN_USER_KEY = "login_user_key";
|
||||
|
||||
/**
|
||||
* 已删除用户标记
|
||||
*/
|
||||
public static final String DELETED_USER_KEY = "deleted_user_key";
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
|
@ -93,11 +93,22 @@ public class SysUser extends BaseEntity
|
||||
|
||||
private String openId;
|
||||
|
||||
|
||||
private SysUser.ROLETYPE roleType;
|
||||
|
||||
public SysUser()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public SysUser.ROLETYPE getRoleType() {
|
||||
return roleType;
|
||||
}
|
||||
|
||||
public void setRoleType(SysUser.ROLETYPE roleType) {
|
||||
this.roleType = roleType;
|
||||
}
|
||||
|
||||
public String getOpenId() {
|
||||
return openId;
|
||||
}
|
||||
@ -341,4 +352,9 @@ public class SysUser extends BaseEntity
|
||||
.append("dept", getDept())
|
||||
.toString();
|
||||
}
|
||||
|
||||
public enum ROLETYPE{
|
||||
MERCHANT,
|
||||
EMPLOYEE;
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,19 @@ public class LoginBody
|
||||
private String loginCode;
|
||||
private String phoneCode;
|
||||
|
||||
/**
|
||||
* emum ROLETYPE
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getLoginCode() {
|
||||
return loginCode;
|
||||
}
|
||||
|
@ -10,8 +10,10 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class WxUtil {
|
||||
public final static String appId = "wx7bc7df6eb945a84f";
|
||||
public final static String secret = "60dc8f7e8c850dfbe0170acefa48070a";
|
||||
// public final static String appId = "wx7bc7df6eb945a84f";//ps
|
||||
// public final static String secret = "60dc8f7e8c850dfbe0170acefa48070a";//ps
|
||||
public final static String appId = "wx26e952dad7a8aae5";
|
||||
public final static String secret = "60a85e94d921a385ce52faaaed4a103b";
|
||||
|
||||
private static WxToken wxToken = null;
|
||||
|
||||
|
@ -118,7 +118,22 @@ public class SysLoginService
|
||||
* 登录验证
|
||||
* @return 结果
|
||||
*/
|
||||
public String wxLogin(String loginCode, String phoneCode)
|
||||
public String wxLogin(String loginCode, String phoneCode, int type)
|
||||
{
|
||||
if (type == SysUser.ROLETYPE.EMPLOYEE.ordinal()){
|
||||
return wxEmployeeLogin(loginCode, phoneCode);
|
||||
}else{
|
||||
return wxMerchantLogin(loginCode, phoneCode);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 职工端 登录
|
||||
* @param loginCode
|
||||
* @param phoneCode
|
||||
* @return
|
||||
*/
|
||||
public String wxEmployeeLogin(String loginCode, String phoneCode)
|
||||
{
|
||||
|
||||
// 登录前置校验
|
||||
@ -150,6 +165,7 @@ public class SysLoginService
|
||||
user.setIdCard(stEmployee.getIdCard());
|
||||
user.setNickName(stEmployee.getRealName());
|
||||
user.setOpenId(stEmployee.getOpenId());
|
||||
user.setRoleType(SysUser.ROLETYPE.EMPLOYEE);
|
||||
loginUser = new LoginUser(stEmployee.getId(), 0l, user, new HashSet<>());
|
||||
}
|
||||
catch (Exception e)
|
||||
@ -193,9 +209,8 @@ public class SysLoginService
|
||||
{
|
||||
throw new ServiceException(MessageUtils.message("user.blocked"));
|
||||
}
|
||||
|
||||
user.setRoleType(SysUser.ROLETYPE.MERCHANT);
|
||||
loginUser = createLoginUser(user);
|
||||
|
||||
recordLoginInfo(loginUser.getUserId());
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -4,6 +4,8 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.staffing.common.core.domain.entity.SysUser;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -23,6 +25,8 @@ import io.jsonwebtoken.Claims;
|
||||
import io.jsonwebtoken.Jwts;
|
||||
import io.jsonwebtoken.SignatureAlgorithm;
|
||||
|
||||
import static com.staffing.common.constant.Constants.DELETED_USER_KEY;
|
||||
|
||||
/**
|
||||
* token验证处理
|
||||
*
|
||||
@ -72,6 +76,20 @@ public class TokenService
|
||||
String uuid = (String) claims.get(Constants.LOGIN_USER_KEY);
|
||||
String userKey = getTokenKey(uuid);
|
||||
LoginUser user = redisCache.getCacheObject(userKey);
|
||||
Object cacheMapValue = redisCache.getCacheMapValue(DELETED_USER_KEY, user.getUserId() + "");
|
||||
if (cacheMapValue != null){
|
||||
return null;
|
||||
}
|
||||
|
||||
if (user.getUser().getRoleType() != null){
|
||||
if (user.getUser().getRoleType() != SysUser.ROLETYPE.MERCHANT && request.getServletPath().indexOf("/merchant/") > -1){
|
||||
return null;
|
||||
}
|
||||
if (user.getUser().getRoleType() != SysUser.ROLETYPE.EMPLOYEE && request.getServletPath().indexOf("/employee/") > -1){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return user;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -38,7 +38,7 @@ public class StTask extends BaseEntity
|
||||
|
||||
/** 用工数量 */
|
||||
@Excel(name = "用工数量")
|
||||
private int useNum;
|
||||
private Integer useNum;
|
||||
|
||||
/** 二维码 */
|
||||
@Excel(name = "二维码")
|
||||
@ -57,20 +57,21 @@ public class StTask extends BaseEntity
|
||||
private Date createTime;
|
||||
|
||||
@Excel(name = "报名人数")
|
||||
private int baomingNum;
|
||||
private Integer baomingNum;
|
||||
|
||||
@Excel(name = "签到数量")
|
||||
private int signNum;
|
||||
private Integer signNum;//已到人数
|
||||
|
||||
//组装参数
|
||||
private List<StTaskSign> listSign;
|
||||
private StTaskSign selfSign;
|
||||
private int yfNum;
|
||||
private int sfNum;
|
||||
private int dfNum;
|
||||
private Integer yfNum;
|
||||
private Integer sfNum;
|
||||
private Integer dfNum;
|
||||
private String yfPrice;
|
||||
private String sfPrice;
|
||||
private String dfPrice;
|
||||
private Integer noSignNum;//未到人数
|
||||
|
||||
//查询参数
|
||||
/**0全部 1进行中 2已结束 根据时间查询的参数 */
|
||||
@ -83,6 +84,14 @@ public class StTask extends BaseEntity
|
||||
private Collection<Long> taskIds;
|
||||
|
||||
|
||||
public Integer getNoSignNum() {
|
||||
return noSignNum;
|
||||
}
|
||||
|
||||
public void setNoSignNum(Integer noSignNum) {
|
||||
this.noSignNum = noSignNum;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
@ -120,49 +129,12 @@ public class StTask extends BaseEntity
|
||||
this.dfPrice = dfPrice;
|
||||
}
|
||||
|
||||
public int getYfNum() {
|
||||
return yfNum;
|
||||
}
|
||||
|
||||
public void setYfNum(int yfNum) {
|
||||
this.yfNum = yfNum;
|
||||
}
|
||||
|
||||
public int getSfNum() {
|
||||
return sfNum;
|
||||
}
|
||||
|
||||
public void setSfNum(int sfNum) {
|
||||
this.sfNum = sfNum;
|
||||
}
|
||||
|
||||
public int getDfNum() {
|
||||
return dfNum;
|
||||
}
|
||||
|
||||
public void setDfNum(int dfNum) {
|
||||
this.dfNum = dfNum;
|
||||
}
|
||||
|
||||
public void setListSign(List<StTaskSign> listSign) {
|
||||
this.listSign = listSign;
|
||||
}
|
||||
|
||||
public int getBaomingNum() {
|
||||
return baomingNum;
|
||||
}
|
||||
|
||||
public void setBaomingNum(int baomingNum) {
|
||||
this.baomingNum = baomingNum;
|
||||
}
|
||||
|
||||
public int getSignNum() {
|
||||
return signNum;
|
||||
}
|
||||
|
||||
public void setSignNum(int signNum) {
|
||||
this.signNum = signNum;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
@ -200,15 +172,7 @@ public class StTask extends BaseEntity
|
||||
{
|
||||
return dayPrice;
|
||||
}
|
||||
public void setUseNum(int useNum)
|
||||
{
|
||||
this.useNum = useNum;
|
||||
}
|
||||
|
||||
public int getUseNum()
|
||||
{
|
||||
return useNum;
|
||||
}
|
||||
public void setCodePic(String codePic)
|
||||
{
|
||||
this.codePic = codePic;
|
||||
@ -218,15 +182,7 @@ public class StTask extends BaseEntity
|
||||
{
|
||||
return codePic;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
@ -242,6 +198,62 @@ public class StTask extends BaseEntity
|
||||
.toString();
|
||||
}
|
||||
|
||||
public Integer getUseNum() {
|
||||
return useNum;
|
||||
}
|
||||
|
||||
public void setUseNum(Integer useNum) {
|
||||
this.useNum = useNum;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getBaomingNum() {
|
||||
return baomingNum;
|
||||
}
|
||||
|
||||
public void setBaomingNum(Integer baomingNum) {
|
||||
this.baomingNum = baomingNum;
|
||||
}
|
||||
|
||||
public Integer getSignNum() {
|
||||
return signNum;
|
||||
}
|
||||
|
||||
public void setSignNum(Integer signNum) {
|
||||
this.signNum = signNum;
|
||||
}
|
||||
|
||||
public Integer getYfNum() {
|
||||
return yfNum;
|
||||
}
|
||||
|
||||
public void setYfNum(Integer yfNum) {
|
||||
this.yfNum = yfNum;
|
||||
}
|
||||
|
||||
public Integer getSfNum() {
|
||||
return sfNum;
|
||||
}
|
||||
|
||||
public void setSfNum(Integer sfNum) {
|
||||
this.sfNum = sfNum;
|
||||
}
|
||||
|
||||
public Integer getDfNum() {
|
||||
return dfNum;
|
||||
}
|
||||
|
||||
public void setDfNum(Integer dfNum) {
|
||||
this.dfNum = dfNum;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
|
@ -54,7 +54,9 @@ public class StTaskSign extends BaseEntity
|
||||
/** 签到状态 */
|
||||
@Excel(name = "签到状态")
|
||||
private String statusStr;
|
||||
|
||||
/**
|
||||
* -1未点 0未到 1已到
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
@Excel(name = "二次核验备注")
|
||||
|
@ -49,6 +49,8 @@ public interface StEmployeeFundRecordMapper
|
||||
*/
|
||||
public int updateStEmployeeFundRecord(StEmployeeFundRecord stEmployeeFundRecord);
|
||||
public int updateStEmployeeFundRecordByTaskAndUid(StEmployeeFundRecord stEmployeeFundRecord);
|
||||
public int updateStEmployeeFundRecordByTask(StEmployeeFundRecord stEmployeeFundRecord);
|
||||
public int updateStEmployeeFundRecordByEmId(StEmployeeFundRecord stEmployeeFundRecord);
|
||||
|
||||
/**
|
||||
* 删除员工资金流水
|
||||
@ -65,4 +67,7 @@ public interface StEmployeeFundRecordMapper
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStEmployeeFundRecordByIds(Long[] ids);
|
||||
|
||||
public int deleteStEmployeeFundRecordByUidAndTaskId(@Param("taskId") Long taskId, @Param("employeeId") Long employeeId);
|
||||
|
||||
}
|
||||
|
@ -48,6 +48,9 @@ public interface StTaskSignMapper
|
||||
*/
|
||||
public int updateStTaskSign(StTaskSign stTaskSign);
|
||||
|
||||
int updateStTaskSignByEmId(StTaskSign stTaskSign);
|
||||
|
||||
int updateStTaskSignByTaskId(StTaskSign stTaskSign);
|
||||
|
||||
int updateStTaskSignByTaskIdAndEmId(StTaskSign stTaskSign);
|
||||
/**
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.staffing.custom.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.staffing.custom.domain.StEmployee;
|
||||
import com.staffing.custom.domain.StTask;
|
||||
|
||||
/**
|
||||
@ -58,7 +60,7 @@ public interface IStTaskService
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateStTask(StTask stTask);
|
||||
|
||||
public int updateStTask(StTask stTask, boolean syncRelationsTabel);
|
||||
/**
|
||||
* 批量删除任务
|
||||
*
|
||||
@ -74,4 +76,6 @@ public interface IStTaskService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStTaskById(Long id);
|
||||
|
||||
void updateTaskUserInfo(StEmployee stEmployee);
|
||||
}
|
||||
|
@ -29,6 +29,8 @@ public interface IStTaskSignService
|
||||
*/
|
||||
public List<StTaskSign> selectStTaskSignList(StTaskSign stTaskSign);
|
||||
|
||||
List<StTaskSign> selectStTaskSignByTaskIds(Long taskId);
|
||||
|
||||
AjaxResult baoming(StTaskSign taskSign);
|
||||
/**
|
||||
* 新增签到
|
||||
|
@ -1,8 +1,17 @@
|
||||
package com.staffing.custom.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.staffing.common.core.domain.entity.SysUser;
|
||||
import com.staffing.common.utils.DateUtils;
|
||||
import com.staffing.common.utils.SecurityUtils;
|
||||
import com.staffing.custom.domain.StEmployeeFundRecord;
|
||||
import com.staffing.custom.domain.StTaskSign;
|
||||
import com.staffing.custom.mapper.StEmployeeFundRecordMapper;
|
||||
import com.staffing.custom.mapper.StTaskSignMapper;
|
||||
import com.staffing.custom.service.IStTaskService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.core.userdetails.User;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.staffing.custom.mapper.StEmployeeMapper;
|
||||
import com.staffing.custom.domain.StEmployee;
|
||||
@ -20,6 +29,14 @@ public class StEmployeeServiceImpl implements IStEmployeeService
|
||||
@Autowired
|
||||
private StEmployeeMapper stEmployeeMapper;
|
||||
|
||||
@Autowired
|
||||
private StTaskSignMapper stTaskSignMapper;
|
||||
|
||||
@Autowired
|
||||
private StEmployeeFundRecordMapper stEmployeeFundRecordMapper;
|
||||
|
||||
@Autowired
|
||||
private IStTaskService stTaskService;
|
||||
/**
|
||||
* 查询员工
|
||||
*
|
||||
@ -69,6 +86,8 @@ public class StEmployeeServiceImpl implements IStEmployeeService
|
||||
@Override
|
||||
public int updateStEmployee(StEmployee stEmployee)
|
||||
{
|
||||
stTaskService.updateTaskUserInfo(stEmployee);
|
||||
|
||||
stEmployee.setUpdateTime(DateUtils.getNowDate());
|
||||
return stEmployeeMapper.updateStEmployee(stEmployee);
|
||||
}
|
||||
@ -76,10 +95,14 @@ public class StEmployeeServiceImpl implements IStEmployeeService
|
||||
@Override
|
||||
public int updateStEmployeeOrNull(StEmployee stEmployee)
|
||||
{
|
||||
stTaskService.updateTaskUserInfo(stEmployee);
|
||||
|
||||
stEmployee.setUpdateTime(DateUtils.getNowDate());
|
||||
return stEmployeeMapper.updateStEmployeeOrNull(stEmployee);
|
||||
stEmployeeMapper.updateStEmployeeOrNull(stEmployee);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 批量删除员工
|
||||
*
|
||||
|
@ -11,6 +11,7 @@ import java.util.stream.Collectors;
|
||||
import com.staffing.common.utils.DateUtils;
|
||||
import com.staffing.common.utils.MinioUtil;
|
||||
import com.staffing.common.utils.QRCodeGenerator;
|
||||
import com.staffing.custom.domain.StEmployee;
|
||||
import com.staffing.custom.domain.StEmployeeFundRecord;
|
||||
import com.staffing.custom.domain.StTaskSign;
|
||||
import com.staffing.custom.mapper.StEmployeeFundRecordMapper;
|
||||
@ -93,9 +94,12 @@ public class StTaskServiceImpl implements IStTaskService
|
||||
stTask.setListSign(stTaskSigns);
|
||||
|
||||
int signNum = 0;
|
||||
int noSignNum = 0;
|
||||
for (StTaskSign stTaskSign1 : stTaskSigns) {
|
||||
if (stTaskSign1.getStatus() == 1){
|
||||
signNum ++;
|
||||
}else if (stTaskSign1.getStatus() == 0){
|
||||
noSignNum++;
|
||||
}
|
||||
stTaskSign1.setTaskName(stTask.getTaskName());
|
||||
stTaskSign1.setDayPrice(stTask.getDayPrice());
|
||||
@ -103,6 +107,7 @@ public class StTaskServiceImpl implements IStTaskService
|
||||
stTaskSign1.setStEmployeeFundRecord(fundMap.get(stTaskSign1.getEmployeeId()));
|
||||
}
|
||||
stTask.setSignNum(signNum);
|
||||
stTask.setNoSignNum(noSignNum);
|
||||
stTask.setBaomingNum(stTask.getListSign().size());
|
||||
|
||||
return stTask;
|
||||
@ -172,6 +177,7 @@ public class StTaskServiceImpl implements IStTaskService
|
||||
continue;
|
||||
}
|
||||
int signNum = 0;
|
||||
int noSignNum = 0;
|
||||
int yfNum = 0;//应发
|
||||
int sfNum = 0;//实发
|
||||
int dfNum = 0;//待发
|
||||
@ -181,6 +187,15 @@ public class StTaskServiceImpl implements IStTaskService
|
||||
|
||||
|
||||
for (StTaskSign stTaskSign : task.getListSign()) {
|
||||
|
||||
|
||||
if (stTaskSign.getStatus() == 0){
|
||||
noSignNum++;
|
||||
}
|
||||
if (stTaskSign.getStatus() == 1){
|
||||
signNum ++;
|
||||
yfNum++;
|
||||
|
||||
if (employeeFundRecordMap != null){
|
||||
StEmployeeFundRecord fundRecord = employeeFundRecordMap.get(stTaskSign.getEmployeeId());
|
||||
if (fundRecord != null){
|
||||
@ -192,10 +207,6 @@ public class StTaskServiceImpl implements IStTaskService
|
||||
yfPrice = yfPrice.add(new BigDecimal(fundRecord.getRealPrice()));
|
||||
}
|
||||
}
|
||||
|
||||
if (stTaskSign.getStatus() == 1){
|
||||
signNum ++;
|
||||
yfNum++;
|
||||
}
|
||||
|
||||
stTaskSign.setTaskName(task.getTaskName());
|
||||
@ -216,6 +227,7 @@ public class StTaskServiceImpl implements IStTaskService
|
||||
task.setSfPrice(sfPrice.toString());
|
||||
task.setDfPrice(dfPrice.toString());
|
||||
task.setSignNum(signNum);
|
||||
task.setNoSignNum(noSignNum);
|
||||
task.setBaomingNum(task.getListSign().size());
|
||||
|
||||
}
|
||||
@ -262,7 +274,7 @@ public class StTaskServiceImpl implements IStTaskService
|
||||
List<StTaskSign> listSign = stTask.getListSign();
|
||||
for (StTaskSign stTaskSign : listSign) {
|
||||
stTaskSign.setTaskId(stTask.getId());
|
||||
stTaskSign.setStatus(0);
|
||||
stTaskSign.setStatus(-1);
|
||||
stTaskSign.setDayPrice(stTask.getDayPrice());
|
||||
stTaskSign.setTaskName(stTask.getTaskName());
|
||||
stTaskSignMapper.insertStTaskSign(stTaskSign);
|
||||
@ -270,6 +282,10 @@ public class StTaskServiceImpl implements IStTaskService
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateStTask(StTask stTask){
|
||||
return updateStTask(stTask, true);
|
||||
}
|
||||
/**
|
||||
* 修改任务
|
||||
*
|
||||
@ -277,12 +293,30 @@ public class StTaskServiceImpl implements IStTaskService
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateStTask(StTask stTask)
|
||||
public int updateStTask(StTask stTask, boolean syncRelationsTabel)
|
||||
{
|
||||
RLock lock = redissonClient.getLock(stTask.getId() + "");
|
||||
try {
|
||||
lock.lock();
|
||||
|
||||
if (syncRelationsTabel){
|
||||
//签到表
|
||||
StTaskSign stTaskSignUpdate = new StTaskSign();
|
||||
stTaskSignUpdate.setTaskName(stTask.getTaskName());
|
||||
stTaskSignUpdate.setDayPrice(stTask.getDayPrice());
|
||||
stTaskSignUpdate.setTaskId(stTask.getId());
|
||||
stTaskSignMapper.updateStTaskSignByTaskId(stTaskSignUpdate);
|
||||
|
||||
//流水表
|
||||
StEmployeeFundRecord stEmployeeFundRecord = new StEmployeeFundRecord();
|
||||
stEmployeeFundRecord.setTaskName(stTask.getTaskName());
|
||||
stEmployeeFundRecord.setDayPrice(stTask.getDayPrice());
|
||||
stEmployeeFundRecord.setTaskId(stTask.getId());
|
||||
stEmployeeFundRecord.setRealPrice(stTask.getDayPrice());
|
||||
stEmployeeFundRecord.setTaskDate(stTask.getTaskDate());
|
||||
stEmployeeFundRecordMapper.updateStEmployeeFundRecordByTask(stEmployeeFundRecord);
|
||||
}
|
||||
|
||||
stTask.setUpdateTime(DateUtils.getNowDate());
|
||||
|
||||
StTaskSign param = new StTaskSign();
|
||||
@ -296,12 +330,11 @@ public class StTaskServiceImpl implements IStTaskService
|
||||
List<StTaskSign> listSign = stTask.getListSign();
|
||||
if (listSign != null) {
|
||||
for (StTaskSign stTaskSign : listSign) {
|
||||
if (!stTaskSignMap.containsKey(stTaskSign.getEmployeeId())) {
|
||||
stTaskSign.setTaskId(stTask.getId());
|
||||
stTaskSign.setStatus(0);
|
||||
stTaskSign.setStatus(-1);
|
||||
stTaskSign.setDayPrice(stTask.getDayPrice());
|
||||
stTaskSign.setTaskName(stTask.getTaskName());
|
||||
|
||||
if (!stTaskSignMap.containsKey(stTaskSign.getEmployeeId())) {
|
||||
stTaskSignMapper.insertStTaskSign(stTaskSign);
|
||||
}
|
||||
stTaskSignMap.remove(stTaskSign.getEmployeeId());
|
||||
@ -323,7 +356,7 @@ public class StTaskServiceImpl implements IStTaskService
|
||||
}
|
||||
|
||||
public int generatePrCode(StTask stTask){
|
||||
String url = "http://yg.pusonggroup.com:81/index.html?id=" + stTask.getId();
|
||||
String url = "http://www.tulkj.cn:81/index.html?id=" + stTask.getId();
|
||||
InputStream inputStream = QRCodeGenerator.generateQRCodeImage(url, 500, 500);
|
||||
String fileName = System.currentTimeMillis() + stTask.getId() + ".png";
|
||||
try {
|
||||
@ -361,4 +394,21 @@ public class StTaskServiceImpl implements IStTaskService
|
||||
{
|
||||
return stTaskMapper.deleteStTaskById(id);
|
||||
}
|
||||
|
||||
|
||||
public void updateTaskUserInfo(StEmployee stEmployee) {
|
||||
//将相关报名信息修改
|
||||
StTaskSign stTaskSign = new StTaskSign();
|
||||
stTaskSign.setEmployeeId(stEmployee.getId());
|
||||
stTaskSign.setEmployeeName(stEmployee.getRealName());
|
||||
stTaskSign.setIdCard(stEmployee.getIdCard());
|
||||
stTaskSignMapper.updateStTaskSignByEmId(stTaskSign);
|
||||
|
||||
|
||||
StEmployeeFundRecord stEmployeeFundRecord = new StEmployeeFundRecord();
|
||||
stEmployeeFundRecord.setEmployeeId(stEmployee.getId());
|
||||
stEmployeeFundRecord.setEmployeeName(stEmployee.getRealName());
|
||||
stEmployeeFundRecord.setIdCard(stEmployee.getIdCard());
|
||||
stEmployeeFundRecordMapper.updateStEmployeeFundRecordByEmId(stEmployeeFundRecord);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.staffing.custom.service.impl;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@ -65,12 +66,19 @@ public class StTaskSignServiceImpl implements IStTaskSignService
|
||||
return stTaskSignMapper.selectStTaskSignList(stTaskSign);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<StTaskSign> selectStTaskSignByTaskIds(Long taskId)
|
||||
{
|
||||
return stTaskSignMapper.selectStTaskSignByTaskIds(Arrays.asList(taskId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult baoming(StTaskSign taskSign)
|
||||
{
|
||||
RLock lock = redissonClient.getLock(taskSign.getTaskId() + "");
|
||||
try{
|
||||
lock.lock();
|
||||
|
||||
SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||
long userId = user.getUserId();
|
||||
taskSign.setEmployeeId(userId);
|
||||
@ -86,8 +94,8 @@ public class StTaskSignServiceImpl implements IStTaskSignService
|
||||
}
|
||||
taskSign.setDayPrice(stTask.getDayPrice());
|
||||
taskSign.setEmployeeName(taskSign.getEmployeeName());
|
||||
taskSign.setStatus(0);
|
||||
return AjaxResult.success();
|
||||
taskSign.setStatus(-1);//未点名
|
||||
return AjaxResult.success(insertStTaskSign(taskSign));
|
||||
}finally {
|
||||
// 锁被持有
|
||||
if (lock != null && lock.isLocked()) {
|
||||
@ -136,9 +144,14 @@ public class StTaskSignServiceImpl implements IStTaskSignService
|
||||
updateStTaskSign.setSignTime(new Date());
|
||||
return insertStTaskSign(updateStTaskSign);
|
||||
}
|
||||
if (stTaskSign.getSignTime() == null && stTaskSign.getStatus() == 0 && updateStTaskSign.getStatus() == 1){
|
||||
if (stTaskSign.getSignTime() == null && (stTaskSign.getStatus() == 0 || stTaskSign.getStatus() == -1) && updateStTaskSign.getStatus() == 1){
|
||||
updateStTaskSign.setSignTime(new Date());
|
||||
}
|
||||
if (updateStTaskSign.getStatus() == 0){
|
||||
updateStTaskSign.setSignTime(null);
|
||||
}
|
||||
if (stTaskSign == null || updateStTaskSign.getStatus() != stTaskSign.getStatus()){
|
||||
if (updateStTaskSign.getStatus() == 1){
|
||||
StEmployeeFundRecord fundRecords = stEmployeeFundRecordMapper.selectStEmployeeFundRecordByUidAndTaskId(stTaskSign.getTaskId(), stTaskSign.getEmployeeId());
|
||||
if (fundRecords == null){
|
||||
StTask stTask = stTaskService.selectStTaskById(stTaskSign.getTaskId());
|
||||
@ -161,6 +174,12 @@ public class StTaskSignServiceImpl implements IStTaskSignService
|
||||
stEmployeeFundRecord.setTransferNo(OrderUtils.genOrderId("D"));
|
||||
employeeFundRecordService.insertStEmployeeFundRecord(stEmployeeFundRecord);
|
||||
}
|
||||
}else{
|
||||
stEmployeeFundRecordMapper.deleteStEmployeeFundRecordByUidAndTaskId(stTaskSign.getTaskId(), stTaskSign.getEmployeeId());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return updateStTaskSignByTaskIdAndEmId(updateStTaskSign);
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
</update>
|
||||
|
||||
|
||||
<update id="updateStEmployeeFundRecordByEmId" parameterType="StEmployeeFundRecord">
|
||||
update st_employee_fund_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="taskId != null">task_id = #{taskId},</if>
|
||||
<if test="taskName != null">task_name = #{taskName},</if>
|
||||
<if test="taskDate != null">task_date = #{taskDate},</if>
|
||||
<if test="employeeId != null">employee_id = #{employeeId},</if>
|
||||
<if test="employeeName != null">employee_name = #{employeeName},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="idCard != null">id_card = #{idCard},</if>
|
||||
<if test="dayPrice != null">day_price = #{dayPrice},</if>
|
||||
<if test="shouldPrice != null">should_price = #{shouldPrice},</if>
|
||||
<if test="realPrice != null">real_price = #{realPrice},</if>
|
||||
<if test="payWay != null">pay_way = #{payWay},</if>
|
||||
<if test="payAccount != null">pay_account = #{payAccount},</if>
|
||||
<if test="payTime != null">pay_time = #{payTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="payStatus != null">pay_status = #{payStatus},</if>
|
||||
<if test="transferNo != null">transfer_no = #{transferNo},</if>
|
||||
</trim>
|
||||
where employee_id = #{employeeId}
|
||||
</update>
|
||||
<update id="updateStEmployeeFundRecordByTaskAndUid" parameterType="StEmployeeFundRecord">
|
||||
update st_employee_fund_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
@ -160,6 +181,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where task_id = #{taskId}
|
||||
and employee_id = #{employeeId}
|
||||
</update>
|
||||
<update id="updateStEmployeeFundRecordByTask" parameterType="StEmployeeFundRecord">
|
||||
update st_employee_fund_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="taskId != null">task_id = #{taskId},</if>
|
||||
<if test="taskName != null">task_name = #{taskName},</if>
|
||||
<if test="taskDate != null">task_date = #{taskDate},</if>
|
||||
<if test="employeeId != null">employee_id = #{employeeId},</if>
|
||||
<if test="employeeName != null">employee_name = #{employeeName},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="idCard != null">id_card = #{idCard},</if>
|
||||
<if test="dayPrice != null">day_price = #{dayPrice},</if>
|
||||
<if test="shouldPrice != null">should_price = #{shouldPrice},</if>
|
||||
<if test="realPrice != null">real_price = #{realPrice},</if>
|
||||
<if test="payWay != null">pay_way = #{payWay},</if>
|
||||
<if test="payAccount != null">pay_account = #{payAccount},</if>
|
||||
<if test="payTime != null">pay_time = #{payTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="payStatus != null">pay_status = #{payStatus},</if>
|
||||
<if test="transferNo != null">transfer_no = #{transferNo},</if>
|
||||
</trim>
|
||||
where task_id = #{taskId}
|
||||
</update>
|
||||
<delete id="deleteStEmployeeFundRecordById" parameterType="Long">
|
||||
delete from st_employee_fund_record where id = #{id}
|
||||
</delete>
|
||||
@ -170,4 +213,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<delete id="deleteStEmployeeFundRecordByUidAndTaskId">
|
||||
delete from st_employee_fund_record
|
||||
where task_id = #{taskId}
|
||||
and employee_id = #{employeeId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -23,7 +23,7 @@
|
||||
<select id="selectStTaskList" parameterType="StTask" resultMap="StTaskResult">
|
||||
select id, task_name, task_date, day_price, use_num, code_pic, status, update_time, create_time
|
||||
<if test="params.order != null">
|
||||
, (task_date > #{params.order,jdbcType=DATE}) as progress_status
|
||||
, (task_date >= #{params.order,jdbcType=DATE}) as progress_status
|
||||
</if>
|
||||
from st_task
|
||||
|
||||
@ -49,7 +49,9 @@
|
||||
<if test="params.order != null">
|
||||
order by progress_status desc, create_time desc
|
||||
</if>
|
||||
|
||||
<if test="params.order == null">
|
||||
order by create_time desc
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
|
@ -99,8 +99,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updateStTaskSignByEmId" parameterType="StTaskSign">
|
||||
update st_task_sign
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="taskId != null">task_id = #{taskId},</if>
|
||||
<if test="taskName != null">task_name = #{taskName},</if>
|
||||
<if test="dayPrice != null">day_price = #{dayPrice},</if>
|
||||
<if test="signTime != null">sign_time = #{signTime},</if>
|
||||
<if test="employeeId != null">employee_id = #{employeeId},</if>
|
||||
<if test="employeeName != null">employee_name = #{employeeName},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="idCard != null">id_card = #{idCard},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where employee_id = #{employeeId}
|
||||
</update>
|
||||
|
||||
|
||||
<update id="updateStTaskSignByTaskIdAndEmId" parameterType="StTaskSign">
|
||||
update st_task_sign
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="taskName != null">task_name = #{taskName},</if>
|
||||
<if test="dayPrice != null">day_price = #{dayPrice},</if>
|
||||
sign_time = #{signTime},
|
||||
<if test="employeeName != null">employee_name = #{employeeName},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="idCard != null">id_card = #{idCard},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where task_id = #{taskId} and employee_id = #{employeeId}
|
||||
</update>
|
||||
|
||||
<update id="updateStTaskSignByTaskId" parameterType="StTaskSign">
|
||||
update st_task_sign
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="taskName != null">task_name = #{taskName},</if>
|
||||
@ -112,9 +144,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where task_id = #{taskId} and employee_id = #{employeeId}
|
||||
where task_id = #{taskId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteStTaskSignById" parameterType="Long">
|
||||
delete from st_task_sign where id = #{id}
|
||||
</delete>
|
||||
|
@ -6,3 +6,6 @@ ENV = 'production'
|
||||
|
||||
# 管理系统/生产环境
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
|
||||
port = 8089
|
||||
npm_config_port = 8089
|
||||
|
@ -72,6 +72,7 @@
|
||||
"connect": "3.6.6",
|
||||
"eslint": "7.15.0",
|
||||
"eslint-plugin-vue": "7.2.0",
|
||||
"html-webpack-plugin": "^4.5.2",
|
||||
"lint-staged": "10.5.3",
|
||||
"runjs": "4.4.2",
|
||||
"sass": "1.32.13",
|
||||
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 66 KiB |
@ -34,6 +34,15 @@ export function updateTask(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 修改任务
|
||||
export function shangjia(data) {
|
||||
return request({
|
||||
url: '/task/task/shangjia',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 删除任务
|
||||
export function delTask(id) {
|
||||
@ -42,3 +51,9 @@ export function delTask(id) {
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
export function getListSign(id) {
|
||||
return request({
|
||||
url: '/taskSign/sign/selectStTaskSignByTaskIds?taskId=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
Before Width: | Height: | Size: 509 KiB |
Before Width: | Height: | Size: 137 KiB |
Before Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 40 KiB |
@ -55,7 +55,7 @@ const user = {
|
||||
return new Promise((resolve, reject) => {
|
||||
getInfo().then(res => {
|
||||
const user = res.user
|
||||
const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar;
|
||||
const avatar = process.env.VUE_APP_BASE_API + user.avatar;
|
||||
if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
|
||||
commit('SET_ROLES', res.roles)
|
||||
commit('SET_PERMISSIONS', res.permissions)
|
||||
|
@ -90,6 +90,11 @@
|
||||
<el-table v-loading="loading" :data="employeeList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column hidden label="id" align="center" prop="id" />-->
|
||||
<el-table-column label="用工类型" align="center" prop="employeeType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.use_type" :value="scope.row.employeeType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="名字" align="center" prop="realName" />
|
||||
<el-table-column label="手机" align="center" prop="phone" />
|
||||
<el-table-column label="身份证" align="center" prop="idCard" />
|
||||
@ -114,11 +119,7 @@
|
||||
<el-table-column label="供应商" align="center" prop="supplier" />
|
||||
<el-table-column label="员工单价" align="center" prop="employeePrice" />
|
||||
<el-table-column label="供应商单价" align="center" prop="supplierPrice" />
|
||||
<el-table-column label="用工类型" align="center" prop="employeeType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.use_type" :value="scope.row.employeeType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="编辑时间" align="center" prop="updateTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.updateTime) }}</span>
|
||||
@ -153,62 +154,9 @@
|
||||
/>
|
||||
|
||||
<!-- 添加或修改员工对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
||||
<el-dialog :title="title" :visible.sync="open" width="1100px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" :inline="true">
|
||||
<el-form-item label="名字" prop="realName" label-width="100px">
|
||||
<el-input v-model="form.realName" placeholder="请输入名字" />
|
||||
</el-form-item>
|
||||
<el-form-item label="手机" prop="phone" label-width="100px">
|
||||
<el-input v-model="form.phone" placeholder="请输入手机" />
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证" prop="idCard" label-width="100px">
|
||||
<el-input v-model="form.idCard" placeholder="请输入身份证" />
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="sex" label-width="100px">
|
||||
<el-select v-model="form.sex" placeholder="请选择性别" style="width: 200px;" >
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_user_sex"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="parseInt(dict.value)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="民族" prop="nation" label-width="100px">
|
||||
<el-input v-model="form.nation" placeholder="请输入民族" />
|
||||
</el-form-item>
|
||||
<el-form-item label="年龄" prop="age" label-width="100px">
|
||||
<el-input v-model="form.age" placeholder="请输入年龄" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用工单位" prop="useUnit" label-width="100px">
|
||||
<el-input v-model="form.useUnit" placeholder="请输入用工单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="面试日期" prop="interviewDate" label-width="100px" >
|
||||
<el-date-picker clearable style="width: 200px;"
|
||||
v-model="form.interviewDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择面试日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="入职日期" prop="entryDate" label-width="100px">
|
||||
<el-date-picker clearable style="width: 200px;"
|
||||
v-model="form.entryDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择入职日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商" prop="supplier" label-width="100px">
|
||||
<el-input v-model="form.supplier" placeholder="请输入供应商" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="员工单价" prop="employeePrice" label-width="100px">
|
||||
<el-input v-model="form.employeePrice" placeholder="请输入员工单价" style="width: 192px;"/> 元
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商单价" prop="supplierPrice" label-width="100px">
|
||||
<el-input v-model="form.supplierPrice" placeholder="请输入供应商单价" style="width: 192px;"/> 元
|
||||
</el-form-item>
|
||||
<el-form-item label="用工类型" prop="employeeType" label-width="100px">
|
||||
<el-form-item label="用工类型" prop="employeeType" label-width="105px" style="width: 100%">
|
||||
<el-select style="width: 200px;" v-model="form.employeeType" placeholder="请选择用工类型">
|
||||
<el-option
|
||||
v-for="dict in dict.type.use_type"
|
||||
@ -218,6 +166,61 @@
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="名字" prop="realName" label-width="105px">
|
||||
<el-input v-model="form.realName" placeholder="请输入名字" />
|
||||
</el-form-item>
|
||||
<el-form-item label="手机" prop="phone" label-width="105px">
|
||||
<el-input v-model="form.phone" placeholder="请输入手机" :disabled="phoneInputDisable"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证" prop="idCard" label-width="105px">
|
||||
<el-input v-model="form.idCard" placeholder="请输入身份证" />
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="sex" label-width="105px">
|
||||
<el-select v-model="form.sex" placeholder="请选择性别" style="width: 200px;" >
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_user_sex"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="parseInt(dict.value)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="民族" prop="nation" label-width="105px">
|
||||
<el-input v-model="form.nation" placeholder="请输入民族" />
|
||||
</el-form-item>
|
||||
<el-form-item label="年龄" prop="age" label-width="105px">
|
||||
<el-input v-model="form.age" placeholder="请输入年龄" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用工单位" prop="useUnit" label-width="105px">
|
||||
<el-input v-model="form.useUnit" placeholder="请输入用工单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="面试日期" prop="interviewDate" label-width="105px" >
|
||||
<el-date-picker clearable style="width: 200px;"
|
||||
v-model="form.interviewDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择面试日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="入职日期" prop="entryDate" label-width="105px">
|
||||
<el-date-picker clearable style="width: 200px;"
|
||||
v-model="form.entryDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择入职日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商" prop="supplier" label-width="105px">
|
||||
<el-input v-model="form.supplier" placeholder="请输入供应商" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="员工单价" prop="employeePrice" label-width="105px">
|
||||
<el-input v-model="form.employeePrice" placeholder="请输入员工单价" style="width: 200px;"/> 元
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商单价" prop="supplierPrice" label-width="87px">
|
||||
<el-input v-model="form.supplierPrice" placeholder="请输入供应商单价" style="width: 200px;"/> 元
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
@ -278,6 +281,7 @@ export default {
|
||||
employeeType: [
|
||||
{ required: true, message: "用工类型不能为空", trigger: "change" }
|
||||
],
|
||||
phoneInputDisable: true,
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -341,9 +345,11 @@ export default {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加员工";
|
||||
this.phoneInputDisable = false;
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.phoneInputDisable = true;
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getEmployee(id).then(response => {
|
||||
@ -400,9 +406,4 @@ export default {
|
||||
};
|
||||
</script>
|
||||
|
||||
<style type="text/css">
|
||||
.from-input{
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -89,7 +89,7 @@
|
||||
icon="el-icon-upload"
|
||||
size="mini"
|
||||
@click="handleImport"
|
||||
v-hasPermi="['tool:gen:import']"
|
||||
v-hasPermi="['fund:fund:import']"
|
||||
>导入</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
|
@ -152,7 +152,7 @@ export default {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
background-image: url("../assets/images/login-background.jpg");
|
||||
background-image: url("../assets/images/bg.jpg");
|
||||
background-size: cover;
|
||||
}
|
||||
.title {
|
||||
|
@ -313,7 +313,7 @@
|
||||
|
||||
<div class="head">
|
||||
<div class="title">
|
||||
用工详情
|
||||
签到详情
|
||||
</div>
|
||||
<div class="close" @click="closeSignDialog()">
|
||||
X
|
||||
@ -368,6 +368,12 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="发放状态" align="center" prop="stEmployeeFundRecord.payStatus">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.pay_status" :value="scope.row.stEmployeeFundRecord == null ? 0 : scope.row.stEmployeeFundRecord.payStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column width="200" property="remark" label="二次核验备注说明"></el-table-column>
|
||||
</el-table>
|
||||
|
||||
@ -401,7 +407,7 @@
|
||||
background-color: #ffffff;
|
||||
border: 2px solid #000000;
|
||||
border-radius: 5px;
|
||||
/*width: 75%;*/
|
||||
width: 75%;
|
||||
height: 65%;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
@ -449,12 +455,12 @@
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import { listTask, getTask, delTask, addTask, updateTask } from "@/api/task/task";
|
||||
import { listTask, getTask, delTask, addTask, updateTask, shangjia, getListSign } from "@/api/task/task";
|
||||
import { listEmployee, getEmployee } from "@/api/employee/employee";
|
||||
import html2canvas from "html2canvas";
|
||||
export default {
|
||||
name: "Task",
|
||||
dicts: ['task_status', 'sign_status'],
|
||||
dicts: ['task_status', 'sign_status', 'pay_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
@ -631,13 +637,23 @@
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
//如果已经发薪,则不能修改
|
||||
if (row.listSign == null){
|
||||
row.listSign = [];
|
||||
}
|
||||
for (let i = 0; i < row.listSign.length; i++) {
|
||||
if (row.listSign[i].stEmployeeFundRecord != null && row.listSign[i].stEmployeeFundRecord.payStatus == 1){
|
||||
this.$modal.msgError("已有发薪记录,无法修改");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getTask(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改任务";
|
||||
console.log( row.listSign)
|
||||
for (let i = 0; i < row.listSign.length; i++) {
|
||||
row.listSign[i].realName = row.listSign[i].employeeName;
|
||||
this.addEmployeeMap.set(row.listSign[i].phone, row.listSign[i]);
|
||||
@ -651,7 +667,7 @@
|
||||
this.reset();
|
||||
this.form.id = row.id;
|
||||
this.form.status = status;
|
||||
updateTask(this.form).then(response => {
|
||||
shangjia(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
@ -703,7 +719,7 @@
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('确认要删除该任务吗?').then(function() {
|
||||
this.$modal.confirm('删除后签到记录也会同步进行删除,确认要删除该任务吗?').then(function() {
|
||||
return delTask(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
@ -726,10 +742,14 @@
|
||||
this.signDialogOpen = false;
|
||||
}else{
|
||||
this.signDialogOpen = true;
|
||||
this.listSign = row.listSign;
|
||||
this.signQueryParams.taskId = row.id;
|
||||
console.log(row);
|
||||
getListSign(row.id).then(response => {
|
||||
this.listSign = response.rows;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
closeSignDialog(){
|
||||
this.signDialogOpen = false;
|
||||
},
|
||||
@ -830,4 +850,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
.el-table:before {
|
||||
width: 0 !important;
|
||||
}
|
||||
</style>
|
||||
|