Merge branch 'master' into ah-simple
This commit is contained in:
commit
65afc2269d
|
|
@ -72,4 +72,7 @@ public class ToDoBean extends BaseEntity {
|
|||
@ApiModelProperty(value = "出租方公司名称")
|
||||
private String sellerCompanyName;
|
||||
|
||||
@ApiModelProperty(value = "待办通知公司id")
|
||||
private Long noticeCompanyId;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public class ToDoServiceImpl implements ToDoService {
|
|||
|
||||
@Override
|
||||
public List<ToDoBean> getToDoList(ToDoBean bean) {
|
||||
bean.setBuyerCompanyId(Math.toIntExact(SecurityUtils.getLoginUser().getSysUser().getCompanyId()));
|
||||
bean.setNoticeCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
|
||||
return toDoMapper.getToDoList(bean);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -124,6 +124,7 @@ public class OrderServiceImpl implements OrderService {
|
|||
DevInfoVo devInfoVo = devInfoMapper.selectDevInfoByMaId(Long.valueOf(orderDetailDtos.get(0).getMaId()));
|
||||
tmTask.setSellerCompanyId(Long.valueOf(devInfoVo.getCompanyId()));
|
||||
}
|
||||
tmTask.setNoticeCompanyId(tmTask.getSellerCompanyId());
|
||||
tmTaskMapper.insertSelective(tmTask);
|
||||
}
|
||||
return j;
|
||||
|
|
@ -275,12 +276,21 @@ public class OrderServiceImpl implements OrderService {
|
|||
String userName = SecurityUtils.getLoginUser().getUsername();
|
||||
Integer i = orderMapper.updateOrderStatus(orderInfoDto.getOrderId(), orderInfoDto.getMaIds(), orderInfoDto.getOrderStatus(), userName);
|
||||
if (!CollectionUtils.isEmpty(dtos)) {
|
||||
OptionalInt minOrderStatus = dtos.stream().mapToInt(person -> Integer.parseInt(person.getOrderStatus())).min();
|
||||
OptionalInt minOrderStatus = dtos.stream().mapToInt(o -> Integer.parseInt(o.getOrderStatus())).min();
|
||||
if (minOrderStatus.isPresent()) {
|
||||
TmTask tmTask = new TmTask();
|
||||
tmTask.setTaskType(TmTaskTypeEnum.TM_TASK_ORDER.getTaskTypeId());
|
||||
tmTask.setTaskStatus(minOrderStatus.getAsInt());
|
||||
tmTask.setCode(dtos.get(0).getOrderCode());
|
||||
if (orderInfoDto.getOrderStatus().equals(OrderStatusEnum.ORDER_PENDING_SHIPMENT.getStatus().toString()) ||
|
||||
orderInfoDto.getOrderStatus().equals(OrderStatusEnum.ORDER_TERMINATED.getStatus().toString())) {
|
||||
tmTask.setNoticeCompanyId(tmTask.getBuyerCompanyId());
|
||||
} else if (orderInfoDto.getOrderStatus().equals(OrderStatusEnum.ORDER_RECEIVE.getStatus().toString()) ||
|
||||
orderInfoDto.getOrderStatus().equals(OrderStatusEnum.ORDER_AWAITING_RECEIPT.getStatus().toString()) ||
|
||||
orderInfoDto.getOrderStatus().equals(OrderStatusEnum.ORDER_UNDER_LEASE.getStatus().toString()) ||
|
||||
orderInfoDto.getOrderStatus().equals(OrderStatusEnum.ORDER_REPAIRED.getStatus().toString())) {
|
||||
tmTask.setNoticeCompanyId(tmTask.getSellerCompanyId());
|
||||
}
|
||||
tmTaskMapper.updateTaskStatus(tmTask);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,9 @@ public class TmTask extends BaseEntity implements Serializable {
|
|||
@ApiModelProperty(value = "出租方公司id")
|
||||
private Long sellerCompanyId;
|
||||
|
||||
@ApiModelProperty(value = "待办通知公司id")
|
||||
private Long noticeCompanyId;
|
||||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyWord;
|
||||
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
where from_company = #{fromCompany} and to_company = #{toCompany}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBmMessageById" parameterType="Long">
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN sys_dept dept1 on dept1.dept_id=tt.buyer_company_id
|
||||
LEFT JOIN sys_dept dept2 on dept2.dept_id=tt.seller_company_id
|
||||
WHERE
|
||||
tt.`status` = '1'
|
||||
tt.`status` = '1' and tt.task_status < 20
|
||||
and tt.task_type in (2)
|
||||
<if test="buyerCompanyId != null">
|
||||
and tt.buyer_company_id=#{buyerCompanyId} || tt.seller_company_id=#{buyerCompanyId}
|
||||
<if test="noticeCompanyId != null">
|
||||
and tt.notice_company_id=#{noticeCompanyId}
|
||||
</if>
|
||||
<if test="taskTypeId != null and taskTypeId != ''">
|
||||
and tt.task_type=#{taskTypeId}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
update
|
||||
tm_task
|
||||
set
|
||||
task_status = #{taskStatus}, update_time = NOW()
|
||||
task_status = #{taskStatus}, notice_company_id = #{noticeCompanyId}, update_time = NOW()
|
||||
where
|
||||
task_type = #{taskType} and code = #{code}
|
||||
</update>
|
||||
|
|
@ -80,6 +80,9 @@
|
|||
<if test="sellerCompanyId != null">
|
||||
seller_company_id,
|
||||
</if>
|
||||
<if test="noticeCompanyId != null">
|
||||
notice_company_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="taskType != null">
|
||||
|
|
|
|||
Loading…
Reference in New Issue