lsw пре 9 месеци
родитељ
комит
974b846531

+ 1 - 1
app/pages/job/detail.vue

@@ -1,5 +1,5 @@
 <template>
-	<view>
+	<view style="padding-bottom: 100px;">
 		<view class="dtop">
 			<view class="title">{{ item.title || '' }}</view>
 			<view class="price" v-if="item.type == 0">{{ item.salary == '面议' ? item.salary : item.salary + '/月' }}</view>

+ 3 - 3
app/pages/user/index.vue

@@ -183,7 +183,7 @@
 					<view class="int">
 						<view class="icon" style="background-color: #03a9f4">&#xe63c;</view>
 						<view class="title">甲方任务</view>
-						<view class="bage" v-if="user.completeApplication > 0">{{ user.completeApplication > 99 ? '99+' : user.completeApplication }}</view>
+						<view class="bage" v-if="user.completeApplication > 0">进行中</view>
 					</view>
 				</view>
 			</view>
@@ -273,10 +273,10 @@ export default {
 		};
 	},
 	onShow() {
- 		this.user = {
+/* 		this.user = {
 			token: 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjdhZGY4MzFmLWE0NjQtNGY5YS04YTY5LWMzM2QyNDU2MzI2ZSJ9.EPHElRmlVoFTfT4OxHNpvIC7bDKc1gKpNiO1u_dBOerYh5JFIuSrSkgp0PtQ0kOhO9iuvU0dttEGbsgofdrcpQ'
 		};
-		uni.setStorageSync('user', this.user);
+		uni.setStorageSync('user', this.user); */
 
 		if (this.hasLogin()) {
 			this.getUserInfo();

+ 7 - 7
app/pages/user/resume/application/task_detail.vue

@@ -6,9 +6,9 @@
 		<view class="mbos">
 			<view class="ms mt0">
 				<view class="mtitle">兼职金额</view>
-				<view class="desc mb15">{{ item.salary }}元</view>
+				<view class="desc mb15">{{ item.salary || '' }}元</view>
 				<view class="mtitle">兼职时间</view>
-				<view class="desc mb15">{{ item.startDate }}至{{ item.endDate }},共计:{{ item.days }}天</view>
+				<view class="desc mb15">{{ item.startDate || '' }}至{{ item.endDate || '' }},共计:{{ item.days }}天</view>
 				<view class="mtitle">兼职地点</view>
 				<view class="desc mb15">{{ item.address || '工作地点不限' }}</view>
 				<view class="mtitle">结算方式</view>
@@ -80,11 +80,11 @@ export default {
 							data: { id: this.obj.id },
 							method: 'POST',
 							success: (res) => {
-								//通知模板订阅消息
-								uni.requestSubscribeMessage({
-									tmplIds: ['87jYTnpeZJnvdQ6gHcscZ96eQYlSXpfGeFU3g9deTeA'],
-									complete: (c) => {
-										uni.showModal({ content: '提交完成申请成功,等待甲方确认', showCancel: false });
+								uni.showModal({
+									title: '提示',
+									content: '提交完成申请成功,等待甲方确认',
+									showCancel: false,
+									success: (res) => {
 										uni.$emit('task_to_do');
 										uni.navigateBack();
 									}

+ 1 - 1
app/pages/user/resume/application/task_to_do.vue

@@ -16,7 +16,7 @@
 				<view class="msg">驳回原因:{{ item.rejectMsg }}</view>
 			</view>
 			<view class="flex" v-if="param.role == 0">
-				<view class="f br agree" v-if="item.isComplete == 0">进行中...</view>
+				<view class="f br agree" v-if="item.isComplete == 0">请确认完成申请...</view>
 				<view class="f br agree" v-if="item.isComplete == 1">对方发起任务完成申请</view>
 				<view class="f br agree" v-if="item.isComplete == 2">已完成(打款)</view>
 				<view class="f br danger" v-if="item.isComplete == 3">申请驳回</view>

+ 6 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/domain/ResumeDeliver.java

@@ -51,6 +51,9 @@ public class ResumeDeliver {
     @ApiModelProperty(value = "是否完成:0=进行中,1=申请完成,2=确认完成,3=甲方驳回")
     private Integer isComplete;
 
+    @ApiModelProperty(value = "是否过期:0=未过期,1=已过期")
+    private Integer isExpire;
+
     @ApiModelProperty(value = "乙方完成说明")
     private String completeMsg;
 
@@ -78,6 +81,9 @@ public class ResumeDeliver {
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date updateTime;
 
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "审核时间")
+    private Date auditTime;
 
     /*****************查询字段*****************/
     @TableField(exist = false)

+ 2 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/work/domain/User.java

@@ -154,10 +154,10 @@ public class User {
     private String enterprise;
 
     @TableField(exist = false)
-    @ApiModelProperty(value = "甲方收到确认完成申请数")
+    @ApiModelProperty(value = "甲方正在进行任务数")
     private String completeApplication;
 
     @TableField(exist = false)
-    @ApiModelProperty(value = "已方收到申请完成驳回数")
+    @ApiModelProperty(value = "已方正在进行任务数")
     private String completeIng;
 }

+ 7 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/impl/PositionServiceImpl.java

@@ -42,6 +42,9 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> i
     @Autowired
     private IPayService payService;
 
+    @Autowired
+    private IResumeDeliverService resumeDeliverService;
+
     @Override
     public List<Position> selectList(Position position) {
         return positionMapper.selectList(position);
@@ -203,6 +206,10 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> i
         }
         //删除兼职退回余额
         if (position.getType() == 1) {
+            List<ResumeDeliver> list = resumeDeliverService.selectList(new ResumeDeliver().setPositionId(position.getId()).setIsAccept(1));
+            if (!list.isEmpty() && list.size() > 0) {
+                throw new ServiceException("删除职位失败,已经有人接单");
+            }
             User user = userService.getById(position.getUserId());
             user.setMoney(user.getMoney().add(new BigDecimal(position.getSalary())));
             if (!userService.updateById(user)) {

+ 11 - 5
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/impl/ResumeDeliverServiceImpl.java

@@ -25,6 +25,7 @@ import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
 import java.text.ParseException;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -133,19 +134,24 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
     @Override
     public AjaxResult agreeApplication(Long id) throws ParseException {
         ResumeDeliver resumeDeliver = getById(id);
-        if (resumeDeliver == null || !resumeDeliver.getEnterpriseId().equals(AppUtil.getUser().getId())) {
+        if (resumeDeliver == null || !resumeDeliver.getEnterpriseId().equals(AppUtil.getUser().getId()) || resumeDeliver.getType() == 0) {
             return AjaxResult.error("简历不存在或非法操作");
         }
+        List<ResumeDeliver> list = selectList(new ResumeDeliver().setPositionId(resumeDeliver.getPositionId()).setState(1));
+        if (!list.isEmpty() && list.size() > 0) {
+            return AjaxResult.error("你已发出兼职邀请,请等待对方答复后或者1小时无回应自动排除");
+        }
         if (resumeDeliver.getIsAccept() == 2) {
             return AjaxResult.error("兼职者已拒绝,无法重复发送");
         }
         if (resumeDeliver.getIsAccept() == 1) {
-            return AjaxResult.error("兼职者已同意,请及时安排线下面试");
+            return AjaxResult.error("兼职者已同意,请留意工作进度");
         }
         if (resumeDeliver.getState() == 1) {
             return AjaxResult.error("已发送邀请,等待兼职者同意");
         }
         resumeDeliver.setState(1);
+        resumeDeliver.setAuditTime(new Date());
         if (!updateById(resumeDeliver)) {
             throw new ServiceException("发送兼职邀请失败");
         }
@@ -230,7 +236,7 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
             User user = userService.getById(resumeDeliver.getUserId());
             body.set("touser", user.getOpenId());
             body.set("template_id", "bxOGj5FbyGHSevmWf9yzwpSZDjlFZPnGBeqGgIj9w_o");
-            body.set("page", "pages/user/resume/application/invite");
+            body.set("page", "pages/user/resume/application/task_to_do?role=0");
             content.set("thing4", new JSONObject().set("value", position.getTitle()));//兼职名称
             content.set("thing6", new JSONObject().set("value", "对方已同意接单,请留意工作进度"));//备注
         }
@@ -240,7 +246,7 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
             User user = userService.getById(resumeDeliver.getEnterpriseId());
             body.set("touser", user.getOpenId());
             body.set("template_id", "pyUsW2HqOcXmFETHFUDjuH-ekf05QVc29k0tRaY9wP8");
-            body.set("page", "pages/user/resume/application/invite");
+            body.set("page", "pages/user/resume/application/receive/index");
             content.set("thing3", new JSONObject().set("value", position.getTitle()));//兼职名称
             content.set("thing5", new JSONObject().set("value", "对方拒绝接单,请重新选择接单人员"));//备注
         }
@@ -250,7 +256,7 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
             User user = userService.getById(resumeDeliver.getUserId());
             body.set("touser", user.getOpenId());
             body.set("template_id", "yhFtY-hzXerPnIxXcYcRCAjQUf8CdLoYEQQi5nBgim0");
-            body.set("page", "pages/user/resume/application/invite");
+            body.set("page", "pages/user/resume/application/invite?type=1");
             content.set("thing1", new JSONObject().set("value", position.getTitle()));//兼职名称
             content.set("amount4", new JSONObject().set("value", position.getSalary() + "元"));//工作报酬
             content.set("phrase5", new JSONObject().set("value", "通过"));//状态

+ 2 - 2
ruoyi-admin/src/main/resources/mapper/work/UserMapper.xml

@@ -28,8 +28,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.enterprise_id = u.id AND d.state=1 AND d.type=0) AS inviteUser,/*企业邀请全职面试总数*/
             ( SELECT name FROM tb_enterprise d WHERE d.id = u.id) AS enterprise, /*企业信息*/
             </if>
-            ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.enterprise_id = u.id AND d.is_complete = 1 AND d.type=1) AS completeApplication, /*甲方收到确认完成申请数*/
-            ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.user_id = u.id AND d.is_complete !=2 AND d.type=1) AS completeIng, /*已方正在进行任务数*/
+            ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.enterprise_id = u.id AND d.is_complete !=2 AND d.type=1 AND d.is_accept=1) AS completeApplication, /*甲方正在进行任务数*/
+            ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.user_id = u.id AND d.is_complete !=2 AND d.type=1 AND d.is_accept=1) AS completeIng, /*已方正在进行任务数*/
             ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.enterprise_id = u.id AND d.is_read = 0 AND d.type=1) AS noReadApplication, /*甲方收到未查看报名数*/
             ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.user_id = u.id AND d.state = 1 AND is_accept = 0 AND type=1) AS partTimeAccept/*兼职邀约未处理*/
         FROM