|
|
|
@ -19,6 +19,7 @@ import com.hnac.hzims.ticket.accessTicket.dto.response.AccessTicketPageRspDTO;
|
|
|
|
|
import com.hnac.hzims.ticket.accessTicket.entity.AccessTicketEntity; |
|
|
|
|
import com.hnac.hzims.ticket.accessTicket.mapper.AccessTicketMapper; |
|
|
|
|
import com.hnac.hzims.ticket.accessTicket.service.AccessTicketService; |
|
|
|
|
import com.hnac.hzims.ticket.accessTicket.vo.AccessTicketMeasureVo; |
|
|
|
|
import com.hnac.hzims.ticket.accessTicket.vo.AccessTicketPreviewVo; |
|
|
|
|
import com.hnac.hzims.ticket.utils.AsposeUtil; |
|
|
|
|
import com.hnac.hzims.ticket.utils.PdfUtils; |
|
|
|
@ -27,6 +28,7 @@ import lombok.RequiredArgsConstructor;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
|
import org.springblade.core.mp.support.Query; |
|
|
|
|
import org.springblade.core.secure.BladeUser; |
|
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
|
import org.springblade.core.tool.utils.*; |
|
|
|
@ -412,6 +414,35 @@ public class AccessTicketServiceImpl extends ServiceImpl<AccessTicketMapper, Acc
|
|
|
|
|
params.setChd(check.get(Calendar.DAY_OF_MONTH)); |
|
|
|
|
params.setChh(check.get(Calendar.HOUR_OF_DAY)); |
|
|
|
|
params.setChmi(check.get(Calendar.MINUTE)); |
|
|
|
|
|
|
|
|
|
// 检修措施
|
|
|
|
|
params.setMeasuresConfirmPersonnel(access.getMeasuresConfirmPersonnel()); |
|
|
|
|
if(StringUtils.isNotEmpty(access.getMeasures())){ |
|
|
|
|
List<AccessTicketMeasureVo> measures = JSONObject.parseArray(access.getMeasures(),AccessTicketMeasureVo.class); |
|
|
|
|
log.info("measures: {}",measures); |
|
|
|
|
if(CollectionUtil.isNotEmpty(measures)){ |
|
|
|
|
measures.stream().sorted(Comparator.comparing(AccessTicketMeasureVo::getCode)).forEach(measure->{ |
|
|
|
|
switch (measure.getCode()) { |
|
|
|
|
case AccessTicketConstants.MEASURE_CODE_ONE: |
|
|
|
|
params.setMeasureContentOne(measure.getMeasure()); |
|
|
|
|
params.setMarkOne("true".equals(measure.getEditMark()) ? "√" : ""); |
|
|
|
|
break; |
|
|
|
|
case AccessTicketConstants.MEASURE_CODE_TWO: |
|
|
|
|
params.setMeasureContentTwo(measure.getMeasure()); |
|
|
|
|
params.setMarkTwo("true".equals(measure.getEditMark()) ? "√" : ""); |
|
|
|
|
break; |
|
|
|
|
case AccessTicketConstants.MEASURE_CODE_THREE: |
|
|
|
|
params.setMeasureContentThree(measure.getMeasure()); |
|
|
|
|
params.setMarkThree("true".equals(measure.getEditMark()) ? "√" : ""); |
|
|
|
|
break; |
|
|
|
|
case AccessTicketConstants.MEASURE_CODE_FOUR: |
|
|
|
|
params.setMeasureContentFour(measure.getMeasure()); |
|
|
|
|
params.setMarkFour("true".equals(measure.getEditMark()) ? "√" : ""); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return params; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -438,4 +469,20 @@ public class AccessTicketServiceImpl extends ServiceImpl<AccessTicketMapper, Acc
|
|
|
|
|
.eq(AccessTicketEntity::getId,ticketId) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 根据角色别名查询用户 |
|
|
|
|
* @param roleAlias |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public List<User> roleQueryUser(String roleAlias) { |
|
|
|
|
BladeUser user = AuthUtil.getUser(); |
|
|
|
|
R<List<User>> users = userClient.queryUserByRoleAlias(user.getTenantId(), Long.valueOf(user.getDeptId()),roleAlias); |
|
|
|
|
if(!users.isSuccess() || CollectionUtil.isEmpty(users.getData())){ |
|
|
|
|
return new ArrayList<>(); |
|
|
|
|
} |
|
|
|
|
return users.getData(); |
|
|
|
|
} |
|
|
|
|
} |