Commit 45d5af0a5fccfa62df7bf081898030d72b6dd382
1 parent
ddf73a78
a
Showing
127 changed files
with
5056 additions
and
3272 deletions
trash-activiti/src/main/java/com/trash/activiti/mapper/ActReDeploymentMapper.java
| ... | ... | @@ -20,7 +20,11 @@ public interface ActReDeploymentMapper { |
| 20 | 20 | public List<ActReDeploymentVO> selectActReDeploymentByIds(@Param("ids") Set<String> ids); |
| 21 | 21 | |
| 22 | 22 | |
| 23 | - public Map<String,String> selectWorkLeaveById(@Param("id") String id); | |
| 23 | + public Map<String,String> selectWorkById(@Param("id") String id); | |
| 24 | + | |
| 25 | + public Map<String,String> selectHistoryWorkById(@Param("id") String id); | |
| 26 | + | |
| 27 | + | |
| 24 | 28 | |
| 25 | 29 | public Set<String> selectUnCompleteWorkByUsername(@Param("username") String username); |
| 26 | 30 | ... | ... |
trash-activiti/src/main/java/com/trash/activiti/service/IActTaskService.java
| ... | ... | @@ -16,4 +16,8 @@ public interface IActTaskService { |
| 16 | 16 | Page<ActTaskDTO> selectRuntimeTaskHistoryDefinitionList(PageDomain pageDomain); |
| 17 | 17 | |
| 18 | 18 | Page<ActTaskDTO> selectTaskEndHistoryDefinitionList(PageDomain pageDomain); |
| 19 | + | |
| 20 | + public void endAllThreesteptask(String type); | |
| 21 | + | |
| 22 | + public void deleteProcessById(String type); | |
| 19 | 23 | } | ... | ... |
trash-activiti/src/main/java/com/trash/activiti/service/impl/ActTaskServiceImpl.java
| ... | ... | @@ -35,6 +35,7 @@ import org.activiti.engine.runtime.ProcessInstance; |
| 35 | 35 | import org.activiti.engine.runtime.ProcessInstanceQuery; |
| 36 | 36 | import org.activiti.engine.task.TaskQuery; |
| 37 | 37 | import org.activiti.runtime.api.query.impl.PageImpl; |
| 38 | +import org.apache.ibatis.reflection.wrapper.BaseWrapper; | |
| 38 | 39 | import org.springframework.beans.factory.annotation.Autowired; |
| 39 | 40 | import org.springframework.stereotype.Service; |
| 40 | 41 | |
| ... | ... | @@ -78,24 +79,18 @@ public class ActTaskServiceImpl implements IActTaskService { |
| 78 | 79 | @Override |
| 79 | 80 | public Page<ActTaskDTO> selectProcessDefinitionList(PageDomain pageDomain) { |
| 80 | 81 | Page<ActTaskDTO> list = new Page<ActTaskDTO>(); |
| 81 | - org.activiti.api.runtime.shared.query.Page<Task> pageTasks = taskRuntime | |
| 82 | - .tasks(Pageable.of((pageDomain.getPageNum() - 1) * pageDomain.getPageSize(), pageDomain.getPageSize())); | |
| 82 | + | |
| 83 | + org.activiti.api.runtime.shared.query.Page<Task> pageTasks = taskRuntime.tasks(Pageable.of((pageDomain.getPageNum() - 1) * pageDomain.getPageSize(), pageDomain.getPageSize())); | |
| 83 | 84 | List<Task> tasks = pageTasks.getContent(); |
| 84 | 85 | int totalItems = pageTasks.getTotalItems(); |
| 85 | 86 | list.setTotal(totalItems); |
| 86 | 87 | if (totalItems != 0) { |
| 87 | - Set<String> processInstanceIdIds = tasks.parallelStream().map(t -> t.getProcessInstanceId()) | |
| 88 | - .collect(Collectors.toSet()); | |
| 89 | - List<ProcessInstance> processInstanceList = runtimeService.createProcessInstanceQuery() | |
| 90 | - .processInstanceIds(processInstanceIdIds).list(); | |
| 91 | - | |
| 92 | - List<ActTaskDTO> actTaskDTOS = tasks.stream() | |
| 93 | - .map(t -> new ActTaskDTO(t, | |
| 94 | - processInstanceList.parallelStream() | |
| 95 | - .filter(pi -> t.getProcessInstanceId().equals(pi.getId())).findAny().get(), | |
| 96 | - getData(processInstanceList.parallelStream() | |
| 97 | - .filter(pi -> t.getProcessInstanceId().equals(pi.getId())).findAny().get()))) | |
| 98 | - .collect(Collectors.toList()); | |
| 88 | + Set<String> processInstanceIdIds = tasks.parallelStream().map(t -> t.getProcessInstanceId()).collect(Collectors.toSet()); | |
| 89 | + | |
| 90 | + List<ProcessInstance> processInstanceList = runtimeService.createProcessInstanceQuery().processInstanceIds(processInstanceIdIds).list(); | |
| 91 | + | |
| 92 | + List<ActTaskDTO> actTaskDTOS = tasks.stream().map(t -> new ActTaskDTO(t,processInstanceList.parallelStream().filter(pi -> t.getProcessInstanceId().equals(pi.getId())).findAny().get(), | |
| 93 | + getData(processInstanceList.parallelStream().filter(pi -> t.getProcessInstanceId().equals(pi.getId())).findAny().get()))).collect(Collectors.toList()); | |
| 99 | 94 | |
| 100 | 95 | list.addAll(actTaskDTOS); |
| 101 | 96 | } |
| ... | ... | @@ -109,19 +104,20 @@ public class ActTaskServiceImpl implements IActTaskService { |
| 109 | 104 | ProcessEngine pes = ProcessEngines.getDefaultProcessEngine(); |
| 110 | 105 | HistoryService historyService = pes.getHistoryService(); |
| 111 | 106 | |
| 107 | + String username = securityManager.getAuthenticatedUserId(); | |
| 112 | 108 | |
| 113 | - List<String> collect = actMapper.selectCompleteWorkByUsername(securityManager.getAuthenticatedUserId()); | |
| 109 | + List<String> collect = actMapper.selectCompleteWorkByUsername(username); | |
| 114 | 110 | |
| 115 | 111 | if(collect.size() > 0){ |
| 116 | 112 | Set<String> set = new HashSet(collect); |
| 117 | 113 | |
| 118 | - List<HistoricProcessInstance> processInstanceList = historyService.createHistoricProcessInstanceQuery().processInstanceIds(set).list(); | |
| 114 | + List<HistoricProcessInstance> processInstanceList = historyService.createHistoricProcessInstanceQuery().involvedUser(username).processInstanceIds(set).list(); | |
| 119 | 115 | |
| 120 | 116 | list.setTotal(processInstanceList.size()); |
| 121 | 117 | |
| 122 | 118 | if(processInstanceList.size() > 0){ |
| 123 | 119 | for(HistoricProcessInstance p : processInstanceList){ |
| 124 | - ActTaskDTO actTaskDTOS = new ActTaskDTO(p,getData(p)); | |
| 120 | + ActTaskDTO actTaskDTOS = new ActTaskDTO(p,getHistoryData(p)); | |
| 125 | 121 | |
| 126 | 122 | getCheckData(actTaskDTOS); |
| 127 | 123 | |
| ... | ... | @@ -175,13 +171,18 @@ public class ActTaskServiceImpl implements IActTaskService { |
| 175 | 171 | SimpleDateFormat sdFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:SS"); |
| 176 | 172 | |
| 177 | 173 | public Map<String, String> getData(HistoricProcessInstance processInstance) { |
| 178 | - Map<String, String> map = actMapper.selectWorkLeaveById(processInstance.getBusinessKey()); | |
| 174 | + Map<String, String> map = actMapper.selectWorkById(processInstance.getBusinessKey()); | |
| 175 | + return map; | |
| 176 | + } | |
| 177 | + | |
| 178 | + public Map<String, String> getHistoryData(HistoricProcessInstance processInstance) { | |
| 179 | + Map<String, String> map = actMapper.selectHistoryWorkById(processInstance.getBusinessKey()); | |
| 179 | 180 | return map; |
| 180 | 181 | |
| 181 | 182 | } |
| 182 | 183 | |
| 183 | 184 | public Map<String, String> getData(ProcessInstance processInstance) { |
| 184 | - Map<String, String> map = actMapper.selectWorkLeaveById(processInstance.getBusinessKey()); | |
| 185 | + Map<String, String> map = actMapper.selectWorkById(processInstance.getBusinessKey()); | |
| 185 | 186 | return map; |
| 186 | 187 | } |
| 187 | 188 | |
| ... | ... | @@ -245,4 +246,21 @@ public class ActTaskServiceImpl implements IActTaskService { |
| 245 | 246 | // ๅๅ ฅๆฐๆฎๅบ |
| 246 | 247 | return actWorkflowFormDataService.insertActWorkflowFormDatas(acwfds); |
| 247 | 248 | } |
| 249 | + | |
| 250 | + @Override | |
| 251 | + public void deleteProcessById(String type) { | |
| 252 | + runtimeService.deleteProcessInstance(type, "ๅ ้ค"); | |
| 253 | + } | |
| 254 | + | |
| 255 | + @Override | |
| 256 | + public void endAllThreesteptask(String type) { | |
| 257 | + List<ProcessInstance> processes = runtimeService.createProcessInstanceQuery().list(); | |
| 258 | + | |
| 259 | + for(ProcessInstance proc:processes){ | |
| 260 | + if(type.equals(proc.getProcessDefinitionKey())){ | |
| 261 | + runtimeService.deleteProcessInstance(proc.getId(), "่ถ ๆถ"); | |
| 262 | + } | |
| 263 | + } | |
| 264 | + | |
| 265 | + } | |
| 248 | 266 | } | ... | ... |
trash-activiti/src/main/resources/mapper/activiti/ActReDeploymentMapper.xml
| ... | ... | @@ -23,10 +23,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 23 | 23 | </foreach> |
| 24 | 24 | </select> |
| 25 | 25 | |
| 26 | - <select id="selectWorkLeaveById" parameterType="String" resultType="java.util.Map"> | |
| 26 | + <select id="selectWorkById" parameterType="String" resultType="java.util.Map"> | |
| 27 | 27 | select start_time as startTime,end_time as endTime, reason,type from workflow where id = #{id} |
| 28 | 28 | </select> |
| 29 | 29 | |
| 30 | + <select id="selectHistoryWorkById" parameterType="String" resultType="java.util.Map"> | |
| 31 | + select start_time as startTime,end_time as endTime, reason,type from workflow_hi where id = #{id} | |
| 32 | + </select> | |
| 33 | + | |
| 34 | + | |
| 30 | 35 | <select id="selectUnCompleteWorkByUsername" parameterType="String" resultType="java.lang.String"> |
| 31 | 36 | select instance_id from workflow where id in (select business_key from act_workflow_formdata where create_by = #{username} GROUP BY business_key) |
| 32 | 37 | </select> | ... | ... |
trash-admin/src/main/resources/application-dev.yml
trash-admin/src/main/resources/application.yml
| ... | ... | @@ -40,7 +40,7 @@ token: |
| 40 | 40 | secret: abcdefghijklmnopqrstuvwxyz |
| 41 | 41 | # ไปค็ๆๆๆ๏ผ้ป่ฎค30ๅ้๏ผ |
| 42 | 42 | expireTime: 30 |
| 43 | - | |
| 43 | + | |
| 44 | 44 | # MyBatis้ ็ฝฎ |
| 45 | 45 | mybatis: |
| 46 | 46 | # ๆ็ดขๆๅฎๅ ๅซๅ |
| ... | ... | @@ -64,6 +64,8 @@ swagger: |
| 64 | 64 | # ่ฏทๆฑๅ็ผ |
| 65 | 65 | pathMapping: /dev-api |
| 66 | 66 | |
| 67 | + | |
| 68 | + | |
| 67 | 69 | # ้ฒๆญขXSSๆปๅป |
| 68 | 70 | xss: |
| 69 | 71 | # ่ฟๆปคๅผๅ ณ |
| ... | ... | @@ -72,3 +74,5 @@ xss: |
| 72 | 74 | excludes: /system/notice/* |
| 73 | 75 | # ๅน้ ้พๆฅ |
| 74 | 76 | urlPatterns: /system/*,/monitor/*,/tool/* |
| 77 | + | |
| 78 | + | |
| 75 | 79 | \ No newline at end of file | ... | ... |
trash-common/src/main/java/com/trash/common/core/controller/BaseController.java
| ... | ... | @@ -14,6 +14,7 @@ import com.trash.common.core.page.PageDomain; |
| 14 | 14 | import com.trash.common.core.page.TableDataInfo; |
| 15 | 15 | import com.trash.common.core.page.TableSupport; |
| 16 | 16 | import com.trash.common.utils.DateUtils; |
| 17 | +import com.trash.common.utils.SecurityUtils; | |
| 17 | 18 | import com.trash.common.utils.StringUtils; |
| 18 | 19 | import com.trash.common.utils.sql.SqlUtil; |
| 19 | 20 | import com.github.pagehelper.PageHelper; |
| ... | ... | @@ -27,6 +28,7 @@ import com.github.pagehelper.PageInfo; |
| 27 | 28 | public class BaseController |
| 28 | 29 | { |
| 29 | 30 | protected final Logger logger = LoggerFactory.getLogger(BaseController.class); |
| 31 | + | |
| 30 | 32 | |
| 31 | 33 | /** |
| 32 | 34 | * ๅฐๅๅฐไผ ้่ฟๆฅ็ๆฅๆๆ ผๅผ็ๅญ็ฌฆไธฒ๏ผ่ชๅจ่ฝฌๅไธบDate็ฑปๅ | ... | ... |
trash-daily/src/main/java/com/trash/daily/domain/PeriodicReport.java deleted
100644 โ 0
| 1 | -package com.trash.daily.domain; | |
| 2 | - | |
| 3 | -import com.fasterxml.jackson.annotation.JsonFormat; | |
| 4 | -import com.trash.common.annotation.Excel; | |
| 5 | -import com.trash.common.core.domain.BaseEntity; | |
| 6 | -import org.apache.commons.lang3.builder.ToStringBuilder; | |
| 7 | -import org.apache.commons.lang3.builder.ToStringStyle; | |
| 8 | - | |
| 9 | -import java.util.Date; | |
| 10 | - | |
| 11 | -/** | |
| 12 | - * ๅจๆๆฅๅ PeriodicReport | |
| 13 | - * | |
| 14 | - * @author trash | |
| 15 | - * @date 2023-04-21 | |
| 16 | - */ | |
| 17 | -public class PeriodicReport extends BaseEntity | |
| 18 | -{ | |
| 19 | - private static final long serialVersionUID = 1L; | |
| 20 | - | |
| 21 | - /** ไธป้ฎid */ | |
| 22 | - private Long id; | |
| 23 | - | |
| 24 | - /** ๆ ้ข */ | |
| 25 | - @Excel(name = "ๆ ้ข") | |
| 26 | - private String headline; | |
| 27 | - | |
| 28 | - /** ๅกซๅไบบ */ | |
| 29 | - @Excel(name = "ๅกซๅไบบ") | |
| 30 | - private String writer; | |
| 31 | - | |
| 32 | - /** ๅกซๅๆถ้ด */ | |
| 33 | - @JsonFormat(pattern = "yyyy-MM-dd") | |
| 34 | - @Excel(name = "ๅกซๅๆถ้ด", width = 30, dateFormat = "yyyy-MM-dd") | |
| 35 | - private Date writeTime; | |
| 36 | - | |
| 37 | - /** ๅ ๅฎน */ | |
| 38 | - private String content; | |
| 39 | - | |
| 40 | - /** ๅผๅงๆถ้ด */ | |
| 41 | - private Date begintime; | |
| 42 | - | |
| 43 | - /** ็ปๆๆถ้ด */ | |
| 44 | - private Date endtime; | |
| 45 | - | |
| 46 | - /** ๅจๆฅ็ฑปๅ(1ใๆฅๆฅ2ใๅจๆฅ3ใๆๆฅ) */ | |
| 47 | - private Long contentType; | |
| 48 | - | |
| 49 | - public void setId(Long id) | |
| 50 | - { | |
| 51 | - this.id = id; | |
| 52 | - } | |
| 53 | - | |
| 54 | - public Long getId() | |
| 55 | - { | |
| 56 | - return id; | |
| 57 | - } | |
| 58 | - public void setHeadline(String headline) | |
| 59 | - { | |
| 60 | - this.headline = headline; | |
| 61 | - } | |
| 62 | - | |
| 63 | - public String getHeadline() | |
| 64 | - { | |
| 65 | - return headline; | |
| 66 | - } | |
| 67 | - public void setWriter(String writer) | |
| 68 | - { | |
| 69 | - this.writer = writer; | |
| 70 | - } | |
| 71 | - | |
| 72 | - public String getWriter() | |
| 73 | - { | |
| 74 | - return writer; | |
| 75 | - } | |
| 76 | - public void setWriteTime(Date writeTime) | |
| 77 | - { | |
| 78 | - this.writeTime = writeTime; | |
| 79 | - } | |
| 80 | - | |
| 81 | - public Date getWriteTime() | |
| 82 | - { | |
| 83 | - return writeTime; | |
| 84 | - } | |
| 85 | - public void setContent(String content) | |
| 86 | - { | |
| 87 | - this.content = content; | |
| 88 | - } | |
| 89 | - | |
| 90 | - public String getContent() | |
| 91 | - { | |
| 92 | - return content; | |
| 93 | - } | |
| 94 | - public void setBegintime(Date begintime) | |
| 95 | - { | |
| 96 | - this.begintime = begintime; | |
| 97 | - } | |
| 98 | - | |
| 99 | - public Date getBegintime() | |
| 100 | - { | |
| 101 | - return begintime; | |
| 102 | - } | |
| 103 | - public void setEndtime(Date endtime) | |
| 104 | - { | |
| 105 | - this.endtime = endtime; | |
| 106 | - } | |
| 107 | - | |
| 108 | - public Date getEndtime() | |
| 109 | - { | |
| 110 | - return endtime; | |
| 111 | - } | |
| 112 | - public void setContentType(Long contentType) | |
| 113 | - { | |
| 114 | - this.contentType = contentType; | |
| 115 | - } | |
| 116 | - | |
| 117 | - public Long getContentType() | |
| 118 | - { | |
| 119 | - return contentType; | |
| 120 | - } | |
| 121 | - | |
| 122 | - @Override | |
| 123 | - public String toString() { | |
| 124 | - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | |
| 125 | - .append("id", getId()) | |
| 126 | - .append("headline", getHeadline()) | |
| 127 | - .append("writer", getWriter()) | |
| 128 | - .append("writeTime", getWriteTime()) | |
| 129 | - .append("content", getContent()) | |
| 130 | - .append("begintime", getBegintime()) | |
| 131 | - .append("endtime", getEndtime()) | |
| 132 | - .append("contentType", getContentType()) | |
| 133 | - .toString(); | |
| 134 | - } | |
| 135 | -} | |
| 136 | 0 | \ No newline at end of file |
trash-daily/src/main/java/com/trash/daily/mapper/DailyMapper.java deleted
100644 โ 0
| 1 | -package com.trash.daily.mapper; | |
| 2 | - | |
| 3 | -import com.trash.daily.domain.PeriodicReport; | |
| 4 | - | |
| 5 | -import java.util.List; | |
| 6 | - | |
| 7 | -/** | |
| 8 | - * ๆฅๆฅMapperๆฅๅฃ | |
| 9 | - * | |
| 10 | - * @author trash | |
| 11 | - * @date 2023-04-21 | |
| 12 | - */ | |
| 13 | -public interface DailyMapper | |
| 14 | -{ | |
| 15 | - /** | |
| 16 | - * ๆฅ่ฏขๆฅๆฅ | |
| 17 | - * | |
| 18 | - * @param id ๆฅๆฅID | |
| 19 | - * @return ๆฅๆฅ | |
| 20 | - */ | |
| 21 | - public PeriodicReport selectDailyById(Long id); | |
| 22 | - | |
| 23 | - /** | |
| 24 | - * ๆฅ่ฏขๆฅๆฅๅ่กจ | |
| 25 | - * | |
| 26 | - * @param periodicReport ๆฅๆฅ | |
| 27 | - * @return ๆฅๆฅ้ๅ | |
| 28 | - */ | |
| 29 | - public List<PeriodicReport> selectDailyList(PeriodicReport periodicReport); | |
| 30 | - | |
| 31 | - /** | |
| 32 | - * ๆฐๅขๆฅๆฅ | |
| 33 | - * | |
| 34 | - * @param periodicReport ๆฅๆฅ | |
| 35 | - * @return ็ปๆ | |
| 36 | - */ | |
| 37 | - public int insertDaily(PeriodicReport periodicReport); | |
| 38 | - | |
| 39 | - /** | |
| 40 | - * ไฟฎๆนๆฅๆฅ | |
| 41 | - * | |
| 42 | - * @param periodicReport ๆฅๆฅ | |
| 43 | - * @return ็ปๆ | |
| 44 | - */ | |
| 45 | - public int updateDaily(PeriodicReport periodicReport); | |
| 46 | - | |
| 47 | - /** | |
| 48 | - * ๅ ้คๆฅๆฅ | |
| 49 | - * | |
| 50 | - * @param id ๆฅๆฅID | |
| 51 | - * @return ็ปๆ | |
| 52 | - */ | |
| 53 | - public int deleteDailyById(Long id); | |
| 54 | - | |
| 55 | - /** | |
| 56 | - * ๆน้ๅ ้คๆฅๆฅ | |
| 57 | - * | |
| 58 | - * @param ids ้่ฆๅ ้ค็ๆฐๆฎID | |
| 59 | - * @return ็ปๆ | |
| 60 | - */ | |
| 61 | - public int deleteDailyByIds(Long[] ids); | |
| 62 | -} |
trash-daily/src/main/java/com/trash/daily/service/IDailyService.java deleted
100644 โ 0
| 1 | -package com.trash.daily.service; | |
| 2 | - | |
| 3 | -import com.trash.daily.domain.PeriodicReport; | |
| 4 | - | |
| 5 | -import java.util.List; | |
| 6 | - | |
| 7 | -/** | |
| 8 | - * ๆฅๆฅServiceๆฅๅฃ | |
| 9 | - * | |
| 10 | - * @author trash | |
| 11 | - * @date 2023-04-21 | |
| 12 | - */ | |
| 13 | -public interface IDailyService | |
| 14 | -{ | |
| 15 | - /** | |
| 16 | - * ๆฅ่ฏขๆฅๆฅ | |
| 17 | - * | |
| 18 | - * @param id ๆฅๆฅID | |
| 19 | - * @return ๆฅๆฅ | |
| 20 | - */ | |
| 21 | - public PeriodicReport selectDailyById(Long id); | |
| 22 | - | |
| 23 | - /** | |
| 24 | - * ๆฅ่ฏขๆฅๆฅๅ่กจ | |
| 25 | - * | |
| 26 | - * @param periodicReport ๆฅๆฅ | |
| 27 | - * @return ๆฅๆฅ้ๅ | |
| 28 | - */ | |
| 29 | - public List<PeriodicReport> selectDailyList(PeriodicReport periodicReport); | |
| 30 | - | |
| 31 | - /** | |
| 32 | - * ๆฐๅขๆฅๆฅ | |
| 33 | - * | |
| 34 | - * @param periodicReport ๆฅๆฅ | |
| 35 | - * @return ็ปๆ | |
| 36 | - */ | |
| 37 | - public int insertDaily(PeriodicReport periodicReport); | |
| 38 | - | |
| 39 | - /** | |
| 40 | - * ไฟฎๆนๆฅๆฅ | |
| 41 | - * | |
| 42 | - * @param periodicReport ๆฅๆฅ | |
| 43 | - * @return ็ปๆ | |
| 44 | - */ | |
| 45 | - public int updateDaily(PeriodicReport periodicReport); | |
| 46 | - | |
| 47 | - /** | |
| 48 | - * ๅ ้คๆฅๆฅ | |
| 49 | - * | |
| 50 | - * @param id ๆฅๆฅID | |
| 51 | - * @return ็ปๆ | |
| 52 | - */ | |
| 53 | - public int deleteDailyById(Long id); | |
| 54 | - | |
| 55 | - /** | |
| 56 | - * ๆน้ๅ ้คๆฅๆฅ | |
| 57 | - * | |
| 58 | - * @param ids ้่ฆๅ ้ค็ๆฐๆฎID | |
| 59 | - * @return ็ปๆ | |
| 60 | - */ | |
| 61 | - public int deleteDailyByIds(Long[] ids); | |
| 62 | -} |
trash-daily/src/main/java/com/trash/information_sharing/controller/InformationSharingController.java
| ... | ... | @@ -5,6 +5,7 @@ import com.trash.common.core.controller.BaseController; |
| 5 | 5 | import com.trash.common.core.domain.AjaxResult; |
| 6 | 6 | import com.trash.common.core.page.TableDataInfo; |
| 7 | 7 | import com.trash.common.enums.BusinessType; |
| 8 | +import com.trash.common.utils.SecurityUtils; | |
| 8 | 9 | import com.trash.common.utils.poi.ExcelUtil; |
| 9 | 10 | import com.trash.information_sharing.domain.InformationSharing; |
| 10 | 11 | import com.trash.information_sharing.service.IInformationSharingService; |
| ... | ... | @@ -35,6 +36,7 @@ public class InformationSharingController extends BaseController |
| 35 | 36 | public TableDataInfo list(InformationSharing informationSharing) |
| 36 | 37 | { |
| 37 | 38 | startPage(); |
| 39 | + informationSharing.setCreateBy(SecurityUtils.getUsername()); | |
| 38 | 40 | List<InformationSharing> list = informationSharingService.selectInformationSharingList(informationSharing); |
| 39 | 41 | return getDataTable(list); |
| 40 | 42 | } | ... | ... |
trash-daily/src/main/java/com/trash/information_sharing/domain/InformationSharing.java
| ... | ... | @@ -42,6 +42,8 @@ public class InformationSharing extends BaseEntity |
| 42 | 42 | |
| 43 | 43 | /** ่ตๆ */ |
| 44 | 44 | private String informationLink; |
| 45 | + | |
| 46 | + private String createBy; | |
| 45 | 47 | |
| 46 | 48 | public void setId(Long id) |
| 47 | 49 | { |
| ... | ... | @@ -106,8 +108,18 @@ public class InformationSharing extends BaseEntity |
| 106 | 108 | { |
| 107 | 109 | return informationLink; |
| 108 | 110 | } |
| 111 | + | |
| 112 | + | |
| 109 | 113 | |
| 110 | - @Override | |
| 114 | + public String getCreateBy() { | |
| 115 | + return createBy; | |
| 116 | + } | |
| 117 | + | |
| 118 | + public void setCreateBy(String createBy) { | |
| 119 | + this.createBy = createBy; | |
| 120 | + } | |
| 121 | + | |
| 122 | + @Override | |
| 111 | 123 | public String toString() { |
| 112 | 124 | return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) |
| 113 | 125 | .append("id", getId()) | ... | ... |
trash-daily/src/main/java/com/trash/information_sharing/service/impl/InformationSharingServiceImpl.java
| 1 | 1 | package com.trash.information_sharing.service.impl; |
| 2 | 2 | |
| 3 | +import com.trash.common.utils.SecurityUtils; | |
| 3 | 4 | import com.trash.information_sharing.domain.InformationSharing; |
| 4 | 5 | import com.trash.information_sharing.mapper.InformationSharingMapper; |
| 5 | 6 | import com.trash.information_sharing.service.IInformationSharingService; |
| ... | ... | @@ -41,6 +42,7 @@ public class InformationSharingServiceImpl implements IInformationSharingService |
| 41 | 42 | @Override |
| 42 | 43 | public List<InformationSharing> selectInformationSharingList(InformationSharing informationSharing) |
| 43 | 44 | { |
| 45 | + informationSharing.setCreateBy(SecurityUtils.getUsername()); | |
| 44 | 46 | return informationSharingMapper.selectInformationSharingList(informationSharing); |
| 45 | 47 | } |
| 46 | 48 | |
| ... | ... | @@ -52,7 +54,8 @@ public class InformationSharingServiceImpl implements IInformationSharingService |
| 52 | 54 | */ |
| 53 | 55 | @Override |
| 54 | 56 | public int insertInformationSharing(InformationSharing informationSharing) |
| 55 | - { | |
| 57 | + { | |
| 58 | + informationSharing.setCreateBy(SecurityUtils.getUsername()); | |
| 56 | 59 | return informationSharingMapper.insertInformationSharing(informationSharing); |
| 57 | 60 | } |
| 58 | 61 | ... | ... |
trash-daily/src/main/java/com/trash/monthly/mapper/MonthlyReportMapper.java deleted
100644 โ 0
| 1 | -package com.trash.monthly.mapper; | |
| 2 | - | |
| 3 | -import com.trash.daily.domain.PeriodicReport; | |
| 4 | - | |
| 5 | -import java.util.List; | |
| 6 | - | |
| 7 | -/** | |
| 8 | - * ๆๆฅMapperๆฅๅฃ | |
| 9 | - * | |
| 10 | - * @author trash | |
| 11 | - * @date 2023-04-21 | |
| 12 | - */ | |
| 13 | -public interface MonthlyReportMapper | |
| 14 | -{ | |
| 15 | - /** | |
| 16 | - * ๆฅ่ฏขๆๆฅ | |
| 17 | - * | |
| 18 | - * @param id ๆๆฅID | |
| 19 | - * @return ๆๆฅ | |
| 20 | - */ | |
| 21 | - public PeriodicReport selectMonthlyReportById(Long id); | |
| 22 | - | |
| 23 | - /** | |
| 24 | - * ๆฅ่ฏขๆๆฅๅ่กจ | |
| 25 | - * | |
| 26 | - * @param monthlyReport ๆๆฅ | |
| 27 | - * @return ๆๆฅ้ๅ | |
| 28 | - */ | |
| 29 | - public List<PeriodicReport> selectMonthlyReportList(PeriodicReport monthlyReport); | |
| 30 | - | |
| 31 | - /** | |
| 32 | - * ๆฐๅขๆๆฅ | |
| 33 | - * | |
| 34 | - * @param monthlyReport ๆๆฅ | |
| 35 | - * @return ็ปๆ | |
| 36 | - */ | |
| 37 | - public int insertMonthlyReport(PeriodicReport monthlyReport); | |
| 38 | - | |
| 39 | - /** | |
| 40 | - * ไฟฎๆนๆๆฅ | |
| 41 | - * | |
| 42 | - * @param monthlyReport ๆๆฅ | |
| 43 | - * @return ็ปๆ | |
| 44 | - */ | |
| 45 | - public int updateMonthlyReport(PeriodicReport monthlyReport); | |
| 46 | - | |
| 47 | - /** | |
| 48 | - * ๅ ้คๆๆฅ | |
| 49 | - * | |
| 50 | - * @param id ๆๆฅID | |
| 51 | - * @return ็ปๆ | |
| 52 | - */ | |
| 53 | - public int deleteMonthlyReportById(Long id); | |
| 54 | - | |
| 55 | - /** | |
| 56 | - * ๆน้ๅ ้คๆๆฅ | |
| 57 | - * | |
| 58 | - * @param ids ้่ฆๅ ้ค็ๆฐๆฎID | |
| 59 | - * @return ็ปๆ | |
| 60 | - */ | |
| 61 | - public int deleteMonthlyReportByIds(Long[] ids); | |
| 62 | -} |
trash-daily/src/main/java/com/trash/monthly/service/IMonthlyReportService.java deleted
100644 โ 0
| 1 | -package com.trash.monthly.service; | |
| 2 | - | |
| 3 | -import com.trash.daily.domain.PeriodicReport; | |
| 4 | - | |
| 5 | -import java.util.List; | |
| 6 | - | |
| 7 | -/** | |
| 8 | - * ๆๆฅServiceๆฅๅฃ | |
| 9 | - * | |
| 10 | - * @author trash | |
| 11 | - * @date 2023-04-21 | |
| 12 | - */ | |
| 13 | -public interface IMonthlyReportService | |
| 14 | -{ | |
| 15 | - /** | |
| 16 | - * ๆฅ่ฏขๆๆฅ | |
| 17 | - * | |
| 18 | - * @param id ๆๆฅID | |
| 19 | - * @return ๆๆฅ | |
| 20 | - */ | |
| 21 | - public PeriodicReport selectMonthlyReportById(Long id); | |
| 22 | - | |
| 23 | - /** | |
| 24 | - * ๆฅ่ฏขๆๆฅๅ่กจ | |
| 25 | - * | |
| 26 | - * @param monthlyReport ๆๆฅ | |
| 27 | - * @return ๆๆฅ้ๅ | |
| 28 | - */ | |
| 29 | - public List<PeriodicReport> selectMonthlyReportList(PeriodicReport monthlyReport); | |
| 30 | - | |
| 31 | - /** | |
| 32 | - * ๆฐๅขๆๆฅ | |
| 33 | - * | |
| 34 | - * @param monthlyReport ๆๆฅ | |
| 35 | - * @return ็ปๆ | |
| 36 | - */ | |
| 37 | - public int insertMonthlyReport(PeriodicReport monthlyReport); | |
| 38 | - | |
| 39 | - /** | |
| 40 | - * ไฟฎๆนๆๆฅ | |
| 41 | - * | |
| 42 | - * @param monthlyReport ๆๆฅ | |
| 43 | - * @return ็ปๆ | |
| 44 | - */ | |
| 45 | - public int updateMonthlyReport(PeriodicReport monthlyReport); | |
| 46 | - | |
| 47 | - /** | |
| 48 | - * ๅ ้คๆๆฅ | |
| 49 | - * | |
| 50 | - * @param id ๆๆฅID | |
| 51 | - * @return ็ปๆ | |
| 52 | - */ | |
| 53 | - public int deleteMonthlyReportById(Long id); | |
| 54 | - | |
| 55 | - /** | |
| 56 | - * ๆน้ๅ ้คๆๆฅ | |
| 57 | - * | |
| 58 | - * @param ids ้่ฆๅ ้ค็ๆฐๆฎID | |
| 59 | - * @return ็ปๆ | |
| 60 | - */ | |
| 61 | - public int deleteMonthlyReportByIds(Long[] ids); | |
| 62 | -} |
trash-daily/src/main/java/com/trash/report/controller/WorkReportController.java
| ... | ... | @@ -5,6 +5,7 @@ import com.trash.common.core.controller.BaseController; |
| 5 | 5 | import com.trash.common.core.domain.AjaxResult; |
| 6 | 6 | import com.trash.common.core.page.TableDataInfo; |
| 7 | 7 | import com.trash.common.enums.BusinessType; |
| 8 | +import com.trash.common.utils.SecurityUtils; | |
| 8 | 9 | import com.trash.common.utils.poi.ExcelUtil; |
| 9 | 10 | import com.trash.report.domain.WorkReport; |
| 10 | 11 | import com.trash.report.service.IWorkReportService; |
| ... | ... | @@ -12,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
| 12 | 13 | import org.springframework.security.access.prepost.PreAuthorize; |
| 13 | 14 | import org.springframework.web.bind.annotation.*; |
| 14 | 15 | |
| 16 | +import java.util.Date; | |
| 15 | 17 | import java.util.List; |
| 16 | 18 | |
| 17 | 19 | /** |
| ... | ... | @@ -35,6 +37,7 @@ public class WorkReportController extends BaseController |
| 35 | 37 | public TableDataInfo list(WorkReport workReport) |
| 36 | 38 | { |
| 37 | 39 | startPage(); |
| 40 | + workReport.setCreateBy(SecurityUtils.getUsername()); | |
| 38 | 41 | List<WorkReport> list = workReportService.selectWorkReportList(workReport); |
| 39 | 42 | return getDataTable(list); |
| 40 | 43 | } |
| ... | ... | @@ -69,7 +72,9 @@ public class WorkReportController extends BaseController |
| 69 | 72 | @Log(title = "ๅทฅไฝๆฅๆฅ", businessType = BusinessType.INSERT) |
| 70 | 73 | @PostMapping |
| 71 | 74 | public AjaxResult add(@RequestBody WorkReport workReport) |
| 72 | - { | |
| 75 | + { | |
| 76 | + workReport.setCreateBy(SecurityUtils.getUsername()); | |
| 77 | + workReport.setCreateTime(new Date()); | |
| 73 | 78 | return toAjax(workReportService.insertWorkReport(workReport)); |
| 74 | 79 | } |
| 75 | 80 | ... | ... |
trash-daily/src/main/java/com/trash/report/domain/WorkReport.java
| ... | ... | @@ -23,7 +23,7 @@ public class WorkReport extends BaseEntity |
| 23 | 23 | |
| 24 | 24 | /** ๆ ้ข */ |
| 25 | 25 | @Excel(name = "ๆ ้ข") |
| 26 | - private String weeklyTitle; | |
| 26 | + private String title; | |
| 27 | 27 | |
| 28 | 28 | /** ๅกซๅไบบ */ |
| 29 | 29 | @Excel(name = "ๅกซๅไบบ") |
| ... | ... | @@ -33,8 +33,59 @@ public class WorkReport extends BaseEntity |
| 33 | 33 | @JsonFormat(pattern = "yyyy-MM-dd") |
| 34 | 34 | @Excel(name = "ๅกซๅๆถ้ด", width = 30, dateFormat = "yyyy-MM-dd") |
| 35 | 35 | private Date writeTime; |
| 36 | + | |
| 37 | + int type; | |
| 38 | + | |
| 39 | + private String startTime; | |
| 40 | + private String endTime; | |
| 36 | 41 | |
| 37 | - /** ๆฅ่กจๅ ๅฎน */ | |
| 42 | + private Date createTime; | |
| 43 | + | |
| 44 | + private String attachmentLink; | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + public String getAttachmentLink() { | |
| 49 | + return attachmentLink; | |
| 50 | + } | |
| 51 | + | |
| 52 | + public void setAttachmentLink(String attachmentLink) { | |
| 53 | + this.attachmentLink = attachmentLink; | |
| 54 | + } | |
| 55 | + | |
| 56 | + public Date getCreateTime() { | |
| 57 | + return createTime; | |
| 58 | + } | |
| 59 | + | |
| 60 | + public void setCreateTime(Date createTime) { | |
| 61 | + this.createTime = createTime; | |
| 62 | + } | |
| 63 | + | |
| 64 | + public int getType() { | |
| 65 | + return type; | |
| 66 | + } | |
| 67 | + | |
| 68 | + public void setType(int type) { | |
| 69 | + this.type = type; | |
| 70 | + } | |
| 71 | + | |
| 72 | + public String getStartTime() { | |
| 73 | + return startTime; | |
| 74 | + } | |
| 75 | + | |
| 76 | + public void setStartTime(String startTime) { | |
| 77 | + this.startTime = startTime; | |
| 78 | + } | |
| 79 | + | |
| 80 | + public String getEndTime() { | |
| 81 | + return endTime; | |
| 82 | + } | |
| 83 | + | |
| 84 | + public void setEndTime(String endTime) { | |
| 85 | + this.endTime = endTime; | |
| 86 | + } | |
| 87 | + | |
| 88 | + /** ๆฅ่กจๅ ๅฎน */ | |
| 38 | 89 | private String reportContent; |
| 39 | 90 | |
| 40 | 91 | public void setId(Long id) |
| ... | ... | @@ -46,14 +97,14 @@ public class WorkReport extends BaseEntity |
| 46 | 97 | { |
| 47 | 98 | return id; |
| 48 | 99 | } |
| 49 | - public void setWeeklyTitle(String weeklyTitle) | |
| 100 | + public void setTitle(String title) | |
| 50 | 101 | { |
| 51 | - this.weeklyTitle = weeklyTitle; | |
| 102 | + this.title = title; | |
| 52 | 103 | } |
| 53 | 104 | |
| 54 | - public String getWeeklyTitle() | |
| 105 | + public String getTitle() | |
| 55 | 106 | { |
| 56 | - return weeklyTitle; | |
| 107 | + return title; | |
| 57 | 108 | } |
| 58 | 109 | public void setWriter(String writer) |
| 59 | 110 | { |
| ... | ... | @@ -87,7 +138,7 @@ public class WorkReport extends BaseEntity |
| 87 | 138 | public String toString() { |
| 88 | 139 | return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) |
| 89 | 140 | .append("id", getId()) |
| 90 | - .append("weeklyTitle", getWeeklyTitle()) | |
| 141 | + .append("weeklyTitle", getTitle()) | |
| 91 | 142 | .append("writer", getWriter()) |
| 92 | 143 | .append("writeTime", getWriteTime()) |
| 93 | 144 | .append("reportContent", getReportContent()) | ... | ... |
trash-daily/src/main/java/com/trash/situation/controller/DailySituationController.java
| ... | ... | @@ -5,6 +5,7 @@ import com.trash.common.core.controller.BaseController; |
| 5 | 5 | import com.trash.common.core.domain.AjaxResult; |
| 6 | 6 | import com.trash.common.core.page.TableDataInfo; |
| 7 | 7 | import com.trash.common.enums.BusinessType; |
| 8 | +import com.trash.common.utils.SecurityUtils; | |
| 8 | 9 | import com.trash.common.utils.poi.ExcelUtil; |
| 9 | 10 | import com.trash.situation.domain.DailySituation; |
| 10 | 11 | import com.trash.situation.service.IDailySituationService; |
| ... | ... | @@ -12,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
| 12 | 13 | import org.springframework.security.access.prepost.PreAuthorize; |
| 13 | 14 | import org.springframework.web.bind.annotation.*; |
| 14 | 15 | |
| 16 | +import java.util.Date; | |
| 15 | 17 | import java.util.List; |
| 16 | 18 | |
| 17 | 19 | /** |
| ... | ... | @@ -35,6 +37,7 @@ public class DailySituationController extends BaseController |
| 35 | 37 | public TableDataInfo list(DailySituation dailySituation) |
| 36 | 38 | { |
| 37 | 39 | startPage(); |
| 40 | + dailySituation.setCreateBy(SecurityUtils.getUsername()); | |
| 38 | 41 | List<DailySituation> list = dailySituationService.selectDailySituationList(dailySituation); |
| 39 | 42 | return getDataTable(list); |
| 40 | 43 | } |
| ... | ... | @@ -70,6 +73,8 @@ public class DailySituationController extends BaseController |
| 70 | 73 | @PostMapping |
| 71 | 74 | public AjaxResult add(@RequestBody DailySituation dailySituation) |
| 72 | 75 | { |
| 76 | + dailySituation.setCreateBy(SecurityUtils.getUsername()); | |
| 77 | + dailySituation.setCreateTime(new Date()); | |
| 73 | 78 | return toAjax(dailySituationService.insertDailySituation(dailySituation)); |
| 74 | 79 | } |
| 75 | 80 | ... | ... |
trash-daily/src/main/java/com/trash/toollist/controller/DailyToolListController.java
| ... | ... | @@ -5,6 +5,7 @@ import com.trash.common.core.controller.BaseController; |
| 5 | 5 | import com.trash.common.core.domain.AjaxResult; |
| 6 | 6 | import com.trash.common.core.page.TableDataInfo; |
| 7 | 7 | import com.trash.common.enums.BusinessType; |
| 8 | +import com.trash.common.utils.SecurityUtils; | |
| 8 | 9 | import com.trash.common.utils.poi.ExcelUtil; |
| 9 | 10 | import com.trash.toollist.domain.DailyToolList; |
| 10 | 11 | import com.trash.toollist.service.IDailyToolListService; |
| ... | ... | @@ -12,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
| 12 | 13 | import org.springframework.security.access.prepost.PreAuthorize; |
| 13 | 14 | import org.springframework.web.bind.annotation.*; |
| 14 | 15 | |
| 16 | +import java.util.Date; | |
| 15 | 17 | import java.util.List; |
| 16 | 18 | |
| 17 | 19 | /** |
| ... | ... | @@ -35,6 +37,7 @@ public class DailyToolListController extends BaseController |
| 35 | 37 | public TableDataInfo list(DailyToolList dailyToolList) |
| 36 | 38 | { |
| 37 | 39 | startPage(); |
| 40 | + dailyToolList.setCreateBy(SecurityUtils.getUsername()); | |
| 38 | 41 | List<DailyToolList> list = dailyToolListService.selectDailyToolListList(dailyToolList); |
| 39 | 42 | return getDataTable(list); |
| 40 | 43 | } |
| ... | ... | @@ -69,7 +72,10 @@ public class DailyToolListController extends BaseController |
| 69 | 72 | @Log(title = "ๆฏๆฅๅทฅไฝๆธ ๅ", businessType = BusinessType.INSERT) |
| 70 | 73 | @PostMapping |
| 71 | 74 | public AjaxResult add(@RequestBody DailyToolList dailyToolList) |
| 72 | - { | |
| 75 | + { | |
| 76 | + | |
| 77 | + dailyToolList.setCreateBy(SecurityUtils.getUsername()); | |
| 78 | + dailyToolList.setCreateTime(new Date()); | |
| 73 | 79 | return toAjax(dailyToolListService.insertDailyToolList(dailyToolList)); |
| 74 | 80 | } |
| 75 | 81 | ... | ... |
trash-daily/src/main/java/com/trash/weekly/controller/WeeklyController.java deleted
100644 โ 0
| 1 | -package com.trash.weekly.controller; | |
| 2 | - | |
| 3 | -import com.trash.common.annotation.Log; | |
| 4 | -import com.trash.common.core.controller.BaseController; | |
| 5 | -import com.trash.common.core.domain.AjaxResult; | |
| 6 | -import com.trash.common.core.page.TableDataInfo; | |
| 7 | -import com.trash.common.enums.BusinessType; | |
| 8 | -import com.trash.common.utils.poi.ExcelUtil; | |
| 9 | -import com.trash.daily.domain.PeriodicReport; | |
| 10 | -import com.trash.weekly.service.IWeeklyService; | |
| 11 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 12 | -import org.springframework.security.access.prepost.PreAuthorize; | |
| 13 | -import org.springframework.web.bind.annotation.*; | |
| 14 | - | |
| 15 | -import java.util.List; | |
| 16 | - | |
| 17 | -/** | |
| 18 | - * ๅจๆฅController | |
| 19 | - * | |
| 20 | - * @author trash | |
| 21 | - * @date 2023-04-23 | |
| 22 | - */ | |
| 23 | -@RestController | |
| 24 | -@RequestMapping("/report/weekly") | |
| 25 | -public class WeeklyController extends BaseController | |
| 26 | -{ | |
| 27 | - @Autowired | |
| 28 | - private IWeeklyService weeklyService; | |
| 29 | - | |
| 30 | - /** | |
| 31 | - * ๆฅ่ฏขๅจๆฅๅ่กจ | |
| 32 | - */ | |
| 33 | - @PreAuthorize("@ss.hasPermi('report:weekly:list')") | |
| 34 | - @GetMapping("/list") | |
| 35 | - public TableDataInfo list(PeriodicReport periodicReport) | |
| 36 | - { | |
| 37 | - startPage(); | |
| 38 | - List<PeriodicReport> list = weeklyService.selectWeeklyList(periodicReport); | |
| 39 | - return getDataTable(list); | |
| 40 | - } | |
| 41 | - | |
| 42 | - /** | |
| 43 | - * ๅฏผๅบๅจๆฅๅ่กจ | |
| 44 | - */ | |
| 45 | - @PreAuthorize("@ss.hasPermi('report:weekly:export')") | |
| 46 | - @Log(title = "ๅจๆฅ", businessType = BusinessType.EXPORT) | |
| 47 | - @GetMapping("/export") | |
| 48 | - public AjaxResult export(PeriodicReport periodicReport) | |
| 49 | - { | |
| 50 | - List<PeriodicReport> list = weeklyService.selectWeeklyList(periodicReport); | |
| 51 | - ExcelUtil<PeriodicReport> util = new ExcelUtil<PeriodicReport>(PeriodicReport.class); | |
| 52 | - return util.exportExcel(list, "weekly"); | |
| 53 | - } | |
| 54 | - | |
| 55 | - /** | |
| 56 | - * ่ทๅๅจๆฅ่ฏฆ็ปไฟกๆฏ | |
| 57 | - */ | |
| 58 | - @PreAuthorize("@ss.hasPermi('report:weekly:query')") | |
| 59 | - @GetMapping(value = "/{id}") | |
| 60 | - public AjaxResult getInfo(@PathVariable("id") Long id) | |
| 61 | - { | |
| 62 | - return AjaxResult.success(weeklyService.selectWeeklyById(id)); | |
| 63 | - } | |
| 64 | - | |
| 65 | - /** | |
| 66 | - * ๆฐๅขๅจๆฅ | |
| 67 | - */ | |
| 68 | - @PreAuthorize("@ss.hasPermi('report:weekly:add')") | |
| 69 | - @Log(title = "ๅจๆฅ", businessType = BusinessType.INSERT) | |
| 70 | - @PostMapping | |
| 71 | - public AjaxResult add(@RequestBody PeriodicReport periodicReport) | |
| 72 | - { | |
| 73 | - return toAjax(weeklyService.insertWeekly(periodicReport)); | |
| 74 | - } | |
| 75 | - | |
| 76 | - /** | |
| 77 | - * ไฟฎๆนๅจๆฅ | |
| 78 | - */ | |
| 79 | - @PreAuthorize("@ss.hasPermi('report:weekly:edit')") | |
| 80 | - @Log(title = "ๅจๆฅ", businessType = BusinessType.UPDATE) | |
| 81 | - @PutMapping | |
| 82 | - public AjaxResult edit(@RequestBody PeriodicReport periodicReport) | |
| 83 | - { | |
| 84 | - return toAjax(weeklyService.updateWeekly(periodicReport)); | |
| 85 | - } | |
| 86 | - | |
| 87 | - /** | |
| 88 | - * ๅ ้คๅจๆฅ | |
| 89 | - */ | |
| 90 | - @PreAuthorize("@ss.hasPermi('report:weekly:remove')") | |
| 91 | - @Log(title = "ๅจๆฅ", businessType = BusinessType.DELETE) | |
| 92 | - @DeleteMapping("/{ids}") | |
| 93 | - public AjaxResult remove(@PathVariable Long[] ids) | |
| 94 | - { | |
| 95 | - return toAjax(weeklyService.deleteWeeklyByIds(ids)); | |
| 96 | - } | |
| 97 | -} | |
| 98 | 0 | \ No newline at end of file |
trash-daily/src/main/java/com/trash/weekly/service/impl/WeeklyServiceImpl.java deleted
100644 โ 0
| 1 | -package com.trash.weekly.service.impl; | |
| 2 | - | |
| 3 | -import com.trash.daily.domain.PeriodicReport; | |
| 4 | -import com.trash.weekly.mapper.WeeklyMapper; | |
| 5 | -import com.trash.weekly.service.IWeeklyService; | |
| 6 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 7 | -import org.springframework.stereotype.Service; | |
| 8 | - | |
| 9 | -import java.util.List; | |
| 10 | - | |
| 11 | -/** | |
| 12 | - * ๅจๆฅServiceไธๅกๅฑๅค็ | |
| 13 | - * | |
| 14 | - * @author trash | |
| 15 | - * @date 2023-04-21 | |
| 16 | - */ | |
| 17 | -@Service | |
| 18 | -public class WeeklyServiceImpl implements IWeeklyService | |
| 19 | -{ | |
| 20 | - @Autowired | |
| 21 | - private WeeklyMapper weeklyMapper; | |
| 22 | - | |
| 23 | - /** | |
| 24 | - * ๆฅ่ฏขๅจๆฅ | |
| 25 | - * | |
| 26 | - * @param id ๅจๆฅID | |
| 27 | - * @return ๅจๆฅ | |
| 28 | - */ | |
| 29 | - @Override | |
| 30 | - public PeriodicReport selectWeeklyById(Long id) | |
| 31 | - { | |
| 32 | - return weeklyMapper.selectWeeklyById(id); | |
| 33 | - } | |
| 34 | - | |
| 35 | - /** | |
| 36 | - * ๆฅ่ฏขๅจๆฅๅ่กจ | |
| 37 | - * | |
| 38 | - * @param weekly ๅจๆฅ | |
| 39 | - * @return ๅจๆฅ | |
| 40 | - */ | |
| 41 | - @Override | |
| 42 | - public List<PeriodicReport> selectWeeklyList(PeriodicReport weekly) | |
| 43 | - { | |
| 44 | - return weeklyMapper.selectWeeklyList(weekly); | |
| 45 | - } | |
| 46 | - | |
| 47 | - /** | |
| 48 | - * ๆฐๅขๅจๆฅ | |
| 49 | - * | |
| 50 | - * @param weekly ๅจๆฅ | |
| 51 | - * @return ็ปๆ | |
| 52 | - */ | |
| 53 | - @Override | |
| 54 | - public int insertWeekly(PeriodicReport weekly) | |
| 55 | - { | |
| 56 | - return weeklyMapper.insertWeekly(weekly); | |
| 57 | - } | |
| 58 | - | |
| 59 | - /** | |
| 60 | - * ไฟฎๆนๅจๆฅ | |
| 61 | - * | |
| 62 | - * @param weekly ๅจๆฅ | |
| 63 | - * @return ็ปๆ | |
| 64 | - */ | |
| 65 | - @Override | |
| 66 | - public int updateWeekly(PeriodicReport weekly) | |
| 67 | - { | |
| 68 | - return weeklyMapper.updateWeekly(weekly); | |
| 69 | - } | |
| 70 | - | |
| 71 | - /** | |
| 72 | - * ๆน้ๅ ้คๅจๆฅ | |
| 73 | - * | |
| 74 | - * @param ids ้่ฆๅ ้ค็ๅจๆฅID | |
| 75 | - * @return ็ปๆ | |
| 76 | - */ | |
| 77 | - @Override | |
| 78 | - public int deleteWeeklyByIds(Long[] ids) | |
| 79 | - { | |
| 80 | - return weeklyMapper.deleteWeeklyByIds(ids); | |
| 81 | - } | |
| 82 | - | |
| 83 | - /** | |
| 84 | - * ๅ ้คๅจๆฅไฟกๆฏ | |
| 85 | - * | |
| 86 | - * @param id ๅจๆฅID | |
| 87 | - * @return ็ปๆ | |
| 88 | - */ | |
| 89 | - @Override | |
| 90 | - public int deleteWeeklyById(Long id) | |
| 91 | - { | |
| 92 | - return weeklyMapper.deleteWeeklyById(id); | |
| 93 | - } | |
| 94 | -} |
trash-daily/src/main/resources/mapper/daily/DailyMapper.xml deleted
100644 โ 0
| 1 | -<?xml version="1.0" encoding="UTF-8" ?> | |
| 2 | -<!DOCTYPE mapper | |
| 3 | - PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |
| 4 | - "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 5 | -<mapper namespace="com.trash.daily.mapper.DailyMapper"> | |
| 6 | - | |
| 7 | - <resultMap type="PeriodicReport" id="PeriodicReportResult"> | |
| 8 | - <result property="id" column="id" /> | |
| 9 | - <result property="headline" column="headline" /> | |
| 10 | - <result property="writer" column="writer" /> | |
| 11 | - <result property="writeTime" column="write_time" /> | |
| 12 | - <result property="content" column="content" /> | |
| 13 | - <result property="begintime" column="beginTime" /> | |
| 14 | - <result property="endtime" column="endTime" /> | |
| 15 | - <result property="contentType" column="content_type" /> | |
| 16 | - </resultMap> | |
| 17 | - | |
| 18 | - <sql id="selectDailyVo"> | |
| 19 | - select id, headline, writer, write_time, content, beginTime, endTime, content_type from periodic_report | |
| 20 | - </sql> | |
| 21 | - | |
| 22 | - <select id="selectDailyList" parameterType="PeriodicReport" resultMap="PeriodicReportResult"> | |
| 23 | - <include refid="selectDailyVo"/> | |
| 24 | - <where> | |
| 25 | - <if test="headline != null and headline != ''"> and headline = #{headline}</if> | |
| 26 | - and content_type = 1 | |
| 27 | - </where> | |
| 28 | - </select> | |
| 29 | - | |
| 30 | - <select id="selectDailyById" parameterType="Long" resultMap="PeriodicReportResult"> | |
| 31 | - <include refid="selectDailyVo"/> | |
| 32 | - where id = #{id} | |
| 33 | - </select> | |
| 34 | - | |
| 35 | - <insert id="insertDaily" parameterType="PeriodicReport" useGeneratedKeys="true" keyProperty="id"> | |
| 36 | - insert into periodic_report | |
| 37 | - <trim prefix="(" suffix=")" suffixOverrides=","> | |
| 38 | - <if test="headline != null">headline,</if> | |
| 39 | - <if test="writer != null">writer,</if> | |
| 40 | - <if test="writeTime != null">write_time,</if> | |
| 41 | - <if test="content != null">content,</if> | |
| 42 | - <if test="begintime != null">beginTime,</if> | |
| 43 | - <if test="endtime != null">endTime,</if> | |
| 44 | - content_type | |
| 45 | - </trim> | |
| 46 | - <trim prefix="values (" suffix=")" suffixOverrides=","> | |
| 47 | - <if test="headline != null">#{headline},</if> | |
| 48 | - <if test="writer != null">#{writer},</if> | |
| 49 | - <if test="writeTime != null">#{writeTime},</if> | |
| 50 | - <if test="content != null">#{content},</if> | |
| 51 | - <if test="begintime != null">#{begintime},</if> | |
| 52 | - <if test="endtime != null">#{endtime},</if> | |
| 53 | - 1 | |
| 54 | - </trim> | |
| 55 | - </insert> | |
| 56 | - | |
| 57 | - <update id="updateDaily" parameterType="PeriodicReport"> | |
| 58 | - update periodic_report | |
| 59 | - <trim prefix="SET" suffixOverrides=","> | |
| 60 | - <if test="headline != null">headline = #{headline},</if> | |
| 61 | - <if test="writer != null">writer = #{writer},</if> | |
| 62 | - <if test="writeTime != null">write_time = #{writeTime},</if> | |
| 63 | - <if test="content != null">content = #{content},</if> | |
| 64 | - <if test="begintime != null">beginTime = #{begintime},</if> | |
| 65 | - <if test="endtime != null">endTime = #{endtime},</if> | |
| 66 | - <if test="contentType != null">content_type = #{contentType},</if> | |
| 67 | - </trim> | |
| 68 | - where id = #{id} | |
| 69 | - </update> | |
| 70 | - | |
| 71 | - <delete id="deleteDailyById" parameterType="Long"> | |
| 72 | - delete from periodic_report where id = #{id} | |
| 73 | - </delete> | |
| 74 | - | |
| 75 | - <delete id="deleteDailyByIds" parameterType="String"> | |
| 76 | - delete from periodic_report where id in | |
| 77 | - <foreach item="id" collection="array" open="(" separator="," close=")"> | |
| 78 | - #{id} | |
| 79 | - </foreach> | |
| 80 | - </delete> | |
| 81 | -</mapper> | |
| 82 | 0 | \ No newline at end of file |
trash-daily/src/main/resources/mapper/information_sharing/InformationSharingMapper.xml
| ... | ... | @@ -12,10 +12,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 12 | 12 | <result property="retrieveContent" column="retrieve_content" /> |
| 13 | 13 | <result property="attachmentLink" column="attachment_link" /> |
| 14 | 14 | <result property="informationLink" column="information_link" /> |
| 15 | + <result property="createBy" column="create_by" /> | |
| 15 | 16 | </resultMap> |
| 16 | 17 | |
| 17 | 18 | <sql id="selectInformationSharingVo"> |
| 18 | - select id, data_header, retrieve_department, retrieve_time, retrieve_content, attachment_link, information_link from information_sharing | |
| 19 | + select id, data_header, retrieve_department, retrieve_time, retrieve_content, attachment_link, information_link,create_by from information_sharing | |
| 19 | 20 | </sql> |
| 20 | 21 | |
| 21 | 22 | <select id="selectInformationSharingList" parameterType="InformationSharing" resultMap="InformationSharingResult"> |
| ... | ... | @@ -23,8 +24,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 23 | 24 | <where> |
| 24 | 25 | <if test="dataHeader != null and dataHeader != ''"> and data_header like concat('%', #{dataHeader}, '%')</if> |
| 25 | 26 | <if test="retrieveDepartment != null and retrieveDepartment != ''"> and retrieve_department like concat('%', #{retrieveDepartment}, '%')</if> |
| 27 | + <if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if> | |
| 26 | 28 | </where> |
| 27 | - </select> | |
| 29 | + | |
| 30 | + ORDER BY retrieve_time DESC | |
| 31 | + </select> | |
| 28 | 32 | |
| 29 | 33 | <select id="selectInformationSharingById" parameterType="Long" resultMap="InformationSharingResult"> |
| 30 | 34 | <include refid="selectInformationSharingVo"/> |
| ... | ... | @@ -40,6 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 40 | 44 | <if test="retrieveContent != null">retrieve_content,</if> |
| 41 | 45 | <if test="attachmentLink != null">attachment_link,</if> |
| 42 | 46 | <if test="informationLink != null">information_link,</if> |
| 47 | + <if test="createBy != null">create_by,</if> | |
| 43 | 48 | </trim> |
| 44 | 49 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| 45 | 50 | <if test="dataHeader != null">#{dataHeader},</if> |
| ... | ... | @@ -48,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 48 | 53 | <if test="retrieveContent != null">#{retrieveContent},</if> |
| 49 | 54 | <if test="attachmentLink != null">#{attachmentLink},</if> |
| 50 | 55 | <if test="informationLink != null">#{informationLink},</if> |
| 56 | + <if test="createBy != null">#{createBy},</if> | |
| 51 | 57 | </trim> |
| 52 | 58 | </insert> |
| 53 | 59 | |
| ... | ... | @@ -60,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 60 | 66 | <if test="retrieveContent != null">retrieve_content = #{retrieveContent},</if> |
| 61 | 67 | <if test="attachmentLink != null">attachment_link = #{attachmentLink},</if> |
| 62 | 68 | <if test="informationLink != null">information_link = #{informationLink},</if> |
| 69 | + <if test="createBy != null">create_by = #{createBy},</if> | |
| 63 | 70 | </trim> |
| 64 | 71 | where id = #{id} |
| 65 | 72 | </update> | ... | ... |
trash-daily/src/main/resources/mapper/monthly/MonthlyReportMapper.xml deleted
100644 โ 0
| 1 | -<?xml version="1.0" encoding="UTF-8" ?> | |
| 2 | -<!DOCTYPE mapper | |
| 3 | - PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |
| 4 | - "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 5 | -<mapper namespace="com.trash.monthly.mapper.MonthlyReportMapper"> | |
| 6 | - | |
| 7 | - <resultMap type="PeriodicReport" id="PeriodicReportResult"> | |
| 8 | - <result property="id" column="id" /> | |
| 9 | - <result property="headline" column="headline" /> | |
| 10 | - <result property="writer" column="writer" /> | |
| 11 | - <result property="writeTime" column="write_time" /> | |
| 12 | - <result property="content" column="content" /> | |
| 13 | - <result property="begintime" column="beginTime" /> | |
| 14 | - <result property="endtime" column="endTime" /> | |
| 15 | - <result property="contentType" column="content_type" /> | |
| 16 | - </resultMap> | |
| 17 | - | |
| 18 | - <sql id="selectMonthlyReportVo"> | |
| 19 | - select id, headline, writer, write_time, content, beginTime, endTime, content_type from periodic_report | |
| 20 | - </sql> | |
| 21 | - | |
| 22 | - <select id="selectMonthlyReportList" parameterType="PeriodicReport" resultMap="PeriodicReportResult"> | |
| 23 | - <include refid="selectMonthlyReportVo"/> | |
| 24 | - <where> | |
| 25 | - <if test="headline != null and headline != ''"> and headline = #{headline}</if> | |
| 26 | - and content_type = 3 | |
| 27 | - </where> | |
| 28 | - </select> | |
| 29 | - | |
| 30 | - <select id="selectMonthlyReportById" parameterType="Long" resultMap="PeriodicReportResult"> | |
| 31 | - <include refid="selectMonthlyReportVo"/> | |
| 32 | - where id = #{id} | |
| 33 | - </select> | |
| 34 | - | |
| 35 | - <insert id="insertMonthlyReport" parameterType="PeriodicReport" useGeneratedKeys="true" keyProperty="id"> | |
| 36 | - insert into periodic_report | |
| 37 | - <trim prefix="(" suffix=")" suffixOverrides=","> | |
| 38 | - <if test="headline != null">headline,</if> | |
| 39 | - <if test="writer != null">writer,</if> | |
| 40 | - <if test="writeTime != null">write_time,</if> | |
| 41 | - <if test="content != null">content,</if> | |
| 42 | - <if test="begintime != null">beginTime,</if> | |
| 43 | - <if test="endtime != null">endTime,</if> | |
| 44 | - content_type | |
| 45 | - </trim> | |
| 46 | - <trim prefix="values (" suffix=")" suffixOverrides=","> | |
| 47 | - <if test="headline != null">#{headline},</if> | |
| 48 | - <if test="writer != null">#{writer},</if> | |
| 49 | - <if test="writeTime != null">#{writeTime},</if> | |
| 50 | - <if test="content != null">#{content},</if> | |
| 51 | - <if test="begintime != null">#{begintime},</if> | |
| 52 | - <if test="endtime != null">#{endtime},</if> | |
| 53 | - 3 | |
| 54 | - </trim> | |
| 55 | - </insert> | |
| 56 | - | |
| 57 | - <update id="updateMonthlyReport" parameterType="PeriodicReport"> | |
| 58 | - update periodic_report | |
| 59 | - <trim prefix="SET" suffixOverrides=","> | |
| 60 | - <if test="headline != null">headline = #{headline},</if> | |
| 61 | - <if test="writer != null">writer = #{writer},</if> | |
| 62 | - <if test="writeTime != null">write_time = #{writeTime},</if> | |
| 63 | - <if test="content != null">content = #{content},</if> | |
| 64 | - <if test="begintime != null">beginTime = #{begintime},</if> | |
| 65 | - <if test="endtime != null">endTime = #{endtime},</if> | |
| 66 | - <if test="contentType != null">content_type = #{contentType},</if> | |
| 67 | - </trim> | |
| 68 | - where id = #{id} | |
| 69 | - </update> | |
| 70 | - | |
| 71 | - <delete id="deleteMonthlyReportById" parameterType="Long"> | |
| 72 | - delete from periodic_report where id = #{id} | |
| 73 | - </delete> | |
| 74 | - | |
| 75 | - <delete id="deleteMonthlyReportByIds" parameterType="String"> | |
| 76 | - delete from periodic_report where id in | |
| 77 | - <foreach item="id" collection="array" open="(" separator="," close=")"> | |
| 78 | - #{id} | |
| 79 | - </foreach> | |
| 80 | - </delete> | |
| 81 | - | |
| 82 | -</mapper> | |
| 83 | 0 | \ No newline at end of file |
trash-daily/src/main/resources/mapper/report/WorkReportMapper.xml
| ... | ... | @@ -6,20 +6,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 6 | 6 | |
| 7 | 7 | <resultMap type="WorkReport" id="WorkReportResult"> |
| 8 | 8 | <result property="id" column="id" /> |
| 9 | - <result property="weeklyTitle" column="weekly_title" /> | |
| 9 | + <result property="title" column="title" /> | |
| 10 | 10 | <result property="writer" column="writer" /> |
| 11 | 11 | <result property="writeTime" column="write_time" /> |
| 12 | 12 | <result property="reportContent" column="report_content" /> |
| 13 | + <result property="type" column="type" /> | |
| 14 | + <result property="startTime" column="start_time" /> | |
| 15 | + <result property="endTime" column="end_time" /> | |
| 16 | + <result property="createBy" column="create_by" /> | |
| 17 | + <result property="createTime" column="create_time" /> | |
| 18 | + <result property="attachmentLink" column="attachment_link" /> | |
| 19 | + | |
| 13 | 20 | </resultMap> |
| 14 | 21 | |
| 15 | 22 | <sql id="selectWorkReportVo"> |
| 16 | - select id, weekly_title, writer, write_time, report_content from work_report | |
| 23 | + select id, title, writer, write_time, report_content,type,start_time,end_time,create_by,create_time,attachment_link from work_report | |
| 17 | 24 | </sql> |
| 18 | 25 | |
| 19 | 26 | <select id="selectWorkReportList" parameterType="WorkReport" resultMap="WorkReportResult"> |
| 20 | 27 | <include refid="selectWorkReportVo"/> |
| 21 | 28 | <where> |
| 22 | - <if test="weeklyTitle != null and weeklyTitle != ''"> and weekly_title = #{weeklyTitle}</if> | |
| 29 | + <if test="title != null and title != ''"> and title = #{title}</if> | |
| 30 | + <if test="type != null and type != ''"> and type = #{type}</if> | |
| 31 | + <if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if> | |
| 23 | 32 | </where> |
| 24 | 33 | </select> |
| 25 | 34 | |
| ... | ... | @@ -31,26 +40,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 31 | 40 | <insert id="insertWorkReport" parameterType="WorkReport" useGeneratedKeys="true" keyProperty="id"> |
| 32 | 41 | insert into work_report |
| 33 | 42 | <trim prefix="(" suffix=")" suffixOverrides=","> |
| 34 | - <if test="weeklyTitle != null and weeklyTitle != ''">weekly_title,</if> | |
| 43 | + <if test="title != null and title != ''">title,</if> | |
| 35 | 44 | <if test="writer != null and writer != ''">writer,</if> |
| 36 | 45 | <if test="writeTime != null">write_time,</if> |
| 46 | + <if test="startTime != null">start_time,</if> | |
| 47 | + <if test="endTime != null">end_time,</if> | |
| 37 | 48 | <if test="reportContent != null and reportContent != ''">report_content,</if> |
| 49 | + <if test="createBy != ''">create_by,</if> | |
| 50 | + <if test="attachmentLink!= null and attachmentLink != ''">attachment_link,</if> | |
| 51 | + create_time, | |
| 52 | + type, | |
| 38 | 53 | </trim> |
| 39 | 54 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| 40 | - <if test="weeklyTitle != null and weeklyTitle != ''">#{weeklyTitle},</if> | |
| 55 | + <if test="title != null and title != ''">#{title},</if> | |
| 41 | 56 | <if test="writer != null and writer != ''">#{writer},</if> |
| 42 | 57 | <if test="writeTime != null">#{writeTime},</if> |
| 58 | + <if test="startTime != null">#{startTime},</if> | |
| 59 | + <if test="endTime != null">#{endTime},</if> | |
| 43 | 60 | <if test="reportContent != null and reportContent != ''">#{reportContent},</if> |
| 61 | + <if test="createBy != ''">#{createBy},</if> | |
| 62 | + <if test="attachmentLink!= null and attachmentLink != ''">#{attachmentLink},</if> | |
| 63 | + NOW(), | |
| 64 | + #{type} | |
| 44 | 65 | </trim> |
| 45 | 66 | </insert> |
| 46 | 67 | |
| 47 | 68 | <update id="updateWorkReport" parameterType="WorkReport"> |
| 48 | 69 | update work_report |
| 49 | 70 | <trim prefix="SET" suffixOverrides=","> |
| 50 | - <if test="weeklyTitle != null and weeklyTitle != ''">weekly_title = #{weeklyTitle},</if> | |
| 71 | + <if test="title != null and title != ''">title = #{title},</if> | |
| 51 | 72 | <if test="writer != null and writer != ''">writer = #{writer},</if> |
| 52 | 73 | <if test="writeTime != null">write_time = #{writeTime},</if> |
| 74 | + <if test="startTime != null">start_time = #{startTime},</if> | |
| 75 | + <if test="endTime != null">end_time = #{endTime},</if> | |
| 53 | 76 | <if test="reportContent != null and reportContent != ''">report_content = #{reportContent},</if> |
| 77 | + <if test="attachmentLink!= null and attachmentLink != ''">attachment_link = #{attachment_link},</if> | |
| 54 | 78 | </trim> |
| 55 | 79 | where id = #{id} |
| 56 | 80 | </update> | ... | ... |
trash-daily/src/main/resources/mapper/situation/DailySituationMapper.xml
| ... | ... | @@ -12,12 +12,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 12 | 12 | <result property="weather" column="weather" /> |
| 13 | 13 | <result property="consumptionSiteSituation" column="Consumption_site_situation" /> |
| 14 | 14 | <result property="numberOfVehicles" column="Number_of_vehicles" /> |
| 15 | + <result property="createBy" column="create_by" /> | |
| 15 | 16 | <result property="createTime" column="create_time" /> |
| 16 | 17 | <result property="updateTime" column="update_time" /> |
| 18 | + | |
| 17 | 19 | </resultMap> |
| 18 | 20 | |
| 19 | 21 | <sql id="selectDailySituationVo"> |
| 20 | - select id, title, operator, date, weather, Consumption_site_situation, Number_of_vehicles, create_time, update_time from daily_situation | |
| 22 | + select id, title, operator, date, weather, Consumption_site_situation, Number_of_vehicles, create_time, update_time,create_by from daily_situation | |
| 21 | 23 | </sql> |
| 22 | 24 | |
| 23 | 25 | <select id="selectDailySituationList" parameterType="DailySituation" resultMap="DailySituationResult"> |
| ... | ... | @@ -25,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 25 | 27 | <where> |
| 26 | 28 | <if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if> |
| 27 | 29 | <if test="operator != null and operator != ''"> and operator like concat('%', #{operator}, '%')</if> |
| 28 | - <if test="updateTime != null "> and update_time = #{updateTime}</if> | |
| 30 | + <if test="createBy != null "> and create_by = #{createBy}</if> | |
| 29 | 31 | </where> |
| 30 | 32 | </select> |
| 31 | 33 | |
| ... | ... | @@ -46,6 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 46 | 48 | <if test="numberOfVehicles != null">Number_of_vehicles,</if> |
| 47 | 49 | <if test="createTime != null">create_time,</if> |
| 48 | 50 | <if test="updateTime != null">update_time,</if> |
| 51 | + <if test="createBy != null">create_by,</if> | |
| 49 | 52 | </trim> |
| 50 | 53 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| 51 | 54 | <if test="id != null and id != ''">#{id},</if> |
| ... | ... | @@ -57,6 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 57 | 60 | <if test="numberOfVehicles != null">#{numberOfVehicles},</if> |
| 58 | 61 | <if test="createTime != null">#{createTime},</if> |
| 59 | 62 | <if test="updateTime != null">#{updateTime},</if> |
| 63 | + <if test="createBy != null">#{createBy}</if> | |
| 60 | 64 | </trim> |
| 61 | 65 | </insert> |
| 62 | 66 | ... | ... |
trash-daily/src/main/resources/mapper/toollist/DailyToolListMapper.xml
| ... | ... | @@ -15,10 +15,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 15 | 15 | <result property="managementLeader" column="Management_leader" /> |
| 16 | 16 | <result property="lawEnforcementOfficer" column="Law_enforcement_officer" /> |
| 17 | 17 | <result property="specificSituationOfTheCensus" column="Specific_situation_of_the_census" /> |
| 18 | + <result property="createTime" column="create_time" /> | |
| 19 | + <result property="updateTime" column="update_time" /> | |
| 20 | + <result property="createBy" column="create_by" /> | |
| 21 | + | |
| 18 | 22 | </resultMap> |
| 19 | 23 | |
| 20 | 24 | <sql id="selectDailyToolListVo"> |
| 21 | - select id, title, region, operator, date, Number_of_construction_sites, Census_structure, Management_leader, Law_enforcement_officer, Specific_situation_of_the_census from daily_tool_list | |
| 25 | + select id, title, region, operator, date, Number_of_construction_sites, Census_structure, Management_leader, Law_enforcement_officer, Specific_situation_of_the_census,create_by,create_time,update_time from daily_tool_list | |
| 22 | 26 | </sql> |
| 23 | 27 | |
| 24 | 28 | <select id="selectDailyToolListList" parameterType="DailyToolList" resultMap="DailyToolListResult"> |
| ... | ... | @@ -26,7 +30,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 26 | 30 | <where> |
| 27 | 31 | <if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if> |
| 28 | 32 | <if test="operator != null and operator != ''"> and operator like concat('%', #{operator}, '%')</if> |
| 33 | + <if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if> | |
| 29 | 34 | </where> |
| 35 | + ORDER BY create_time desc | |
| 30 | 36 | </select> |
| 31 | 37 | |
| 32 | 38 | <select id="selectDailyToolListById" parameterType="Long" resultMap="DailyToolListResult"> |
| ... | ... | @@ -46,6 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 46 | 52 | <if test="managementLeader != null">Management_leader,</if> |
| 47 | 53 | <if test="lawEnforcementOfficer != null">Law_enforcement_officer,</if> |
| 48 | 54 | <if test="specificSituationOfTheCensus != null">Specific_situation_of_the_census,</if> |
| 55 | + <if test="createBy != null">create_by,</if> | |
| 49 | 56 | </trim> |
| 50 | 57 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| 51 | 58 | <if test="title != null">#{title},</if> |
| ... | ... | @@ -57,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 57 | 64 | <if test="managementLeader != null">#{managementLeader},</if> |
| 58 | 65 | <if test="lawEnforcementOfficer != null">#{lawEnforcementOfficer},</if> |
| 59 | 66 | <if test="specificSituationOfTheCensus != null">#{specificSituationOfTheCensus},</if> |
| 67 | + <if test="createBy != null">#{createBy},</if> | |
| 60 | 68 | </trim> |
| 61 | 69 | </insert> |
| 62 | 70 | ... | ... |
trash-daily/src/main/resources/mapper/weekly/WeeklyMapper.xml deleted
100644 โ 0
| 1 | -<?xml version="1.0" encoding="UTF-8" ?> | |
| 2 | -<!DOCTYPE mapper | |
| 3 | - PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |
| 4 | - "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 5 | -<mapper namespace="com.trash.weekly.mapper.WeeklyMapper"> | |
| 6 | - | |
| 7 | - <resultMap type="PeriodicReport" id="PeriodicReportResult"> | |
| 8 | - <result property="id" column="id" /> | |
| 9 | - <result property="headline" column="headline" /> | |
| 10 | - <result property="writer" column="writer" /> | |
| 11 | - <result property="writeTime" column="write_time" /> | |
| 12 | - <result property="content" column="content" /> | |
| 13 | - <result property="begintime" column="beginTime" /> | |
| 14 | - <result property="endtime" column="endTime" /> | |
| 15 | - <result property="contentType" column="content_type" /> | |
| 16 | - </resultMap> | |
| 17 | - | |
| 18 | - <sql id="selectWeeklyVo"> | |
| 19 | - select id, headline, writer, write_time, content, beginTime, endTime, content_type from periodic_report | |
| 20 | - </sql> | |
| 21 | - | |
| 22 | - <select id="selectWeeklyList" parameterType="PeriodicReport" resultMap="PeriodicReportResult"> | |
| 23 | - <include refid="selectWeeklyVo"/> | |
| 24 | - <where> | |
| 25 | - <if test="headline != null and headline != ''"> and headline = #{headline}</if> | |
| 26 | - and content_type = 2 | |
| 27 | - </where> | |
| 28 | - </select> | |
| 29 | - | |
| 30 | - <select id="selectWeeklyById" parameterType="Long" resultMap="PeriodicReportResult"> | |
| 31 | - <include refid="selectWeeklyVo"/> | |
| 32 | - where id = #{id} | |
| 33 | - </select> | |
| 34 | - | |
| 35 | - <insert id="insertWeekly" parameterType="PeriodicReport" useGeneratedKeys="true" keyProperty="id"> | |
| 36 | - insert into periodic_report | |
| 37 | - <trim prefix="(" suffix=")" suffixOverrides=","> | |
| 38 | - <if test="headline != null">headline,</if> | |
| 39 | - <if test="writer != null">writer,</if> | |
| 40 | - <if test="writeTime != null">write_time,</if> | |
| 41 | - <if test="content != null">content,</if> | |
| 42 | - <if test="begintime != null">beginTime,</if> | |
| 43 | - <if test="endtime != null">endTime,</if> | |
| 44 | - content_type | |
| 45 | - </trim> | |
| 46 | - <trim prefix="values (" suffix=")" suffixOverrides=","> | |
| 47 | - <if test="headline != null">#{headline},</if> | |
| 48 | - <if test="writer != null">#{writer},</if> | |
| 49 | - <if test="writeTime != null">#{writeTime},</if> | |
| 50 | - <if test="content != null">#{content},</if> | |
| 51 | - <if test="begintime != null">#{begintime},</if> | |
| 52 | - <if test="endtime != null">#{endtime},</if> | |
| 53 | - 2 | |
| 54 | - </trim> | |
| 55 | - </insert> | |
| 56 | - | |
| 57 | - <update id="updateWeekly" parameterType="PeriodicReport"> | |
| 58 | - update periodic_report | |
| 59 | - <trim prefix="SET" suffixOverrides=","> | |
| 60 | - <if test="headline != null">headline = #{headline},</if> | |
| 61 | - <if test="writer != null">writer = #{writer},</if> | |
| 62 | - <if test="writeTime != null">write_time = #{writeTime},</if> | |
| 63 | - <if test="content != null">content = #{content},</if> | |
| 64 | - <if test="begintime != null">beginTime = #{begintime},</if> | |
| 65 | - <if test="endtime != null">endTime = #{endtime},</if> | |
| 66 | - <if test="contentType != null">content_type = #{contentType},</if> | |
| 67 | - </trim> | |
| 68 | - where id = #{id} | |
| 69 | - </update> | |
| 70 | - | |
| 71 | - <delete id="deleteWeeklyById" parameterType="Long"> | |
| 72 | - delete from periodic_report where id = #{id} | |
| 73 | - </delete> | |
| 74 | - | |
| 75 | - <delete id="deleteWeeklyByIds" parameterType="String"> | |
| 76 | - delete from periodic_report where id in | |
| 77 | - <foreach item="id" collection="array" open="(" separator="," close=")"> | |
| 78 | - #{id} | |
| 79 | - </foreach> | |
| 80 | - </delete> | |
| 81 | - | |
| 82 | -</mapper> | |
| 83 | 0 | \ No newline at end of file |
trash-framework/src/main/java/com/trash/framework/utils/OkRestClient.java deleted
100644 โ 0
| 1 | -package com.trash.framework.utils; | |
| 2 | - | |
| 3 | -import java.io.InputStream; | |
| 4 | -import java.util.Iterator; | |
| 5 | -import java.util.Map; | |
| 6 | -import java.util.Objects; | |
| 7 | - | |
| 8 | -import org.mybatis.logging.LoggerFactory; | |
| 9 | - | |
| 10 | -import ch.qos.logback.classic.Logger; | |
| 11 | -import okhttp3.MediaType; | |
| 12 | -import okhttp3.OkHttpClient; | |
| 13 | -import okhttp3.Request; | |
| 14 | -import okhttp3.Request.Builder; | |
| 15 | -import okhttp3.RequestBody; | |
| 16 | -import okhttp3.Response; | |
| 17 | -import okhttp3.ResponseBody; | |
| 18 | - | |
| 19 | -public class OkRestClient { | |
| 20 | - private static final MediaType JSON = MediaType.parse("application/json; charset=utf-8"); | |
| 21 | - private static final MediaType XML = MediaType.parse("application/xml; charset=utf-8"); | |
| 22 | - private OkHttpClient okHttpClient; | |
| 23 | - | |
| 24 | - public OkRestClient(OkHttpClient okHttpClient) { | |
| 25 | - this.okHttpClient = okHttpClient; | |
| 26 | - } | |
| 27 | - | |
| 28 | - public String doGet(String url) { | |
| 29 | - return this.doGet(url, (Map)null, (Map)null); | |
| 30 | - } | |
| 31 | - | |
| 32 | - public String doGetParams(String url, Map<String, String> params) { | |
| 33 | - return this.doGet(url, params, (Map)null); | |
| 34 | - } | |
| 35 | - | |
| 36 | - public String doGetHeaders(String url, Map<String, String> headers) { | |
| 37 | - return this.doGet(url, (Map)null, headers); | |
| 38 | - } | |
| 39 | - | |
| 40 | - public String doGet(String url, Map<String, String> params, Map<String, String> headers) { | |
| 41 | - StringBuilder sb = new StringBuilder(url); | |
| 42 | - if(params != null && params.keySet().size() > 0) { | |
| 43 | - boolean firstFlag = true; | |
| 44 | - Iterator _params = params.keySet().iterator(); | |
| 45 | - while(_params.hasNext()) { | |
| 46 | - String key = (String)_params.next(); | |
| 47 | - if(firstFlag) { | |
| 48 | - sb.append("?").append(key).append("=").append((String)params.get(key)); | |
| 49 | - firstFlag = false; | |
| 50 | - } else { | |
| 51 | - sb.append("&").append(key).append("=").append((String)params.get(key)); | |
| 52 | - } | |
| 53 | - } | |
| 54 | - } | |
| 55 | - | |
| 56 | - Builder builder = new Builder(); | |
| 57 | - if(headers != null) { | |
| 58 | - headers.forEach((k, v) -> { | |
| 59 | - builder.addHeader(k, v); | |
| 60 | - }); | |
| 61 | - } | |
| 62 | - | |
| 63 | - Request request = builder.url(sb.toString()).build(); | |
| 64 | - return this.execute(request); | |
| 65 | - } | |
| 66 | - | |
| 67 | - public String doPost(String url, Map<String, String> params, Map<String, String> headers) { | |
| 68 | - okhttp3.FormBody.Builder formBodyBuilder = new okhttp3.FormBody.Builder(); | |
| 69 | - if(params != null && params.keySet().size() > 0) { | |
| 70 | - Iterator _params = params.keySet().iterator(); | |
| 71 | - while(_params.hasNext()) { | |
| 72 | - String key = (String)_params.next(); | |
| 73 | - formBodyBuilder.add(key, (String)params.get(key)); | |
| 74 | - } | |
| 75 | - } | |
| 76 | - | |
| 77 | - Builder builder = new Builder(); | |
| 78 | - if(headers != null) { | |
| 79 | - headers.forEach((k, v) -> { | |
| 80 | - builder.addHeader(k, v); | |
| 81 | - }); | |
| 82 | - } | |
| 83 | - | |
| 84 | - Request request = builder.url(url).post(formBodyBuilder.build()).build(); | |
| 85 | - return this.execute(request); | |
| 86 | - } | |
| 87 | - | |
| 88 | - public String doPostJson(String url, String json, Map<String, String> headers) { | |
| 89 | - | |
| 90 | - return this.executePost(url, json, JSON, headers); | |
| 91 | - } | |
| 92 | - | |
| 93 | - public String doPostXml(String url, String xml, Map<String, String> headers) { | |
| 94 | - | |
| 95 | - return this.executePost(url, xml, XML, headers); | |
| 96 | - } | |
| 97 | - | |
| 98 | - public String executePost(String url, String data, MediaType contentType, Map<String, String> headers) { | |
| 99 | - RequestBody requestBody = RequestBody.create(contentType, data); | |
| 100 | - Builder builder = new Builder(); | |
| 101 | - if(headers != null) { | |
| 102 | - Objects.requireNonNull(builder); | |
| 103 | - headers.forEach(builder::addHeader); | |
| 104 | - } | |
| 105 | - Request request = builder.url(url).post(requestBody).build(); | |
| 106 | - return this.execute(request); | |
| 107 | - } | |
| 108 | - | |
| 109 | - private String execute(Request request) { | |
| 110 | - Response response = null; | |
| 111 | - | |
| 112 | - String result; | |
| 113 | - try { | |
| 114 | - response = this.okHttpClient.newCall(request).execute(); | |
| 115 | - if(!response.isSuccessful()) { | |
| 116 | - return ""; | |
| 117 | - } | |
| 118 | - result = ((ResponseBody)Objects.requireNonNull(response.body())).toString(); | |
| 119 | - } catch(Exception e) { | |
| 120 | - return ""; | |
| 121 | - } finally { | |
| 122 | - if(response != null) { | |
| 123 | - response.close(); | |
| 124 | - } | |
| 125 | - } | |
| 126 | - return result; | |
| 127 | - } | |
| 128 | - | |
| 129 | - public InputStream getFile(String url, Map<String, String> params, Map<String, String> headers) { | |
| 130 | - StringBuilder sb = new StringBuilder(url); | |
| 131 | - if(params != null && params.keySet().size() > 0) { | |
| 132 | - boolean firstFlag = true; | |
| 133 | - Iterator _params = params.keySet().iterator(); | |
| 134 | - while(_params.hasNext()) { | |
| 135 | - String key = (String)_params.next(); | |
| 136 | - if(firstFlag) { | |
| 137 | - sb.append("?").append(key).append("=").append((String)params.get(key)); | |
| 138 | - firstFlag = false; | |
| 139 | - } else { | |
| 140 | - sb.append("&").append(key).append("=").append((String)params.get(key)); | |
| 141 | - } | |
| 142 | - } | |
| 143 | - } | |
| 144 | - | |
| 145 | - Builder builder = new Builder(); | |
| 146 | - if(headers != null) { | |
| 147 | - headers.forEach((k, v) -> { | |
| 148 | - builder.addHeader(k, v); | |
| 149 | - }); | |
| 150 | - } | |
| 151 | - | |
| 152 | - Request request = builder.url(sb.toString()).build(); | |
| 153 | - | |
| 154 | - return this.executeFile(request); | |
| 155 | - } | |
| 156 | - | |
| 157 | - private InputStream executeFile(Request request) { | |
| 158 | - Response response = null; | |
| 159 | - | |
| 160 | - InputStream result; | |
| 161 | - try { | |
| 162 | - response = this.okHttpClient.newCall(request).execute(); | |
| 163 | - if(!response.isSuccessful()) { | |
| 164 | - return null; | |
| 165 | - } | |
| 166 | - result = (InputStream)Objects.requireNonNull(response.body().byteStream()); | |
| 167 | - } catch(Exception e) { | |
| 168 | - return null; | |
| 169 | - } finally { | |
| 170 | - if(response != null) { | |
| 171 | - response.close(); | |
| 172 | - } | |
| 173 | - } | |
| 174 | - return result; | |
| 175 | - } | |
| 176 | - | |
| 177 | -} | |
| 178 | 0 | \ No newline at end of file |
trash-framework/src/main/java/com/trash/framework/web/service/SysLoginService.java
| 1 | 1 | package com.trash.framework.web.service; |
| 2 | 2 | |
| 3 | -import java.awt.List; | |
| 4 | -import java.io.IOException; | |
| 5 | 3 | import java.util.ArrayList; |
| 6 | -import java.util.Date; | |
| 7 | -import java.util.HashMap; | |
| 8 | 4 | import java.util.HashSet; |
| 9 | -import java.util.Map; | |
| 10 | 5 | import java.util.Set; |
| 11 | 6 | import java.util.concurrent.TimeUnit; |
| 12 | 7 | |
| 13 | 8 | import javax.annotation.Resource; |
| 14 | -import javax.xml.ws.Response; | |
| 15 | 9 | |
| 16 | 10 | import org.springframework.beans.factory.annotation.Autowired; |
| 17 | 11 | import org.springframework.security.authentication.AuthenticationManager; |
| ... | ... | @@ -19,8 +13,8 @@ import org.springframework.security.authentication.BadCredentialsException; |
| 19 | 13 | import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; |
| 20 | 14 | import org.springframework.security.core.Authentication; |
| 21 | 15 | import org.springframework.security.core.authority.SimpleGrantedAuthority; |
| 22 | -import org.springframework.stereotype.Component; | |
| 23 | 16 | import org.springframework.security.core.userdetails.UserDetailsService; |
| 17 | +import org.springframework.stereotype.Component; | |
| 24 | 18 | |
| 25 | 19 | import com.alibaba.fastjson.JSON; |
| 26 | 20 | import com.alibaba.fastjson.JSONObject; |
| ... | ... | @@ -35,13 +29,9 @@ import com.trash.common.exception.user.CaptchaException; |
| 35 | 29 | import com.trash.common.exception.user.CaptchaExpireException; |
| 36 | 30 | import com.trash.common.exception.user.UserPasswordNotMatchException; |
| 37 | 31 | import com.trash.common.utils.MessageUtils; |
| 38 | -import com.trash.common.utils.uuid.UUID; | |
| 39 | 32 | import com.trash.framework.manager.AsyncManager; |
| 40 | 33 | import com.trash.framework.manager.factory.AsyncFactory; |
| 41 | -import com.trash.framework.utils.OkRestClient; | |
| 42 | -import com.trash.system.mapper.SysRoleMapper; | |
| 43 | 34 | |
| 44 | -import okhttp3.Call; | |
| 45 | 35 | import okhttp3.OkHttpClient; |
| 46 | 36 | import okhttp3.Request; |
| 47 | 37 | |
| ... | ... | @@ -115,9 +105,8 @@ public class SysLoginService |
| 115 | 105 | return tokenService.createToken(loginUser); |
| 116 | 106 | } |
| 117 | 107 | |
| 118 | - OkRestClient okCline; | |
| 119 | - | |
| 120 | - public final String LOGIN_URL = "http://183.66.242.6:6001/api/authservice/cs/thirdpart/user"; //็ปๅฝๅฐๅ ๅพ ้ ็ฝฎ | |
| 108 | + | |
| 109 | + public final String LOGIN_URL = tokenService.REMOTEPATH + "api/authservice/cs/thirdpart/user"; //็ปๅฝๅฐๅ ๅพ ้ ็ฝฎ | |
| 121 | 110 | |
| 122 | 111 | public LoginUser loginByRemote(String token) |
| 123 | 112 | { | ... | ... |
trash-framework/src/main/java/com/trash/framework/web/service/TokenService.java
trash-framework/src/main/java/com/trash/framework/web/service/UserDetailsServiceImpl.java
| ... | ... | @@ -4,6 +4,7 @@ import com.trash.common.core.domain.entity.SysUser; |
| 4 | 4 | import com.trash.common.core.domain.model.LoginUser; |
| 5 | 5 | import com.trash.common.enums.UserStatus; |
| 6 | 6 | import com.trash.common.exception.BaseException; |
| 7 | +import com.trash.common.utils.SecurityUtils; | |
| 7 | 8 | import com.trash.common.utils.StringUtils; |
| 8 | 9 | import com.trash.system.service.ISysPostService; |
| 9 | 10 | import com.trash.system.service.ISysUserService; |
| ... | ... | @@ -40,19 +41,33 @@ public class UserDetailsServiceImpl implements UserDetailsService { |
| 40 | 41 | |
| 41 | 42 | @Override |
| 42 | 43 | public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { |
| 43 | - SysUser user = userService.selectUserByUserName(username); | |
| 44 | - if (StringUtils.isNull(user)) { | |
| 45 | - log.info("็ปๅฝ็จๆท๏ผ{} ไธๅญๅจ.", username); | |
| 46 | - throw new UsernameNotFoundException("็ปๅฝ็จๆท๏ผ" + username + " ไธๅญๅจ"); | |
| 47 | - } else if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) { | |
| 48 | - log.info("็ปๅฝ็จๆท๏ผ{} ๅทฒ่ขซๅ ้ค.", username); | |
| 49 | - throw new BaseException("ๅฏนไธ่ตท๏ผๆจ็่ดฆๅท๏ผ" + username + " ๅทฒ่ขซๅ ้ค"); | |
| 50 | - } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) { | |
| 51 | - log.info("็ปๅฝ็จๆท๏ผ{} ๅทฒ่ขซๅ็จ.", username); | |
| 52 | - throw new BaseException("ๅฏนไธ่ตท๏ผๆจ็่ดฆๅท๏ผ" + username + " ๅทฒๅ็จ"); | |
| 53 | - } | |
| 44 | + LoginUser loginUser =null; | |
| 45 | + try { | |
| 54 | 46 | |
| 55 | - return createLoginUser(user); | |
| 47 | + loginUser = SecurityUtils.getLoginUser(); | |
| 48 | + } catch (Exception e) { | |
| 49 | + e.printStackTrace(); | |
| 50 | + } | |
| 51 | + | |
| 52 | + if(loginUser == null){ | |
| 53 | + SysUser user = userService.selectUserByUserName(username); | |
| 54 | + if (StringUtils.isNull(user)) { | |
| 55 | + log.info("็ปๅฝ็จๆท๏ผ{} ไธๅญๅจ.", username); | |
| 56 | + throw new UsernameNotFoundException("็ปๅฝ็จๆท๏ผ" + username + " ไธๅญๅจ"); | |
| 57 | + } else if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) { | |
| 58 | + log.info("็ปๅฝ็จๆท๏ผ{} ๅทฒ่ขซๅ ้ค.", username); | |
| 59 | + throw new BaseException("ๅฏนไธ่ตท๏ผๆจ็่ดฆๅท๏ผ" + username + " ๅทฒ่ขซๅ ้ค"); | |
| 60 | + } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) { | |
| 61 | + log.info("็ปๅฝ็จๆท๏ผ{} ๅทฒ่ขซๅ็จ.", username); | |
| 62 | + throw new BaseException("ๅฏนไธ่ตท๏ผๆจ็่ดฆๅท๏ผ" + username + " ๅทฒๅ็จ"); | |
| 63 | + } | |
| 64 | + | |
| 65 | + return createLoginUser(user); | |
| 66 | + } | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + return loginUser; | |
| 56 | 71 | } |
| 57 | 72 | |
| 58 | 73 | public UserDetails createLoginUser(SysUser user) { | ... | ... |
trash-quartz/pom.xml
| ... | ... | @@ -35,6 +35,16 @@ |
| 35 | 35 | <artifactId>trash-common</artifactId> |
| 36 | 36 | </dependency> |
| 37 | 37 | |
| 38 | + <dependency> | |
| 39 | + <groupId>com.trash</groupId> | |
| 40 | + <artifactId>trash-activiti</artifactId> | |
| 41 | + </dependency> | |
| 42 | + | |
| 43 | + | |
| 44 | + <dependency> | |
| 45 | + <groupId>com.trash</groupId> | |
| 46 | + <artifactId>trash-workflow</artifactId> | |
| 47 | + </dependency> | |
| 38 | 48 | </dependencies> |
| 39 | 49 | |
| 40 | 50 | </project> |
| 41 | 51 | \ No newline at end of file | ... | ... |
trash-quartz/src/main/java/com/trash/quartz/task/DriverTask.java
0 โ 100644
| 1 | +package com.trash.quartz.task; | |
| 2 | + | |
| 3 | +import java.text.SimpleDateFormat; | |
| 4 | +import java.util.Date; | |
| 5 | + | |
| 6 | +import org.springframework.beans.BeanUtils; | |
| 7 | +import org.springframework.stereotype.Component; | |
| 8 | + | |
| 9 | +import com.trash.activiti.service.IActTaskService; | |
| 10 | +import com.trash.common.utils.spring.SpringUtils; | |
| 11 | +import com.trash.workflow.service.IWorkflowService; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * ๅฎๆถไปปๅก่ฐๅบฆๆต่ฏ | |
| 15 | + * | |
| 16 | + * @author trash | |
| 17 | + */ | |
| 18 | +@Component("DriverTask") | |
| 19 | +public class DriverTask | |
| 20 | +{ | |
| 21 | + | |
| 22 | + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | |
| 23 | + | |
| 24 | + public void checkDriverCredit() | |
| 25 | + { | |
| 26 | + System.out.println("=================== ๅฎๆถๅจๆง่ก ๅฝๅๆถ้ด: " + simpleDateFormat.format(new Date())); | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void checkAllTask() | |
| 30 | + { | |
| 31 | + | |
| 32 | + System.out.println("=================== ๅ ้ค่ถ ๆถๆฅๅทฅๆฐๆฎ ๅฎๆถๅจๆง่ก ๅฝๅๆถ้ด: " + simpleDateFormat.format(new Date())); | |
| 33 | + | |
| 34 | + SpringUtils.getBean(IActTaskService.class).endAllThreesteptask("workflow_threestep"); | |
| 35 | + | |
| 36 | + SpringUtils.getBean(IWorkflowService.class).deleteWorkflowByName("workflow_threestep"); | |
| 37 | + | |
| 38 | + } | |
| 39 | + | |
| 40 | +} | ... | ... |
trash-ui/.env.development
trash-ui/.env.production
trash-ui/.env.staging
trash-ui/src/api/business/credit2.js renamed to trash-ui/src/api/business/company.js
| ... | ... | @@ -3,7 +3,7 @@ import request from '@/utils/request' |
| 3 | 3 | // ๆฅ่ฏขไผไธๅคฑไฟกๅ่กจ |
| 4 | 4 | export function listCredit(query) { |
| 5 | 5 | return request({ |
| 6 | - url: '/Company/credit/list', | |
| 6 | + url: '/business/companyCredit/list', | |
| 7 | 7 | method: 'get', |
| 8 | 8 | params: query |
| 9 | 9 | }) |
| ... | ... | @@ -12,14 +12,22 @@ export function listCredit(query) { |
| 12 | 12 | // ๆฅ่ฏขไผไธๅคฑไฟก่ฏฆ็ป |
| 13 | 13 | export function getCredit(id) { |
| 14 | 14 | return request({ |
| 15 | - url: '/Company/credit/' + id, | |
| 15 | + url: '/business/companyCredit/' + id, | |
| 16 | 16 | method: 'get' |
| 17 | 17 | }) |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | export function getNames(query) { |
| 21 | 21 | return request({ |
| 22 | - url: '/Company/credit/names', | |
| 22 | + url: '/business/companyCredit/names', | |
| 23 | + method: 'get', | |
| 24 | + params: query | |
| 25 | + }) | |
| 26 | +} | |
| 27 | + | |
| 28 | +export function getPlaces(query) { | |
| 29 | + return request({ | |
| 30 | + url: '/business/companyCredit/places', | |
| 23 | 31 | method: 'get', |
| 24 | 32 | params: query |
| 25 | 33 | }) |
| ... | ... | @@ -27,7 +35,7 @@ export function getNames(query) { |
| 27 | 35 | |
| 28 | 36 | export function historyCredit(query) { |
| 29 | 37 | return request({ |
| 30 | - url: '/Company/credit/historyCredit', | |
| 38 | + url: '/business/companyCredit/historyCredit', | |
| 31 | 39 | method: 'get', |
| 32 | 40 | params: query |
| 33 | 41 | }) |
| ... | ... | @@ -37,7 +45,7 @@ export function historyCredit(query) { |
| 37 | 45 | // ๆฐๅขไผไธๅคฑไฟก |
| 38 | 46 | export function addCredit(data) { |
| 39 | 47 | return request({ |
| 40 | - url: '/Company/credit', | |
| 48 | + url: '/business/companyCredit', | |
| 41 | 49 | method: 'post', |
| 42 | 50 | data: data |
| 43 | 51 | }) |
| ... | ... | @@ -46,7 +54,7 @@ export function addCredit(data) { |
| 46 | 54 | // ไฟฎๆนไผไธๅคฑไฟก |
| 47 | 55 | export function updateCredit(data) { |
| 48 | 56 | return request({ |
| 49 | - url: '/Company/credit', | |
| 57 | + url: '/business/companyCredit', | |
| 50 | 58 | method: 'put', |
| 51 | 59 | data: data |
| 52 | 60 | }) |
| ... | ... | @@ -55,7 +63,7 @@ export function updateCredit(data) { |
| 55 | 63 | // ๅ ้คไผไธๅคฑไฟก |
| 56 | 64 | export function delCredit(id) { |
| 57 | 65 | return request({ |
| 58 | - url: '/Company/credit/' + id, | |
| 66 | + url: '/business/companyCredit/' + id, | |
| 59 | 67 | method: 'delete' |
| 60 | 68 | }) |
| 61 | 69 | } |
| ... | ... | @@ -63,7 +71,7 @@ export function delCredit(id) { |
| 63 | 71 | // ๅฏผๅบไผไธๅคฑไฟก |
| 64 | 72 | export function exportCredit(query) { |
| 65 | 73 | return request({ |
| 66 | - url: '/Company/credit/export', | |
| 74 | + url: '/business/companyCredit/export', | |
| 67 | 75 | method: 'get', |
| 68 | 76 | params: query |
| 69 | 77 | }) | ... | ... |
trash-ui/src/api/business/credit.js renamed to trash-ui/src/api/business/constructionsites.js
| ... | ... | @@ -3,7 +3,7 @@ import request from '@/utils/request' |
| 3 | 3 | // ๆฅ่ฏขใ่ฏทๅกซๅๅ่ฝๅ็งฐใๅ่กจ |
| 4 | 4 | export function listCredit(query) { |
| 5 | 5 | return request({ |
| 6 | - url: '/business/ConstructionCredit/list', | |
| 6 | + url: '/business/constructionCredit/list', | |
| 7 | 7 | method: 'get', |
| 8 | 8 | params: query |
| 9 | 9 | }) |
| ... | ... | @@ -11,7 +11,7 @@ export function listCredit(query) { |
| 11 | 11 | |
| 12 | 12 | export function getNames(query) { |
| 13 | 13 | return request({ |
| 14 | - url: '/business/ConstructionCredit/names', | |
| 14 | + url: '/business/constructionCredit/names', | |
| 15 | 15 | method: 'get', |
| 16 | 16 | params: query |
| 17 | 17 | }) |
| ... | ... | @@ -19,14 +19,14 @@ export function getNames(query) { |
| 19 | 19 | |
| 20 | 20 | export function getTypes(query) { |
| 21 | 21 | return request({ |
| 22 | - url: '/business/ConstructionCredit/types', | |
| 22 | + url: '/business/constructionCredit/types', | |
| 23 | 23 | method: 'get', |
| 24 | 24 | params: query |
| 25 | 25 | }) |
| 26 | 26 | } |
| 27 | 27 | export function getPlaces(query) { |
| 28 | 28 | return request({ |
| 29 | - url: '/business/ConstructionCredit/places', | |
| 29 | + url: '/business/constructionCredit/places', | |
| 30 | 30 | method: 'get', |
| 31 | 31 | params: query |
| 32 | 32 | }) |
| ... | ... | @@ -34,7 +34,7 @@ export function getPlaces(query) { |
| 34 | 34 | |
| 35 | 35 | export function historyCredit(query) { |
| 36 | 36 | return request({ |
| 37 | - url: '/business/ConstructionCredit/historyCredit', | |
| 37 | + url: '/business/constructionCredit/historyCredit', | |
| 38 | 38 | method: 'get', |
| 39 | 39 | params: query |
| 40 | 40 | }) |
| ... | ... | @@ -44,7 +44,7 @@ export function historyCredit(query) { |
| 44 | 44 | // ๆฅ่ฏขใ่ฏทๅกซๅๅ่ฝๅ็งฐใ่ฏฆ็ป |
| 45 | 45 | export function getCredit(id) { |
| 46 | 46 | return request({ |
| 47 | - url: '/business/ConstructionCredit/' + id, | |
| 47 | + url: '/business/constructionCredit/' + id, | |
| 48 | 48 | method: 'get' |
| 49 | 49 | }) |
| 50 | 50 | } |
| ... | ... | @@ -52,7 +52,7 @@ export function getCredit(id) { |
| 52 | 52 | // ๆฐๅขใ่ฏทๅกซๅๅ่ฝๅ็งฐใ |
| 53 | 53 | export function addCredit(data) { |
| 54 | 54 | return request({ |
| 55 | - url: '/business/ConstructionCredit', | |
| 55 | + url: '/business/constructionCredit', | |
| 56 | 56 | method: 'post', |
| 57 | 57 | data: data |
| 58 | 58 | }) |
| ... | ... | @@ -61,7 +61,7 @@ export function addCredit(data) { |
| 61 | 61 | // ไฟฎๆนใ่ฏทๅกซๅๅ่ฝๅ็งฐใ |
| 62 | 62 | export function updateCredit(data) { |
| 63 | 63 | return request({ |
| 64 | - url: '/business/ConstructionCredit', | |
| 64 | + url: '/business/constructionCredit', | |
| 65 | 65 | method: 'put', |
| 66 | 66 | data: data |
| 67 | 67 | }) |
| ... | ... | @@ -70,7 +70,7 @@ export function updateCredit(data) { |
| 70 | 70 | // ๅ ้คใ่ฏทๅกซๅๅ่ฝๅ็งฐใ |
| 71 | 71 | export function delCredit(id) { |
| 72 | 72 | return request({ |
| 73 | - url: '/business/ConstructionCredit/' + id, | |
| 73 | + url: '/business/constructionCredit/' + id, | |
| 74 | 74 | method: 'delete' |
| 75 | 75 | }) |
| 76 | 76 | } |
| ... | ... | @@ -78,7 +78,7 @@ export function delCredit(id) { |
| 78 | 78 | // ๅฏผๅบใ่ฏทๅกซๅๅ่ฝๅ็งฐใ |
| 79 | 79 | export function exportCredit(query) { |
| 80 | 80 | return request({ |
| 81 | - url: '/business/ConstructionCredit/export', | |
| 81 | + url: '/business/constructionCredit/export', | |
| 82 | 82 | method: 'get', |
| 83 | 83 | params: query |
| 84 | 84 | }) | ... | ... |
trash-ui/src/api/business/daywork.js
0 โ 100644
trash-ui/src/api/business/credit4.js renamed to trash-ui/src/api/business/driver.js
| ... | ... | @@ -3,7 +3,7 @@ import request from '@/utils/request' |
| 3 | 3 | // ๆฅ่ฏข้ฉพ้ฉถๅๅคฑไฟกๅ่กจ |
| 4 | 4 | export function listCredit(query) { |
| 5 | 5 | return request({ |
| 6 | - url: '/driver/credit/list', | |
| 6 | + url: '/business/driverCredit/list', | |
| 7 | 7 | method: 'get', |
| 8 | 8 | params: query |
| 9 | 9 | }) |
| ... | ... | @@ -12,14 +12,14 @@ export function listCredit(query) { |
| 12 | 12 | // ๆฅ่ฏข้ฉพ้ฉถๅๅคฑไฟก่ฏฆ็ป |
| 13 | 13 | export function getCredit(id) { |
| 14 | 14 | return request({ |
| 15 | - url: '/driver/credit/' + id, | |
| 15 | + url: '/business/driverCredit/' + id, | |
| 16 | 16 | method: 'get' |
| 17 | 17 | }) |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | export function getNames(query) { |
| 21 | 21 | return request({ |
| 22 | - url: '/driver/credit/names', | |
| 22 | + url: '/business/driverCredit/names', | |
| 23 | 23 | method: 'get', |
| 24 | 24 | params: query |
| 25 | 25 | }) |
| ... | ... | @@ -27,7 +27,7 @@ export function getNames(query) { |
| 27 | 27 | |
| 28 | 28 | export function historyCredit(query) { |
| 29 | 29 | return request({ |
| 30 | - url: '/driver/credit/historyCredit', | |
| 30 | + url: '/business/driverCredit/historyCredit', | |
| 31 | 31 | method: 'get', |
| 32 | 32 | params: query |
| 33 | 33 | }) |
| ... | ... | @@ -37,7 +37,7 @@ export function historyCredit(query) { |
| 37 | 37 | // ๆฐๅข้ฉพ้ฉถๅๅคฑไฟก |
| 38 | 38 | export function addCredit(data) { |
| 39 | 39 | return request({ |
| 40 | - url: '/driver/credit', | |
| 40 | + url: '/business/driverCredit', | |
| 41 | 41 | method: 'post', |
| 42 | 42 | data: data |
| 43 | 43 | }) |
| ... | ... | @@ -46,7 +46,7 @@ export function addCredit(data) { |
| 46 | 46 | // ไฟฎๆน้ฉพ้ฉถๅๅคฑไฟก |
| 47 | 47 | export function updateCredit(data) { |
| 48 | 48 | return request({ |
| 49 | - url: '/driver/credit', | |
| 49 | + url: '/business/driverCredit', | |
| 50 | 50 | method: 'put', |
| 51 | 51 | data: data |
| 52 | 52 | }) |
| ... | ... | @@ -55,7 +55,7 @@ export function updateCredit(data) { |
| 55 | 55 | // ๅ ้ค้ฉพ้ฉถๅๅคฑไฟก |
| 56 | 56 | export function delCredit(id) { |
| 57 | 57 | return request({ |
| 58 | - url: '/driver/credit/' + id, | |
| 58 | + url: '/business/driverCredit/' + id, | |
| 59 | 59 | method: 'delete' |
| 60 | 60 | }) |
| 61 | 61 | } |
| ... | ... | @@ -63,7 +63,7 @@ export function delCredit(id) { |
| 63 | 63 | // ๅฏผๅบ้ฉพ้ฉถๅๅคฑไฟก |
| 64 | 64 | export function exportCredit(query) { |
| 65 | 65 | return request({ |
| 66 | - url: '/driver/credit/export', | |
| 66 | + url: '/business/driverCredit/export', | |
| 67 | 67 | method: 'get', |
| 68 | 68 | params: query |
| 69 | 69 | }) | ... | ... |
trash-ui/src/api/business/credit1.js renamed to trash-ui/src/api/business/earthsites.js
| ... | ... | @@ -3,7 +3,7 @@ import request from '@/utils/request' |
| 3 | 3 | // ๆฅ่ฏขๆถ็บณๅบๅคฑไฟกๅ่กจ |
| 4 | 4 | export function listCredit(query) { |
| 5 | 5 | return request({ |
| 6 | - url: '/EarthSites/credit/list', | |
| 6 | + url: '/business/earthSitesCredit/list', | |
| 7 | 7 | method: 'get', |
| 8 | 8 | params: query |
| 9 | 9 | }) |
| ... | ... | @@ -12,7 +12,7 @@ export function listCredit(query) { |
| 12 | 12 | // ๆฅ่ฏขๆถ็บณๅบๅคฑไฟก่ฏฆ็ป |
| 13 | 13 | export function getCredit(id) { |
| 14 | 14 | return request({ |
| 15 | - url: '/EarthSites/credit/' + id, | |
| 15 | + url: '/business/earthSitesCredit/' + id, | |
| 16 | 16 | method: 'get' |
| 17 | 17 | }) |
| 18 | 18 | } |
| ... | ... | @@ -20,7 +20,7 @@ export function getCredit(id) { |
| 20 | 20 | // ๆฐๅขๆถ็บณๅบๅคฑไฟก |
| 21 | 21 | export function addCredit(data) { |
| 22 | 22 | return request({ |
| 23 | - url: '/EarthSites/credit', | |
| 23 | + url: '/business/earthSitesCredit', | |
| 24 | 24 | method: 'post', |
| 25 | 25 | data: data |
| 26 | 26 | }) |
| ... | ... | @@ -29,7 +29,7 @@ export function addCredit(data) { |
| 29 | 29 | // ไฟฎๆนๆถ็บณๅบๅคฑไฟก |
| 30 | 30 | export function updateCredit(data) { |
| 31 | 31 | return request({ |
| 32 | - url: '/EarthSites/credit', | |
| 32 | + url: '/business/earthSitesCredit', | |
| 33 | 33 | method: 'put', |
| 34 | 34 | data: data |
| 35 | 35 | }) |
| ... | ... | @@ -38,7 +38,7 @@ export function updateCredit(data) { |
| 38 | 38 | // ๅ ้คๆถ็บณๅบๅคฑไฟก |
| 39 | 39 | export function delCredit(id) { |
| 40 | 40 | return request({ |
| 41 | - url: '/EarthSites/credit/' + id, | |
| 41 | + url: '/business/earthSitesCredit/' + id, | |
| 42 | 42 | method: 'delete' |
| 43 | 43 | }) |
| 44 | 44 | } |
| ... | ... | @@ -46,7 +46,7 @@ export function delCredit(id) { |
| 46 | 46 | // ๅฏผๅบๆถ็บณๅบๅคฑไฟก |
| 47 | 47 | export function exportCredit(query) { |
| 48 | 48 | return request({ |
| 49 | - url: '/EarthSites/credit/export', | |
| 49 | + url: '/business/earthSitesCredit//export', | |
| 50 | 50 | method: 'get', |
| 51 | 51 | params: query |
| 52 | 52 | }) |
| ... | ... | @@ -54,7 +54,22 @@ export function exportCredit(query) { |
| 54 | 54 | |
| 55 | 55 | export function getNames(query) { |
| 56 | 56 | return request({ |
| 57 | - url: '/EarthSites/credit/names', | |
| 57 | + url: '/business/earthSitesCredit/names', | |
| 58 | + method: 'get', | |
| 59 | + params: query | |
| 60 | + }) | |
| 61 | +} | |
| 62 | + | |
| 63 | +export function getTypes(query) { | |
| 64 | + return request({ | |
| 65 | + url: '/business/earthSitesCredit//types', | |
| 66 | + method: 'get', | |
| 67 | + params: query | |
| 68 | + }) | |
| 69 | +} | |
| 70 | +export function getPlaces(query) { | |
| 71 | + return request({ | |
| 72 | + url: '/business/earthSitesCredit//places', | |
| 58 | 73 | method: 'get', |
| 59 | 74 | params: query |
| 60 | 75 | }) |
| ... | ... | @@ -62,7 +77,7 @@ export function getNames(query) { |
| 62 | 77 | |
| 63 | 78 | export function historyCredit(query) { |
| 64 | 79 | return request({ |
| 65 | - url: '/EarthSites/credit/historyCredit', | |
| 80 | + url: '/business/earthSitesCredit/historyCredit', | |
| 66 | 81 | method: 'get', |
| 67 | 82 | params: query |
| 68 | 83 | }) | ... | ... |
trash-ui/src/api/business/supervisionSpecial.js
0 โ 100644
| 1 | +import request from '@/utils/request' | |
| 2 | + | |
| 3 | +// ๆฅ่ฏขไธ้กน็ฃๆฅๅ่กจ | |
| 4 | +export function listSupervisionSpecial(query) { | |
| 5 | + return request({ | |
| 6 | + url: '/business/supervisionSpecial/list', | |
| 7 | + method: 'get', | |
| 8 | + params: query | |
| 9 | + }) | |
| 10 | +} | |
| 11 | + | |
| 12 | +// ๆฅ่ฏขไธ้กน็ฃๆฅ่ฏฆ็ป | |
| 13 | +export function getSupervisionSpecial(id) { | |
| 14 | + return request({ | |
| 15 | + url: '/business/supervisionSpecial/' + id, | |
| 16 | + method: 'get' | |
| 17 | + }) | |
| 18 | +} | |
| 19 | + | |
| 20 | +// ๆฐๅขไธ้กน็ฃๆฅ | |
| 21 | +export function addSupervisionSpecial(data) { | |
| 22 | + return request({ | |
| 23 | + url: '/business/supervisionSpecial', | |
| 24 | + method: 'post', | |
| 25 | + data: data | |
| 26 | + }) | |
| 27 | +} | |
| 28 | + | |
| 29 | +// ไฟฎๆนไธ้กน็ฃๆฅ | |
| 30 | +export function updateSupervisionSpecial(data) { | |
| 31 | + return request({ | |
| 32 | + url: '/business/supervisionSpecial', | |
| 33 | + method: 'put', | |
| 34 | + data: data | |
| 35 | + }) | |
| 36 | +} | |
| 37 | + | |
| 38 | +// ๅ ้คไธ้กน็ฃๆฅ | |
| 39 | +export function delSupervisionSpecial(id) { | |
| 40 | + return request({ | |
| 41 | + url: '/business/supervisionSpecial/' + id, | |
| 42 | + method: 'delete' | |
| 43 | + }) | |
| 44 | +} | |
| 45 | + | |
| 46 | +// ๅฏผๅบไธ้กน็ฃๆฅ | |
| 47 | +export function exportSupervisionSpecial(query) { | |
| 48 | + return request({ | |
| 49 | + url: '/business/supervisionSpecial/export', | |
| 50 | + method: 'get', | |
| 51 | + params: query | |
| 52 | + }) | |
| 53 | +} | |
| 0 | 54 | \ No newline at end of file | ... | ... |
trash-ui/src/api/business/threestep.js
| ... | ... | @@ -35,6 +35,15 @@ export function updateThreestep(data) { |
| 35 | 35 | }) |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | +export function activeThreestep(data) { | |
| 39 | + return request({ | |
| 40 | + url: '/business/threestep/active', | |
| 41 | + method: 'post', | |
| 42 | + data: data | |
| 43 | + }) | |
| 44 | +} | |
| 45 | + | |
| 46 | + | |
| 38 | 47 | // ๅ ้คใ่ฏทๅกซๅๅ่ฝๅ็งฐใ |
| 39 | 48 | export function delThreestep(id) { |
| 40 | 49 | return request({ |
| ... | ... | @@ -51,4 +60,3 @@ export function exportThreestep(query) { |
| 51 | 60 | params: query |
| 52 | 61 | }) |
| 53 | 62 | } |
| 54 | - | ... | ... |
trash-ui/src/api/business/credit3.js renamed to trash-ui/src/api/business/truck.js
| ... | ... | @@ -3,7 +3,7 @@ import request from '@/utils/request' |
| 3 | 3 | // ๆฅ่ฏข่ฝฆ่พๅคฑไฟกๅ่กจ |
| 4 | 4 | export function listCredit(query) { |
| 5 | 5 | return request({ |
| 6 | - url: '/truck/credit/list', | |
| 6 | + url: '/business/truckCredit/list', | |
| 7 | 7 | method: 'get', |
| 8 | 8 | params: query |
| 9 | 9 | }) |
| ... | ... | @@ -12,14 +12,21 @@ export function listCredit(query) { |
| 12 | 12 | // ๆฅ่ฏข่ฝฆ่พๅคฑไฟก่ฏฆ็ป |
| 13 | 13 | export function getCredit(id) { |
| 14 | 14 | return request({ |
| 15 | - url: '/truck/credit/' + id, | |
| 15 | + url: '/business/truckCredit/' + id, | |
| 16 | 16 | method: 'get' |
| 17 | 17 | }) |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | export function getNames(query) { |
| 21 | 21 | return request({ |
| 22 | - url: '/truck/credit/names', | |
| 22 | + url: '/business/truckCredit/names', | |
| 23 | + method: 'get', | |
| 24 | + params: query | |
| 25 | + }) | |
| 26 | +} | |
| 27 | +export function getCompanys(query) { | |
| 28 | + return request({ | |
| 29 | + url: '/business/truckCredit/companys', | |
| 23 | 30 | method: 'get', |
| 24 | 31 | params: query |
| 25 | 32 | }) |
| ... | ... | @@ -27,7 +34,7 @@ export function getNames(query) { |
| 27 | 34 | |
| 28 | 35 | export function historyCredit(query) { |
| 29 | 36 | return request({ |
| 30 | - url: '/truck/credit/historyCredit', | |
| 37 | + url: '/business/truckCredit/historyCredit', | |
| 31 | 38 | method: 'get', |
| 32 | 39 | params: query |
| 33 | 40 | }) |
| ... | ... | @@ -37,7 +44,7 @@ export function historyCredit(query) { |
| 37 | 44 | // ๆฐๅข่ฝฆ่พๅคฑไฟก |
| 38 | 45 | export function addCredit(data) { |
| 39 | 46 | return request({ |
| 40 | - url: '/truck/credit', | |
| 47 | + url: '/business/truckCredit', | |
| 41 | 48 | method: 'post', |
| 42 | 49 | data: data |
| 43 | 50 | }) |
| ... | ... | @@ -46,7 +53,7 @@ export function addCredit(data) { |
| 46 | 53 | // ไฟฎๆน่ฝฆ่พๅคฑไฟก |
| 47 | 54 | export function updateCredit(data) { |
| 48 | 55 | return request({ |
| 49 | - url: '/truck/credit', | |
| 56 | + url: '/business/truckCredit', | |
| 50 | 57 | method: 'put', |
| 51 | 58 | data: data |
| 52 | 59 | }) |
| ... | ... | @@ -55,7 +62,7 @@ export function updateCredit(data) { |
| 55 | 62 | // ๅ ้ค่ฝฆ่พๅคฑไฟก |
| 56 | 63 | export function delCredit(id) { |
| 57 | 64 | return request({ |
| 58 | - url: '/truck/credit/' + id, | |
| 65 | + url: '/business/truckCredit/' + id, | |
| 59 | 66 | method: 'delete' |
| 60 | 67 | }) |
| 61 | 68 | } |
| ... | ... | @@ -63,7 +70,7 @@ export function delCredit(id) { |
| 63 | 70 | // ๅฏผๅบ่ฝฆ่พๅคฑไฟก |
| 64 | 71 | export function exportCredit(query) { |
| 65 | 72 | return request({ |
| 66 | - url: '/truck/credit/export', | |
| 73 | + url: '/business/truckCredit/export', | |
| 67 | 74 | method: 'get', |
| 68 | 75 | params: query |
| 69 | 76 | }) | ... | ... |
trash-ui/src/api/business/truckActivate.js
0 โ 100644
| 1 | +import request from '@/utils/request' | |
| 2 | + | |
| 3 | +// ๆฅ่ฏข่ฝฆ่พๆฟๆดปๅ่กจ | |
| 4 | +export function listTruckActivate(query) { | |
| 5 | + return request({ | |
| 6 | + url: '/business/truckActivate/list', | |
| 7 | + method: 'get', | |
| 8 | + params: query | |
| 9 | + }) | |
| 10 | +} | |
| 11 | + | |
| 12 | +// ๆฅ่ฏข่ฝฆ่พๆฟๆดป่ฏฆ็ป | |
| 13 | +export function getTruckActivate(id) { | |
| 14 | + return request({ | |
| 15 | + url: '/business/truckActivate/' + id, | |
| 16 | + method: 'get' | |
| 17 | + }) | |
| 18 | +} | |
| 19 | + | |
| 20 | +// ๆฐๅข่ฝฆ่พๆฟๆดป | |
| 21 | +export function addTruckActivate(data) { | |
| 22 | + return request({ | |
| 23 | + url: '/business/truckActivate', | |
| 24 | + method: 'post', | |
| 25 | + data: data | |
| 26 | + }) | |
| 27 | +} | |
| 28 | + | |
| 29 | +// ไฟฎๆน่ฝฆ่พๆฟๆดป | |
| 30 | +export function updateTruckActivate(data) { | |
| 31 | + return request({ | |
| 32 | + url: '/business/truckActivate', | |
| 33 | + method: 'put', | |
| 34 | + data: data | |
| 35 | + }) | |
| 36 | +} | |
| 37 | + | |
| 38 | +// ๅ ้ค่ฝฆ่พๆฟๆดป | |
| 39 | +export function delTruckActivate(id) { | |
| 40 | + return request({ | |
| 41 | + url: '/business/truckActivate/' + id, | |
| 42 | + method: 'delete' | |
| 43 | + }) | |
| 44 | +} | |
| 45 | + | |
| 46 | +// ๅฏผๅบ่ฝฆ่พๆฟๆดป | |
| 47 | +export function exportTruckActivate(query) { | |
| 48 | + return request({ | |
| 49 | + url: '/business/truckActivate/export', | |
| 50 | + method: 'get', | |
| 51 | + params: query | |
| 52 | + }) | |
| 53 | +} | |
| 0 | 54 | \ No newline at end of file | ... | ... |
trash-ui/src/api/dict.js
| ... | ... | @@ -23,20 +23,72 @@ export function earthsitesList(data) { |
| 23 | 23 | data: data |
| 24 | 24 | }); |
| 25 | 25 | } |
| 26 | +export function updateEarthsites(data) { | |
| 27 | + return requestRemote({ | |
| 28 | + url: '/api/siteservice/cs/earthsites/status', | |
| 29 | + method: 'post', | |
| 30 | + data: data | |
| 31 | + }); | |
| 32 | +} | |
| 33 | + | |
| 34 | +export function companyList(data) { | |
| 35 | + return requestRemote({ | |
| 36 | + url: '/api/gpsservice/cs/companies/ledger/list', | |
| 37 | + method: 'post', | |
| 38 | + data: data | |
| 39 | + }); | |
| 40 | +} | |
| 41 | +export function updateCompany(data) { | |
| 42 | + return requestRemote({ | |
| 43 | + url: '/api/gpsservice/cs/companies/credit/status', | |
| 44 | + method: 'post', | |
| 45 | + data: data | |
| 46 | + }); | |
| 47 | +} | |
| 48 | + | |
| 49 | +export function truckList(data) { | |
| 50 | + return requestRemote({ | |
| 51 | + url: '/api/gpsservice/cs/basevehicle/ledger/list', | |
| 52 | + method: 'get', | |
| 53 | + params: data | |
| 54 | + }); | |
| 55 | +} | |
| 56 | +export function updateTruck(data) { | |
| 57 | + return requestRemote({ | |
| 58 | + url: '/api/gpsservice/cs/basevehicle/credit/status', | |
| 59 | + method: 'post', | |
| 60 | + data: data | |
| 61 | + }); | |
| 62 | +} | |
| 63 | + | |
| 64 | +export function driverList(data) { | |
| 65 | + return requestRemote({ | |
| 66 | + url: '/api/gpsservice/v1/drivers/search', | |
| 67 | + method: 'get', | |
| 68 | + params: data | |
| 69 | + }); | |
| 70 | +} | |
| 71 | +export function updateDriver(data) { | |
| 72 | + // return requestRemote({ | |
| 73 | + // url: '/api/gpsservice/cs/basevehicle/credit/status', | |
| 74 | + // method: 'post', | |
| 75 | + // data: data | |
| 76 | + // }); | |
| 77 | +} | |
| 26 | 78 | |
| 27 | -export function getArea(data) { | |
| 79 | +export function getArea(params) { | |
| 28 | 80 | return requestRemote({ |
| 29 | 81 | url: '/api/gpsservice/cs/area', |
| 30 | 82 | method: 'get', |
| 31 | - param: data | |
| 83 | + params: params | |
| 32 | 84 | }); |
| 33 | 85 | } |
| 34 | 86 | |
| 35 | 87 | |
| 36 | -export function getDict(param) { | |
| 88 | +export function getDict(params) { | |
| 37 | 89 | return requestRemote({ |
| 38 | 90 | url: '/api/gpsservice/cs/dataDict', |
| 39 | 91 | method: 'get', |
| 40 | - params: param | |
| 92 | + params: params | |
| 41 | 93 | }); |
| 42 | 94 | } | ... | ... |
trash-ui/src/layout/index.vue
| 1 | 1 | <template> |
| 2 | 2 | <div :class="classObj" class="app-wrapper"> |
| 3 | - <div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" /> | |
| 4 | 3 | <sidebar class="sidebar-container" /> |
| 5 | 4 | <div :class="{hasTagsView:needTagsView}" class="main-container"> |
| 6 | - <div :class="{'fixed-header':fixedHeader}"> | |
| 7 | - <navbar /> | |
| 8 | 5 | <tags-view v-if="needTagsView" /> |
| 9 | - </div> | |
| 10 | 6 | <app-main /> |
| 11 | - <right-panel v-if="showSettings"> | |
| 12 | - <settings /> | |
| 13 | - </right-panel> | |
| 14 | - </div> | |
| 7 | + | |
| 8 | + </div> | |
| 15 | 9 | </div> |
| 16 | 10 | </template> |
| 17 | 11 | ... | ... |
trash-ui/src/main.js
trash-ui/src/permission.js
| ... | ... | @@ -15,7 +15,6 @@ const whiteList = ['/login', '/auth-redirect', '/bind', '/register'] |
| 15 | 15 | |
| 16 | 16 | router.beforeEach((to, from, next) => { |
| 17 | 17 | NProgress.start() |
| 18 | - debugger; | |
| 19 | 18 | var token = getToken(); |
| 20 | 19 | if(!token){ |
| 21 | 20 | if( to.query.token ){ |
| ... | ... | @@ -82,8 +81,8 @@ router.beforeEach((to, from, next) => { |
| 82 | 81 | removeToken(); |
| 83 | 82 | next({path:to }) |
| 84 | 83 | }else{ |
| 85 | - | |
| 86 | - | |
| 84 | + | |
| 85 | + | |
| 87 | 86 | store.dispatch('FedLogOut').then(() => { |
| 88 | 87 | Message.error(err) |
| 89 | 88 | removeToken(); | ... | ... |
trash-ui/src/router/index.js
| ... | ... | @@ -136,6 +136,19 @@ export const constantRoutes = [ |
| 136 | 136 | meta: { title: 'ไธๆฅๆบๅถ' } |
| 137 | 137 | }, |
| 138 | 138 | { |
| 139 | + path: 'supervision/dayWorkReport', | |
| 140 | + component: (resolve) => require(['@/views/business/dayWorkReport'], resolve), | |
| 141 | + name: 'ๆฅๅผๅทฅๆฅ่กจ', | |
| 142 | + meta: { title: 'ๆฅๅผๅทฅๆฅ่กจ' } | |
| 143 | + }, | |
| 144 | + | |
| 145 | + { | |
| 146 | + path: 'supervision/truckActivate', | |
| 147 | + component: (resolve) => require(['@/views/business/truckActivate'], resolve), | |
| 148 | + name: '่ฝฆ่พๆฟๆดป', | |
| 149 | + meta: { title: '่ฝฆ่พๆฟๆดป' } | |
| 150 | + }, | |
| 151 | + { | |
| 139 | 152 | path: 'credit/EarthSitesCredit', |
| 140 | 153 | component: (resolve) => require(['@/views/business/EarthSitesCredit'], resolve), |
| 141 | 154 | name: 'ๆถ็บณๅบๅคฑไฟก็ฎก็', |
| ... | ... | @@ -160,6 +173,35 @@ export const constantRoutes = [ |
| 160 | 173 | meta: { title: '้ฉพ้ฉถๅๅคฑไฟก็ฎก็' } |
| 161 | 174 | } |
| 162 | 175 | ] |
| 176 | + }, { | |
| 177 | + path: '/daily', | |
| 178 | + component: Layout, | |
| 179 | + hidden: true, | |
| 180 | + children: [ | |
| 181 | + { | |
| 182 | + path: 'report/index', | |
| 183 | + component: (resolve) => require(['@/views/daily/report/index'], resolve), | |
| 184 | + name: 'ๅทฅไฝๆฅ่กจ', | |
| 185 | + meta: { title: 'ๅทฅไฝๆฅ่กจ' } | |
| 186 | + }, { | |
| 187 | + path: 'Weeklys/day', | |
| 188 | + component: (resolve) => require(['@/views/daily/report/day'], resolve), | |
| 189 | + name: 'ๅทฅไฝๆฅๆฅ', | |
| 190 | + meta: { title: 'ๅทฅไฝๆฅๆฅ' } | |
| 191 | + }, | |
| 192 | + { | |
| 193 | + path: 'Weeklys/week', | |
| 194 | + component: (resolve) => require(['@/views/daily/report/week'], resolve), | |
| 195 | + name: 'ๅทฅไฝๅจๆฅ', | |
| 196 | + meta: { title: 'ๅทฅไฝๅจๆฅ' } | |
| 197 | + }, | |
| 198 | + { | |
| 199 | + path: 'Weeklys/month', | |
| 200 | + component: (resolve) => require(['@/views/daily/report/month'], resolve), | |
| 201 | + name: 'ๅทฅไฝๆๆฅ', | |
| 202 | + meta: { title: 'ๅทฅไฝๆๆฅ' } | |
| 203 | + }, | |
| 204 | + ] | |
| 163 | 205 | } |
| 164 | 206 | ] |
| 165 | 207 | ... | ... |
trash-ui/src/views/activiti/task/index.vue
| 1 | 1 | <template> |
| 2 | 2 | <div class="app-container"> |
| 3 | 3 | |
| 4 | - <el-card class="box-card" v-for="task in tastList"> | |
| 5 | - <div class="card_status notcheck">ๅพ ๅฎกๆน</div> | |
| 6 | - <div class="card_btn"> | |
| 7 | - <a @click="agreeAndDismiss(task,0)" class="agree">ๅๆ</a> | |
| 8 | - <a @click="agreeAndDismiss(task,1)" class="dismiss">ๆ็ป</a> | |
| 9 | - <a @click="examineAndApprove(task,-1)" >่ฏฆๆ >></a> | |
| 10 | - </div> | |
| 11 | - <el-row class="card_row"> | |
| 12 | - <el-col :span="2" class="card_grid"></el-col> | |
| 13 | - <div class="card_title">{{task.instanceName}}</div> | |
| 14 | - </el-row> | |
| 15 | - | |
| 16 | - <el-row class="card_row"> | |
| 17 | - <el-col :span="3" class="card_grid"></el-col> | |
| 18 | - <el-col :span="6" class="card_grid"> | |
| 19 | - <div>ๅผๅงๆถ้ด: {{task.startTime}}</div> | |
| 20 | - </el-col> | |
| 21 | - <el-col :span="6" class="card_grid center"> | |
| 22 | - <div>็ปๆๆถ้ด: {{task.endTime}}</div> | |
| 23 | - </el-col> | |
| 24 | - <el-col :span="6" class="card_grid right"> | |
| 25 | - <div>็ณ่ฏท็ฑปๅ: {{task.type}}</div> | |
| 26 | - </el-col> | |
| 27 | - <el-col :span="3" class="card_grid"></el-col> | |
| 28 | - </el-row> | |
| 29 | - <el-row class="card_row"> | |
| 30 | - <el-col :span="3" class="card_grid"> | |
| 31 | - <div></div> | |
| 32 | - </el-col> | |
| 33 | - <el-col :span="18"> | |
| 34 | - <div>็ณ่ฏท็็ฑ: {{task.reason}}</div> | |
| 35 | - </el-col> | |
| 36 | - <el-col :span="3" class="card_grid"></el-col> | |
| 37 | - </el-row> | |
| 38 | - </el-card> | |
| 39 | - | |
| 4 | + <taskCard :task="task" v-for="task in taskList" @sendToParent="showTask" /> | |
| 40 | 5 | |
| 41 | - <!--<el-table v-loading="loading" :data="tastList"> | |
| 42 | - <el-table-column label="ๆต็จID" align="center" prop="id"/> | |
| 43 | - <el-table-column label="ๆต็จๅ็งฐ" align="center" prop="instanceName" /> | |
| 44 | - <el-table-column label="ไปปๅก่็นๅ็งฐ" align="center" prop="name" /> | |
| 45 | - <el-table-column label="ไปปๅก็ถๆ" align="center" prop="status" /> | |
| 46 | - <el-table-column label="ๅ็ไบบ" align="center" prop="assignee" /> | |
| 47 | - <el-table-column label="ๅๅปบๆถ้ด" align="center" prop="createdDate" /> | |
| 48 | - | |
| 49 | - <el-table-column label="ๆไฝ" align="center" class-name="small-padding fixed-width"> | |
| 50 | - <template slot-scope="scope"> | |
| 51 | - <el-button size="mini" type="text" icon="el-icon-edit" @click="examineAndApprove (scope.row)" | |
| 52 | - v-hasPermi="['workflow:leave:edit']">ๅฎกๆน | |
| 53 | - </el-button> | |
| 54 | - </template> | |
| 55 | - </el-table-column> | |
| 56 | - </el-table>--> | |
| 57 | - | |
| 58 | - <pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> | |
| 6 | + <pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" | |
| 7 | + @pagination="getList" /> | |
| 59 | 8 | |
| 60 | 9 | <!-- ๅฎกๆนๅฏน่ฏๆก --> |
| 61 | 10 | <el-dialog :title="title" :visible.sync="open" v-if="open" width="500px" append-to-body> |
| ... | ... | @@ -78,26 +27,143 @@ |
| 78 | 27 | </div> |
| 79 | 28 | </el-dialog> |
| 80 | 29 | |
| 81 | - <el-dialog :title="title" :visible.sync="open2" width="500px" append-to-body> | |
| 82 | - <threestepInfo :businessKey="businessKey" v-if="open2"/> | |
| 83 | - | |
| 84 | - <el-form :model="form" ref="form" label-width="100px" class="demo-dynamic"> | |
| 85 | - <el-form-item v-for="(domain, index) in form.formData" :label="domain.controlLable" :key="index"> | |
| 86 | - <el-radio-group v-model="domain.controlValue" v-if="'radio'==domain.controlType"> | |
| 87 | - <el-radio v-for="(defaults,indexd) in domain.controlDefault.split('--__--')" :label=indexd :key="indexd"> | |
| 88 | - {{defaults}} | |
| 89 | - </el-radio> | |
| 90 | - </el-radio-group> | |
| 91 | - <el-input type="textarea" v-model="domain.controlValue" v-if="'textarea'==domain.controlType"></el-input> | |
| 92 | - </el-form-item> | |
| 30 | + <el-dialog :title="title" :visible.sync="open2" width="800px" append-to-body> | |
| 31 | + <threestepInfo :businessKey="businessKey" v-if="open2" /> | |
| 32 | + <el-form v-if="taskName == 'ๅทกๆฅ'" :rules="rules" label-width="120px"> | |
| 33 | + <el-row type="flex" justify="center"> | |
| 34 | + <el-col> | |
| 35 | + <el-form-item label="่กฅๅ ่ฏดๆ"> | |
| 36 | + <el-input type="textarea" v-model="form.subReason" /> | |
| 37 | + </el-form-item> | |
| 38 | + </el-col> | |
| 39 | + </el-row> | |
| 40 | + <el-row type="flex" justify="center"> | |
| 41 | + <el-col :span="12"> | |
| 42 | + <el-form-item label="ๆธฃ็ฎก่ด่ดฃไบบ"> | |
| 43 | + <el-input v-model="form.earthPipPerson" /> | |
| 44 | + </el-form-item> | |
| 45 | + </el-col> | |
| 46 | + <el-col :span="12"> | |
| 47 | + <el-form-item label="ๆงๆณ่ด่ดฃไบบ"> | |
| 48 | + <el-input v-model="form.enforcePerson" /> | |
| 49 | + </el-form-item> | |
| 50 | + </el-col> | |
| 51 | + </el-row> | |
| 52 | + <el-row type="flex" justify="center"> | |
| 53 | + <el-col> | |
| 54 | + ไธไผ ่กฅๅ ๆๆ:<a style="color:blue;font-size: 12px;" @click="picSample=true">็คบๆๅพ</a> | |
| 55 | + </el-col> | |
| 56 | + </el-row> | |
| 57 | + <el-row type="flex" justify="center" style="margin-top: 20px;"> | |
| 58 | + <el-col :span="6"> | |
| 59 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(0)">ๅฑฅ่ๆ ๅต็ ง็</a> | |
| 60 | + <el-input v-model="form.sub_img0" type="hidden"></el-input> | |
| 61 | + <p v-for="img in form.sub_img0">{{img.split(":")[0]}}<a @click="removeImage(0,img)" style="color:red"> x</a> | |
| 62 | + </p> | |
| 63 | + </el-col> | |
| 64 | + <el-col :span="6"> | |
| 65 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(1)">ๆฐดๆชๆฐดๅด็ ง็</a> | |
| 66 | + <el-input v-model="form.sub_img1" type="hidden"></el-input> | |
| 67 | + <p v-for="img in form.sub_img1">{{img.split(":")[0]}}<a @click="removeImage(1,img)" style="color:red"> x</a> | |
| 68 | + </p> | |
| 69 | + </el-col> | |
| 70 | + <el-col :span="6"> | |
| 71 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(2)">็ งๆ็ ง็</a> | |
| 72 | + <el-input v-model="form.sub_img2" type="hidden"></el-input> | |
| 73 | + <p v-for="img in form.sub_img2">{{img.split(":")[0]}}<a @click="removeImage(2,img)" style="color:red"> x</a> | |
| 74 | + </p> | |
| 75 | + </el-col> | |
| 76 | + <el-col :span="6"> | |
| 77 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(3)">่ง้ข็ๆง็ ง็</a> | |
| 78 | + <el-input v-model="form.sub_img3" type="hidden"></el-input> | |
| 79 | + <p v-for="img in form.sub_img3">{{img.split(":")[0]}}<a @click="removeImage(3,img)" style="color:red"> x</a> | |
| 80 | + </p> | |
| 81 | + </el-col> | |
| 82 | + </el-row> | |
| 83 | + <el-row type="flex" justify="center"> | |
| 84 | + <el-col :span="6"> | |
| 85 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(4)">ๆด่ฝฆๆบ็ ง็</a> | |
| 86 | + <el-input v-model="form.sub_img4" type="hidden"></el-input> | |
| 87 | + <p v-for="img in form.sub_img4">{{img.split(":")[0]}}<a @click="removeImage(4,img)" style="color:red"> x</a> | |
| 88 | + </p> | |
| 89 | + </el-col> | |
| 90 | + <el-col :span="6"> | |
| 91 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(5)">ๆๅๅคด่ง้ขๆชๅพ1</a> | |
| 92 | + <el-input v-model="form.sub_img5" type="hidden"></el-input> | |
| 93 | + <p v-for="img in form.sub_img5">{{img.split(":")[0]}}<a @click="removeImage(5,img)" style="color:red"> x</a> | |
| 94 | + </p> | |
| 95 | + </el-col> | |
| 96 | + <el-col :span="6"> | |
| 97 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(6)">ๆๅๅคด่ง้ขๆชๅพ2</a> | |
| 98 | + <el-input v-model="form.sub_img6" type="hidden"></el-input> | |
| 99 | + <p v-for="img in form.sub_img6">{{img.split(":")[0]}}<a @click="removeImage(6,img)" style="color:red"> x</a> | |
| 100 | + </p> | |
| 101 | + </el-col> | |
| 102 | + <el-col :span="6"> | |
| 103 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(7)">ๆๅๅคด่ง้ขๆชๅพ3</a> | |
| 104 | + <el-input v-model="form.sub_img7" type="hidden"></el-input> | |
| 105 | + <p v-for="img in form.sub_img7">{{img.split(":")[0]}}<a @click="removeImage(7,img)" style="color:red"> x</a> | |
| 106 | + </p> | |
| 107 | + </el-col> | |
| 108 | + </el-row> | |
| 109 | + <el-row type="flex" justify="center"> | |
| 110 | + <el-col :span="5"> | |
| 111 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(8)">ๅ ถไป1</a> | |
| 112 | + <el-input v-model="form.sub_img8" type="hidden"></el-input> | |
| 113 | + <p v-for="img in form.sub_img8">{{img.split(":")[0]}}<a @click="removeImage(8,img)" style="color:red"> x</a> | |
| 114 | + </p> | |
| 115 | + </el-col> | |
| 116 | + <el-col :span="5"> | |
| 117 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(9)">ๅ ถไป2</a> | |
| 118 | + <el-input v-model="form.sub_img9" type="hidden"></el-input> | |
| 119 | + <p v-for="img in form.sub_img9">{{img.split(":")[0]}}<a @click="removeImage(9,img)" style="color:red"> x</a> | |
| 120 | + </p> | |
| 121 | + </el-col> | |
| 122 | + <el-col :span="5"> | |
| 123 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(10)">ๅ ถไป3</a> | |
| 124 | + <el-input v-model="form.sub_img10" type="hidden"></el-input> | |
| 125 | + <p v-for="img in form.sub_img10">{{img.split(":")[0]}}<a @click="removeImage(10,img)" style="color:red"> | |
| 126 | + x</a> | |
| 127 | + </p> | |
| 128 | + </el-col> | |
| 129 | + <el-col :span="5"> | |
| 130 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(11)">ๅ ถไป4</a> | |
| 131 | + <el-input v-model="form.sub_img11" type="hidden"></el-input> | |
| 132 | + <p v-for="img in form.sub_img11">{{img.split(":")[0]}}<a @click="removeImage(11,img)" style="color:red"> | |
| 133 | + x</a> | |
| 134 | + </p> | |
| 135 | + </el-col> | |
| 136 | + <el-col :span="4"> | |
| 137 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(12)">ๅ ถไป5</a> | |
| 138 | + <el-input v-model="form.sub_img12" type="hidden"></el-input> | |
| 139 | + <p v-for="img in form.sub_img12">{{img.split(":")[0]}}<a @click="removeImage(12,img)" style="color:red"> | |
| 140 | + x</a> | |
| 141 | + </p> | |
| 142 | + </el-col> | |
| 143 | + </el-row> | |
| 93 | 144 | </el-form> |
| 94 | 145 | |
| 146 | + | |
| 95 | 147 | <div slot="footer" class="dialog-footer"> |
| 96 | - <el-button type="primary" @click="submitForm">็กฎ ๅฎ</el-button> | |
| 97 | - <el-button @click="cancel">ๅ ๆถ</el-button> | |
| 148 | + <el-button type="danger" @click="submitForm(form.formData[0].controlId ,1)">้ฉณๅ</el-button> | |
| 149 | + <el-button type="primary" @click="submitForm(form.formData[0].controlId ,0)">้่ฟ</el-button> | |
| 150 | + </div> | |
| 151 | + </el-dialog> | |
| 152 | + | |
| 153 | + <el-dialog title="้ไปถ" :visible.sync="uploadImageDialog" append-to-body :beforeClose="handleClose"> | |
| 154 | + <el-upload multiple :headers="upload.headers" :action="upload.url" :file-list="fileList" | |
| 155 | + :on-success="uploadSuccess" :before-upload="beforeUpload"> | |
| 156 | + <el-button size="small" type="primary">้ๆฉ้ไปถ</el-button> | |
| 157 | + <div slot="tip" class="el-upload__tip">ๅช่ฝไธไผ ไธ่ถ ่ฟ 20MB ็jpg pdf wordๆไปถ</div> | |
| 158 | + </el-upload> | |
| 159 | + <div style="height: 40px;width:100%;"> | |
| 160 | + <el-button type="primary" style="margin-top: 20px;float:right;" @click="handleClose">ๅ ณ้ญ</el-button> | |
| 98 | 161 | </div> |
| 99 | 162 | </el-dialog> |
| 100 | 163 | |
| 164 | + <el-dialog title="็คบๆๅพ" :visible.sync="picSample" append-to-body> | |
| 165 | + <img src="../../../assets/logo/logo.jpg" width="100%" height="800px" /> | |
| 166 | + </el-dialog> | |
| 101 | 167 | </div> |
| 102 | 168 | </template> |
| 103 | 169 | |
| ... | ... | @@ -111,12 +177,24 @@ |
| 111 | 177 | formDataShow, |
| 112 | 178 | formDataSave |
| 113 | 179 | } from "@/api/activiti/task"; |
| 180 | + | |
| 181 | + import { | |
| 182 | + updateThreestep, | |
| 183 | + activeThreestep | |
| 184 | + } from "@/api/business/threestep"; | |
| 185 | + | |
| 114 | 186 | import leaveHistoryForm from "@/views/workflow/leaveHistoryForm"; |
| 115 | 187 | import threestepInfo from "@/views/business/threestep/threestepInfo"; |
| 188 | + import taskCard from "@/views/activiti/task/taskCard"; | |
| 189 | + import { | |
| 190 | + getToken | |
| 191 | + } from "@/utils/auth"; | |
| 192 | + | |
| 116 | 193 | |
| 117 | 194 | export default { |
| 118 | 195 | name: "task", |
| 119 | 196 | components: { |
| 197 | + taskCard, | |
| 120 | 198 | leaveHistoryForm, |
| 121 | 199 | threestepInfo |
| 122 | 200 | }, |
| ... | ... | @@ -138,11 +216,14 @@ |
| 138 | 216 | // ๆปๆกๆฐ |
| 139 | 217 | total: 0, |
| 140 | 218 | // ่ฏทๅ่กจๆ ผๆฐๆฎ |
| 141 | - tastList: [], | |
| 219 | + taskList: [], | |
| 142 | 220 | // ๅผนๅบๅฑๆ ้ข |
| 143 | 221 | title: "", |
| 144 | 222 | // ๆฏๅฆๆพ็คบๅผนๅบๅฑ |
| 145 | 223 | open: false, |
| 224 | + open2: false, | |
| 225 | + picSample: false, | |
| 226 | + taskName: null, | |
| 146 | 227 | // ๆฅ่ฏขๅๆฐ |
| 147 | 228 | queryParams: { |
| 148 | 229 | pageNum: 1, |
| ... | ... | @@ -152,32 +233,79 @@ |
| 152 | 233 | form: { |
| 153 | 234 | formData: [] |
| 154 | 235 | }, |
| 155 | - needShow:false, | |
| 236 | + needShow: false, | |
| 156 | 237 | // ่กจๅๆ ก้ช |
| 157 | - rules: {}, | |
| 158 | - threestep_type:{ | |
| 159 | - "0":"ๅทฅๅฐ", | |
| 160 | - "1":"ๅทฅๅฐ", | |
| 238 | + rules: { | |
| 239 | + subReason: [{ | |
| 240 | + required: true, | |
| 241 | + message: '่ฏทๅกซๅ่กฅๅ ่ฏดๆ', | |
| 242 | + trigger: 'blur' | |
| 243 | + }, ], | |
| 244 | + | |
| 245 | + }, | |
| 246 | + picIndex: 0, | |
| 247 | + fileList: [], | |
| 248 | + upload: { | |
| 249 | + // ๆฏๅฆๆพ็คบๅผนๅบๅฑ๏ผ็จๆทๅฏผๅ ฅ๏ผ | |
| 250 | + open: false, | |
| 251 | + // ๅผนๅบๅฑๆ ้ข๏ผ็จๆทๅฏผๅ ฅ๏ผ | |
| 252 | + title: "", | |
| 253 | + // ๆฏๅฆ็ฆ็จไธไผ | |
| 254 | + isUploading: false, | |
| 255 | + // ่ฎพ็ฝฎไธไผ ็่ฏทๆฑๅคด้จ | |
| 256 | + headers: { | |
| 257 | + Authorization: "Bearer " + getToken() | |
| 258 | + }, | |
| 259 | + // ไธไผ ็ๅฐๅ | |
| 260 | + url: process.env.VUE_APP_BASE_API + "/business/threestep/upload", | |
| 161 | 261 | }, |
| 262 | + uploadImageDialog: false, | |
| 162 | 263 | }; |
| 163 | 264 | }, |
| 164 | 265 | created() { |
| 165 | 266 | this.getList(); |
| 166 | 267 | }, |
| 167 | 268 | methods: { |
| 168 | - /** ๆฅ่ฏข่ฏทๅๅ่กจ */ | |
| 269 | + handleClose() { | |
| 270 | + this.uploadImageDialog = false; | |
| 271 | + this.fileList = []; | |
| 272 | + }, | |
| 273 | + removeImage(index, img) { | |
| 274 | + let target = "sub_img" + this.picIndex; | |
| 275 | + this.form[target].splice(this.form[target].indexOf(img), 1); | |
| 276 | + }, | |
| 277 | + uploadSuccess(res, file, fileList) { | |
| 278 | + let target = "sub_img" + this.picIndex; | |
| 279 | + if (!this.form[target]) { | |
| 280 | + this.form[target] = []; | |
| 281 | + } | |
| 282 | + this.form[target].push(file.name + ':' + res); | |
| 283 | + | |
| 284 | + }, | |
| 285 | + showFileUpload(i) { | |
| 286 | + this.uploadImageDialog = true; | |
| 287 | + this.picIndex = i; | |
| 288 | + }, | |
| 289 | + beforeUpload(file) { | |
| 290 | + let isRightSize = file.size / 1024 / 1024 < 20 | |
| 291 | + if (!isRightSize) { | |
| 292 | + this.$message.error('ๆไปถๅคงๅฐ่ถ ่ฟ 20MB') | |
| 293 | + return isRightSize; | |
| 294 | + } | |
| 295 | + let isAccept = false; | |
| 296 | + if (file.name.indexOf('.docx') > -1 || file.name.indexOf(".jpg") > -1 || file.name.indexOf('.doc') > -1 || file | |
| 297 | + .name.indexOf('.pdf') > -1) { | |
| 298 | + isAccept = true; | |
| 299 | + } | |
| 300 | + if (!isAccept) { | |
| 301 | + this.$message.error('ๅบ่ฏฅ้ๆฉPDFใJPGใWORD็ฑปๅ็ๆไปถ') | |
| 302 | + return isAccept; | |
| 303 | + } | |
| 304 | + }, | |
| 169 | 305 | getList() { |
| 170 | 306 | this.loading = true; |
| 171 | 307 | listTask(this.queryParams).then(response => { |
| 172 | - | |
| 173 | - for(let i = 0 ; i < response.rows.length;i++){ | |
| 174 | - if(response.rows[i].definitionKey == "workflow_threestep"){ | |
| 175 | - response.rows[i].type = this.threestep_type[response.rows[i].type]; | |
| 176 | - } | |
| 177 | - } | |
| 178 | - | |
| 179 | - this.tastList = response.rows; | |
| 180 | - | |
| 308 | + this.taskList = response.rows; | |
| 181 | 309 | this.total = response.total; |
| 182 | 310 | this.loading = false; |
| 183 | 311 | }); |
| ... | ... | @@ -198,44 +326,12 @@ |
| 198 | 326 | }; |
| 199 | 327 | this.resetForm("form"); |
| 200 | 328 | }, |
| 201 | - agreeAndDismiss(row,idx){ | |
| 202 | - this.definitionKey = row.definitionKey; | |
| 203 | - this.businessKey = row.businessKey; | |
| 204 | - this.id = row.id; | |
| 205 | - formDataShow(row.id).then(response => { | |
| 206 | - let datas = response.data; | |
| 207 | - let formData = [] | |
| 208 | - for (let i = 0; i < datas.length; i++) { | |
| 209 | - let strings = datas[i].split('--__!!') | |
| 210 | - let controlValue = null | |
| 211 | - let controlDefault = null | |
| 212 | - switch (strings[1]) { | |
| 213 | - case 'radio': | |
| 214 | - controlValue = idx; | |
| 215 | - controlDefault = strings[4] | |
| 216 | - break; | |
| 217 | - } | |
| 218 | - formData.push({ | |
| 219 | - controlId: strings[0], | |
| 220 | - controlType: strings[1], | |
| 221 | - controlLable: strings[2], | |
| 222 | - controlIsParam: strings[3], | |
| 223 | - controlValue: controlValue, | |
| 224 | - controlDefault: controlDefault | |
| 225 | - }) | |
| 226 | - } | |
| 227 | - debugger; | |
| 228 | - this.form.formData = formData; | |
| 229 | - this.submitForm(); | |
| 230 | - }); | |
| 231 | - | |
| 232 | - }, | |
| 233 | - /** ๅฎกๆนๆ้ฎๆไฝ */ | |
| 234 | - examineAndApprove(row,idx) { | |
| 329 | + showTask(row, idx) { | |
| 235 | 330 | this.reset(); |
| 236 | 331 | this.definitionKey = row.definitionKey; |
| 237 | 332 | this.businessKey = row.businessKey; |
| 238 | 333 | this.id = row.id; |
| 334 | + this.taskName = row.name; | |
| 239 | 335 | formDataShow(row.id).then(response => { |
| 240 | 336 | let datas = response.data; |
| 241 | 337 | let formData = [] |
| ... | ... | @@ -261,24 +357,67 @@ |
| 261 | 357 | } |
| 262 | 358 | this.form.formData = formData; |
| 263 | 359 | |
| 264 | - if(this.definitionKey == "workflow_threestep"){ | |
| 360 | + if (this.definitionKey == "workflow_threestep") { | |
| 265 | 361 | this.open2 = true; |
| 266 | 362 | return; |
| 267 | 363 | } |
| 268 | - | |
| 269 | - | |
| 270 | 364 | this.open = true; |
| 271 | 365 | this.title = "ๅฎกๆน"; |
| 272 | - | |
| 273 | 366 | }); |
| 274 | 367 | }, |
| 275 | 368 | /** ๆไบคๆ้ฎ */ |
| 276 | - submitForm() { | |
| 277 | - formDataSave(this.id, this.form.formData).then(response => { | |
| 369 | + submitForm(formid, value) { | |
| 370 | + | |
| 371 | + this.form.formData[0].controlValue = value; | |
| 372 | + this.form.formData[0].controlId = formid; | |
| 373 | + | |
| 374 | + if (this.definitionKey == "workflow_threestep") { | |
| 375 | + this.form.id = this.businessKey.split(":")[1]; | |
| 376 | + if (this.form.formData[0].controlValue == 0) { | |
| 377 | + this.form.status = 1; | |
| 378 | + } else { | |
| 379 | + this.form.status = 2; | |
| 380 | + } | |
| 381 | + | |
| 382 | + for (let i = 0; i < 13; i++) { | |
| 383 | + if (this.form["sub_img" + i]) { | |
| 384 | + let paths = ""; | |
| 385 | + for (var j = 0; j < this.form["sub_img" + i].length; j++) { | |
| 386 | + paths += this.form["sub_img" + i][j].split(":")[1] + ","; | |
| 387 | + } | |
| 388 | + this.form["sub_img" + i] = paths.substring(0, paths.length - 1); | |
| 389 | + } | |
| 390 | + } | |
| 391 | + | |
| 392 | + this.form.checkTime = new Date(); | |
| 393 | + if (this.form.status == 1) { | |
| 394 | + activeThreestep(this.form).then(res => { | |
| 395 | + formDataSave(this.id, this.form.formData).then(response => { | |
| 396 | + this.msgSuccess("ๅฎกๆนๆๅ"); | |
| 397 | + this.open2 = false; | |
| 398 | + this.taskList = []; | |
| 399 | + this.getList(); | |
| 400 | + }); | |
| 401 | + }); | |
| 402 | + } else { | |
| 403 | + updateThreestep(this.form).then(res => { | |
| 404 | + formDataSave(this.id, this.form.formData).then(response => { | |
| 405 | + this.msgSuccess("ๅฎกๆนๆๅ"); | |
| 406 | + this.open2 = false; | |
| 407 | + this.taskList = []; | |
| 408 | + this.getList(); | |
| 409 | + }); | |
| 410 | + }); | |
| 411 | + } | |
| 412 | + } | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + /* formDataSave(this.id, this.form.formData).then(response => { | |
| 278 | 417 | this.msgSuccess("ๅฎกๆนๆๅ"); |
| 279 | 418 | this.open = false; |
| 280 | 419 | this.getList(); |
| 281 | - }); | |
| 420 | + }); */ | |
| 282 | 421 | }, |
| 283 | 422 | } |
| 284 | 423 | }; | ... | ... |
trash-ui/src/views/activiti/task/taskCard.vue
0 โ 100644
| 1 | +<template> | |
| 2 | + <el-card class="box-card"> | |
| 3 | + <div | |
| 4 | + :class="{card_status:true,notcheck:!task.checkStatus,dismiss:task.checkStatus=='1',agree:task.checkStatus=='0'}"> | |
| 5 | + {{task.checkStatus? task.checkStatus=="0"?"ๅทฒๅๆ":"ๅทฒๆ็ป" : "ๅพ ๅฎกๆน"}}</div> | |
| 6 | + <div class="card_btn"> | |
| 7 | + <a @click="sendToParent(task)">่ฏฆๆ >></a> | |
| 8 | + </div> | |
| 9 | + <el-row class="card_row"> | |
| 10 | + <el-col :span="2" class="card_grid"></el-col> | |
| 11 | + <div class="card_title">{{task.instanceName}}</div> | |
| 12 | + </el-row> | |
| 13 | + | |
| 14 | + <el-row class="card_row"> | |
| 15 | + <el-col :span="3" class="card_grid"></el-col> | |
| 16 | + <el-col :span="6" class="card_grid"> | |
| 17 | + <div>ๅผๅงๆถ้ด: {{task.startTime}}</div> | |
| 18 | + </el-col> | |
| 19 | + <el-col :span="6" class="card_grid center"> | |
| 20 | + <div>็ปๆๆถ้ด: {{task.endTime}}</div> | |
| 21 | + </el-col> | |
| 22 | + <el-col :span="6" class="card_grid right"> | |
| 23 | + <div>็ณ่ฏท็ฑปๅ: {{task.type}}</div> | |
| 24 | + </el-col> | |
| 25 | + <el-col :span="3" class="card_grid"></el-col> | |
| 26 | + </el-row> | |
| 27 | + <el-row class="card_row"> | |
| 28 | + <el-col :span="3" class="card_grid"> | |
| 29 | + <div></div> | |
| 30 | + </el-col> | |
| 31 | + <el-col :span="18"> | |
| 32 | + <div>็ณ่ฏท็็ฑ: {{task.reason}}</div> | |
| 33 | + </el-col> | |
| 34 | + <el-col :span="3" class="card_grid"></el-col> | |
| 35 | + </el-row> | |
| 36 | + </el-card> | |
| 37 | +</template> | |
| 38 | + | |
| 39 | +<script> | |
| 40 | + export default { | |
| 41 | + name: "taskCard", | |
| 42 | + props: { | |
| 43 | + task: { | |
| 44 | + type: Object | |
| 45 | + }, | |
| 46 | + }, | |
| 47 | + | |
| 48 | + data() { | |
| 49 | + return { | |
| 50 | + | |
| 51 | + threestep_type:{ | |
| 52 | + "0":"ๅทฅๅฐ", | |
| 53 | + "1":"ๆถ็บณๅบ", | |
| 54 | + }, | |
| 55 | + } | |
| 56 | + }, | |
| 57 | + created() { | |
| 58 | + | |
| 59 | + if (this.task.definitionKey == "workflow_threestep") { | |
| 60 | + this.task.type = this.threestep_type[this.task.type]; | |
| 61 | + } | |
| 62 | + }, | |
| 63 | + methods: { | |
| 64 | + sendToParent(task) { | |
| 65 | + this.$emit("sendToParent", task); | |
| 66 | + }, | |
| 67 | + | |
| 68 | + } | |
| 69 | + } | |
| 70 | +</script> | |
| 71 | + | |
| 72 | +<style> | |
| 73 | +</style> | ... | ... |
trash-ui/src/views/activiti/taskhistory/end.vue
| 1 | 1 | <template> |
| 2 | 2 | <div class="app-container"> |
| 3 | 3 | |
| 4 | - <el-card class="box-card" v-for="task in tastList"> | |
| 5 | - <div :class="{card_status:true,dismiss:task.checkStatus=='1',agree:task.checkStatus=='0'}">{{task.checkStatus=="0"?"ๅทฒๅๆ":"ๅทฒๆ็ป"}}</div> | |
| 6 | - <div class="card_btn"> | |
| 7 | - <a @click="examineAndApprove(task,-1)" >่ฏฆๆ >></a> | |
| 8 | - </div> | |
| 9 | - <el-row class="card_row"> | |
| 10 | - <el-col :span="2" class="card_grid"></el-col> | |
| 11 | - <div class="card_title">{{task.instanceName}}</div> | |
| 12 | - </el-row> | |
| 13 | - | |
| 14 | - <el-row class="card_row"> | |
| 15 | - <el-col :span="3" class="card_grid"></el-col> | |
| 16 | - <el-col :span="6" class="card_grid"> | |
| 17 | - <div>ๅผๅงๆถ้ด: {{task.startTime}}</div> | |
| 18 | - </el-col> | |
| 19 | - <el-col :span="6" class="card_grid center"> | |
| 20 | - <div>็ปๆๆถ้ด: {{task.endTime}}</div> | |
| 21 | - </el-col> | |
| 22 | - <el-col :span="6" class="card_grid right"> | |
| 23 | - <div>็ณ่ฏท็ฑปๅ: {{task.type}}</div> | |
| 24 | - </el-col> | |
| 25 | - <el-col :span="3" class="card_grid"></el-col> | |
| 26 | - </el-row> | |
| 27 | - <el-row class="card_row"> | |
| 28 | - <el-col :span="3" class="card_grid"> | |
| 29 | - <div></div> | |
| 30 | - </el-col> | |
| 31 | - <el-col :span="18"> | |
| 32 | - <div>็ณ่ฏท็็ฑ: {{task.reason}}</div> | |
| 33 | - </el-col> | |
| 34 | - <el-col :span="3" class="card_grid"></el-col> | |
| 35 | - </el-row> | |
| 36 | - </el-card> | |
| 37 | - | |
| 38 | - | |
| 39 | - <!--<el-table v-loading="loading" :data="tastList"> | |
| 40 | - <el-table-column label="ๆต็จID" align="center" prop="id"/> | |
| 41 | - <el-table-column label="ๆต็จๅ็งฐ" align="center" prop="instanceName" /> | |
| 42 | - <el-table-column label="ไปปๅก่็นๅ็งฐ" align="center" prop="name" /> | |
| 43 | - <el-table-column label="ไปปๅก็ถๆ" align="center" prop="status" /> | |
| 44 | - <el-table-column label="ๅ็ไบบ" align="center" prop="assignee" /> | |
| 45 | - <el-table-column label="ๅๅปบๆถ้ด" align="center" prop="createdDate" /> | |
| 46 | - | |
| 47 | - <el-table-column label="ๆไฝ" align="center" class-name="small-padding fixed-width"> | |
| 48 | - <template slot-scope="scope"> | |
| 49 | - <el-button size="mini" type="text" icon="el-icon-edit" @click="examineAndApprove (scope.row)" | |
| 50 | - v-hasPermi="['workflow:leave:edit']">ๅฎกๆน | |
| 51 | - </el-button> | |
| 52 | - </template> | |
| 53 | - </el-table-column> | |
| 54 | - </el-table>--> | |
| 4 | + <taskCard :task="task" v-for="task in taskList" @sendToParent="showTask"/> | |
| 55 | 5 | |
| 56 | 6 | <pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> |
| 57 | 7 | |
| 58 | - <!-- ๆฅ็่ฏฆ็ปไฟกๆฏ่ฏๆก --> | |
| 59 | - <el-dialog :title="title" :visible.sync="open" append-to-body> | |
| 60 | - <earthSitesForm :businessKey="businessKey" v-if="open"/> | |
| 61 | - <div slot="footer" class="dialog-footer"> | |
| 62 | - <el-button @click="open=!open">ๅ ณ้ญ</el-button> | |
| 63 | - </div> | |
| 64 | - </el-dialog> | |
| 8 | + <el-dialog :title="title" :visible.sync="open2" width="800px" append-to-body> | |
| 9 | + <threestepInfo :businessKey="businessKey" v-if="open2"/> | |
| 10 | + | |
| 11 | + </el-dialog> | |
| 65 | 12 | |
| 66 | 13 | </div> |
| 67 | 14 | </template> |
| 68 | 15 | |
| 16 | + | |
| 69 | 17 | <style> |
| 70 | 18 | @import '../../../assets/css/task.css' |
| 71 | 19 | </style> |
| ... | ... | @@ -75,13 +23,16 @@ |
| 75 | 23 | listEndTask, |
| 76 | 24 | formDataShow |
| 77 | 25 | } from "@/api/activiti/taskhistory"; |
| 78 | - import leaveHistoryForm from "@/views/workflow/leaveHistoryForm"; | |
| 26 | + | |
| 27 | + import taskCard from "@/views/activiti/task/taskCard"; | |
| 79 | 28 | import earthSitesForm from "@/views/workflow/earthSitesForm"; |
| 29 | + import threestepInfo from "@/views/business/threestep/threestepInfo"; | |
| 80 | 30 | |
| 81 | 31 | export default { |
| 82 | 32 | name: "taskHistory", |
| 83 | 33 | components: { |
| 84 | - leaveHistoryForm, | |
| 34 | + taskCard, | |
| 35 | + threestepInfo, | |
| 85 | 36 | earthSitesForm |
| 86 | 37 | }, |
| 87 | 38 | data() { |
| ... | ... | @@ -102,7 +53,7 @@ |
| 102 | 53 | // ๆปๆกๆฐ |
| 103 | 54 | total: 0, |
| 104 | 55 | // ่ฏทๅ่กจๆ ผๆฐๆฎ |
| 105 | - tastList: [], | |
| 56 | + taskList: [], | |
| 106 | 57 | // ๅผนๅบๅฑๆ ้ข |
| 107 | 58 | title: "", |
| 108 | 59 | // ๆฏๅฆๆพ็คบๅผนๅบๅฑ |
| ... | ... | @@ -112,6 +63,8 @@ |
| 112 | 63 | pageNum: 1, |
| 113 | 64 | pageSize: 10, |
| 114 | 65 | }, |
| 66 | + | |
| 67 | + open2:false, | |
| 115 | 68 | // ่กจๅๅๆฐ |
| 116 | 69 | form: { |
| 117 | 70 | formData: [] |
| ... | ... | @@ -129,7 +82,7 @@ |
| 129 | 82 | getList() { |
| 130 | 83 | this.loading = true; |
| 131 | 84 | listEndTask(this.queryParams).then(response => { |
| 132 | - this.tastList = response.rows; | |
| 85 | + this.taskList = response.rows; | |
| 133 | 86 | this.total = response.total; |
| 134 | 87 | this.loading = false; |
| 135 | 88 | }); |
| ... | ... | @@ -149,46 +102,21 @@ |
| 149 | 102 | }; |
| 150 | 103 | this.resetForm("form"); |
| 151 | 104 | }, |
| 152 | - examineAndApprove(row,idx) { | |
| 105 | + showTask(row) { | |
| 153 | 106 | this.needShow = false; |
| 154 | 107 | this.reset(); |
| 155 | 108 | this.definitionKey = row.definitionKey; |
| 156 | 109 | this.businessKey = row.businessKey; |
| 157 | 110 | this.id = row.id; |
| 158 | - this.open = true; | |
| 111 | + | |
| 159 | 112 | this.title = "่ฏฆๆ "; |
| 160 | - /* formDataShow(this.id).then(response => { | |
| 161 | - // FormProperty_3qipis2--__!!radio--__!!ๅฎกๆนๆ่ง--__!!i--__!!ๅๆ--__--ไธๅๆ | |
| 162 | - // FormProperty_0lffpcm--__!!textarea--__!!ๆนๆณจ--__!!f--__!!null | |
| 163 | - let datas = response.data; | |
| 164 | - let formData = [] | |
| 165 | - for (let i = 0; i < datas.length; i++) { | |
| 166 | - let strings = datas[i].split('--__!!') | |
| 167 | - let controlValue = null | |
| 168 | - let controlDefault = null | |
| 169 | - switch (strings[1]) { | |
| 170 | - case 'radio': | |
| 171 | - controlValue = idx; | |
| 172 | - controlDefault = strings[4] | |
| 173 | - break; | |
| 174 | - // default: | |
| 175 | - } | |
| 176 | 113 | |
| 177 | - if(idx == -1){ | |
| 178 | - this.needShow = true; | |
| 179 | - } | |
| 114 | + if(this.definitionKey == "workflow_threestep"){ | |
| 115 | + this.open2 = true; | |
| 116 | + return; | |
| 117 | + } | |
| 180 | 118 | |
| 181 | - formData.push({ | |
| 182 | - controlId: strings[0], | |
| 183 | - controlType: strings[1], | |
| 184 | - controlLable: strings[2], | |
| 185 | - controlIsParam: strings[3], | |
| 186 | - controlValue: controlValue, | |
| 187 | - controlDefault: controlDefault | |
| 188 | - }) | |
| 189 | - } | |
| 190 | - this.form.formData = formData; | |
| 191 | - }); */ | |
| 119 | + this.open = true; | |
| 192 | 120 | }, |
| 193 | 121 | } |
| 194 | 122 | }; | ... | ... |
trash-ui/src/views/activiti/taskhistory/index.vue
| 1 | 1 | <template> |
| 2 | 2 | <div class="app-container"> |
| 3 | 3 | |
| 4 | - <el-card class="box-card" v-for="task in tastList"> | |
| 5 | - <div :class="{card_status:true,dismiss:task.checkStatus=='1',agree:task.checkStatus=='0'}">{{task.checkStatus=="0"?"ๅทฒๅๆ":"ๅทฒๆ็ป"}}</div> | |
| 6 | - <div class="card_btn"> | |
| 7 | - <a @click="examineAndApprove(task,-1)" >่ฏฆๆ >></a> | |
| 8 | - </div> | |
| 9 | - <el-row class="card_row"> | |
| 10 | - <el-col :span="2" class="card_grid"></el-col> | |
| 11 | - <div class="card_title">{{task.instanceName}}</div> | |
| 12 | - </el-row> | |
| 13 | - | |
| 14 | - <el-row class="card_row"> | |
| 15 | - <el-col :span="3" class="card_grid"></el-col> | |
| 16 | - <el-col :span="6" class="card_grid"> | |
| 17 | - <div>ๅผๅงๆถ้ด: {{task.startTime}}</div> | |
| 18 | - </el-col> | |
| 19 | - <el-col :span="6" class="card_grid center"> | |
| 20 | - <div>็ปๆๆถ้ด: {{task.endTime}}</div> | |
| 21 | - </el-col> | |
| 22 | - <el-col :span="6" class="card_grid right"> | |
| 23 | - <div>็ณ่ฏท็ฑปๅ: {{task.type}}</div> | |
| 24 | - </el-col> | |
| 25 | - <el-col :span="3" class="card_grid"></el-col> | |
| 26 | - </el-row> | |
| 27 | - <el-row class="card_row"> | |
| 28 | - <el-col :span="3" class="card_grid"> | |
| 29 | - <div></div> | |
| 30 | - </el-col> | |
| 31 | - <el-col :span="18"> | |
| 32 | - <div>็ณ่ฏท็็ฑ: {{task.reason}}</div> | |
| 33 | - </el-col> | |
| 34 | - <el-col :span="3" class="card_grid"></el-col> | |
| 35 | - </el-row> | |
| 36 | - </el-card> | |
| 37 | - | |
| 38 | - | |
| 39 | - <!--<el-table v-loading="loading" :data="tastList"> | |
| 40 | - <el-table-column label="ๆต็จID" align="center" prop="id"/> | |
| 41 | - <el-table-column label="ๆต็จๅ็งฐ" align="center" prop="instanceName" /> | |
| 42 | - <el-table-column label="ไปปๅก่็นๅ็งฐ" align="center" prop="name" /> | |
| 43 | - <el-table-column label="ไปปๅก็ถๆ" align="center" prop="status" /> | |
| 44 | - <el-table-column label="ๅ็ไบบ" align="center" prop="assignee" /> | |
| 45 | - <el-table-column label="ๅๅปบๆถ้ด" align="center" prop="createdDate" /> | |
| 46 | - | |
| 47 | - <el-table-column label="ๆไฝ" align="center" class-name="small-padding fixed-width"> | |
| 48 | - <template slot-scope="scope"> | |
| 49 | - <el-button size="mini" type="text" icon="el-icon-edit" @click="examineAndApprove (scope.row)" | |
| 50 | - v-hasPermi="['workflow:leave:edit']">ๅฎกๆน | |
| 51 | - </el-button> | |
| 52 | - </template> | |
| 53 | - </el-table-column> | |
| 54 | - </el-table>--> | |
| 4 | + <taskCard :task="task" v-for="task in taskList" @sendToParent="showTask"/> | |
| 55 | 5 | |
| 56 | 6 | <pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> |
| 57 | 7 | |
| 58 | - <!-- ๆฅ็่ฏฆ็ปไฟกๆฏ่ฏๆก --> | |
| 59 | - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> | |
| 60 | - <leaveHistoryForm :businessKey="businessKey" v-if="open"/> | |
| 61 | - <div slot="footer" class="dialog-footer"> | |
| 62 | - <el-button @click="open=!open">ๅ ณ้ญ</el-button> | |
| 63 | - </div> | |
| 64 | - </el-dialog> | |
| 8 | + <el-dialog :title="title" :visible.sync="open2" width="800px" append-to-body> | |
| 9 | + <threestepInfo :businessKey="businessKey" v-if="open2"/> | |
| 10 | + | |
| 11 | + </el-dialog> | |
| 65 | 12 | |
| 66 | 13 | </div> |
| 67 | 14 | </template> |
| ... | ... | @@ -75,12 +22,17 @@ |
| 75 | 22 | listTask, |
| 76 | 23 | formDataShow |
| 77 | 24 | } from "@/api/activiti/taskhistory"; |
| 25 | + | |
| 26 | + import taskCard from "@/views/activiti/task/taskCard"; | |
| 78 | 27 | import leaveHistoryForm from "@/views/workflow/leaveHistoryForm"; |
| 28 | + import threestepInfo from "@/views/business/threestep/threestepInfo"; | |
| 79 | 29 | |
| 80 | 30 | export default { |
| 81 | 31 | name: "taskHistory", |
| 82 | 32 | components: { |
| 83 | - leaveHistoryForm | |
| 33 | + taskCard, | |
| 34 | + leaveHistoryForm, | |
| 35 | + threestepInfo | |
| 84 | 36 | }, |
| 85 | 37 | data() { |
| 86 | 38 | return { |
| ... | ... | @@ -100,11 +52,12 @@ |
| 100 | 52 | // ๆปๆกๆฐ |
| 101 | 53 | total: 0, |
| 102 | 54 | // ่ฏทๅ่กจๆ ผๆฐๆฎ |
| 103 | - tastList: [], | |
| 55 | + taskList: [], | |
| 104 | 56 | // ๅผนๅบๅฑๆ ้ข |
| 105 | 57 | title: "", |
| 106 | 58 | // ๆฏๅฆๆพ็คบๅผนๅบๅฑ |
| 107 | 59 | open: false, |
| 60 | + open2:false, | |
| 108 | 61 | // ๆฅ่ฏขๅๆฐ |
| 109 | 62 | queryParams: { |
| 110 | 63 | pageNum: 1, |
| ... | ... | @@ -127,7 +80,7 @@ |
| 127 | 80 | getList() { |
| 128 | 81 | this.loading = true; |
| 129 | 82 | listTask(this.queryParams).then(response => { |
| 130 | - this.tastList = response.rows; | |
| 83 | + this.taskList = response.rows; | |
| 131 | 84 | this.total = response.total; |
| 132 | 85 | this.loading = false; |
| 133 | 86 | }); |
| ... | ... | @@ -147,46 +100,13 @@ |
| 147 | 100 | }; |
| 148 | 101 | this.resetForm("form"); |
| 149 | 102 | }, |
| 150 | - examineAndApprove(row,idx) { | |
| 103 | + showTask(row,idx) { | |
| 151 | 104 | this.needShow = false; |
| 152 | 105 | this.reset(); |
| 153 | 106 | this.definitionKey = row.definitionKey; |
| 154 | 107 | this.businessKey = row.businessKey; |
| 155 | 108 | this.id = row.id; |
| 156 | - formDataShow(row.id).then(response => { | |
| 157 | - // FormProperty_3qipis2--__!!radio--__!!ๅฎกๆนๆ่ง--__!!i--__!!ๅๆ--__--ไธๅๆ | |
| 158 | - // FormProperty_0lffpcm--__!!textarea--__!!ๆนๆณจ--__!!f--__!!null | |
| 159 | - let datas = response.data; | |
| 160 | - let formData = [] | |
| 161 | - for (let i = 0; i < datas.length; i++) { | |
| 162 | - let strings = datas[i].split('--__!!') | |
| 163 | - let controlValue = null | |
| 164 | - let controlDefault = null | |
| 165 | - switch (strings[1]) { | |
| 166 | - case 'radio': | |
| 167 | - controlValue = idx; | |
| 168 | - controlDefault = strings[4] | |
| 169 | - break; | |
| 170 | - // default: | |
| 171 | - } | |
| 172 | - | |
| 173 | - if(idx == -1){ | |
| 174 | - this.needShow = true; | |
| 175 | - } | |
| 176 | - | |
| 177 | - formData.push({ | |
| 178 | - controlId: strings[0], | |
| 179 | - controlType: strings[1], | |
| 180 | - controlLable: strings[2], | |
| 181 | - controlIsParam: strings[3], | |
| 182 | - controlValue: controlValue, | |
| 183 | - controlDefault: controlDefault | |
| 184 | - }) | |
| 185 | - } | |
| 186 | - this.form.formData = formData; | |
| 187 | - this.open = true; | |
| 188 | - this.title = "ๅฎกๆน"; | |
| 189 | - }); | |
| 109 | + this.open2 = true; | |
| 190 | 110 | }, |
| 191 | 111 | /** ๆไบคๆ้ฎ */ |
| 192 | 112 | submitForm() { | ... | ... |
trash-ui/src/views/business/CompanyCredit/index.vue
| ... | ... | @@ -31,9 +31,18 @@ |
| 31 | 31 | </el-col> |
| 32 | 32 | <el-col> |
| 33 | 33 | <el-form-item label="ๆๅฑๅบๅ" prop="place"> |
| 34 | - <el-select v-model="queryParams.place" placeholder="ๆๅฑๅบๅ" clearable size="small"> | |
| 35 | - <el-option label="่ฏท้ๆฉๅญๅ ธ็ๆ" value="" /> | |
| 36 | - </el-select> | |
| 34 | + <el-select v-model="queryParams.place" placeholder="ๆๅฑๅบๅ" | |
| 35 | + filterable | |
| 36 | + reserve-keyword | |
| 37 | + clearable | |
| 38 | + size="small" | |
| 39 | + :loading="loading"> | |
| 40 | + <el-option | |
| 41 | + v-for="item in dictPlaces" | |
| 42 | + :label="item" | |
| 43 | + :value="item"> | |
| 44 | + </el-option> | |
| 45 | + </el-select> | |
| 37 | 46 | </el-form-item> |
| 38 | 47 | </el-col> |
| 39 | 48 | </el-row> |
| ... | ... | @@ -98,31 +107,22 @@ |
| 98 | 107 | reserve-keyword |
| 99 | 108 | placeholder="่ฟ่พไผไธ"> |
| 100 | 109 | <el-option |
| 101 | - @click.native="getObjId(item.id)" | |
| 102 | - v-for="item in names" | |
| 103 | - :key="item.value" | |
| 104 | - :label="item.label" | |
| 105 | - :value="item.label"> | |
| 110 | + @click.native="getObjId(item)" | |
| 111 | + v-for="item in companyList" | |
| 112 | + :key="item.id" | |
| 113 | + :label="item.name" | |
| 114 | + :value="item.name"> | |
| 106 | 115 | </el-option> |
| 107 | 116 | </el-select> |
| 108 | 117 | </el-form-item> |
| 109 | 118 | |
| 110 | 119 | <el-form-item label="ๆๅฑๅบๅ" prop="place"> |
| 111 | - <el-select | |
| 120 | + <el-input | |
| 112 | 121 | v-model="form.place" |
| 113 | - filterable | |
| 114 | - reserve-keyword | |
| 115 | - placeholder="ๆๅฑๅบๅ"> | |
| 116 | - <el-option | |
| 117 | - v-for="item in places" | |
| 118 | - :key="item.id" | |
| 119 | - :label="item.label" | |
| 120 | - :value="item.value"> | |
| 121 | - </el-option> | |
| 122 | - </el-select> | |
| 122 | + placeholder="ๆๅฑๅบๅ" disabled /> | |
| 123 | 123 | </el-form-item> |
| 124 | 124 | <el-form-item label="ๅคฑไฟกๅๅ " prop="reason"> |
| 125 | - <el-input v-model="form.reason" placeholder="ๅคฑไฟกๅๅ " /> | |
| 125 | + <el-input v-model="form.reason" placeholder="ๅคฑไฟกๅๅ " /> | |
| 126 | 126 | </el-form-item> |
| 127 | 127 | <el-input v-model="form.lostCredit" value="1" type="hidden" /> |
| 128 | 128 | <el-input v-model="form.objectId" type="hidden" /> |
| ... | ... | @@ -174,8 +174,14 @@ |
| 174 | 174 | updateCredit, |
| 175 | 175 | exportCredit, |
| 176 | 176 | getNames, |
| 177 | + getPlaces, | |
| 177 | 178 | historyCredit |
| 178 | - } from "@/api/business/credit2"; | |
| 179 | + } from "@/api/business/company"; | |
| 180 | + | |
| 181 | + import { | |
| 182 | + companyList | |
| 183 | + } from "@/api/dict"; | |
| 184 | + | |
| 179 | 185 | |
| 180 | 186 | export default { |
| 181 | 187 | name: "Credit", |
| ... | ... | @@ -197,24 +203,9 @@ |
| 197 | 203 | // ๅทฅๅฐ่กจๆ ผๆฐๆฎ |
| 198 | 204 | creditList: [], |
| 199 | 205 | creditListInfo: [], |
| 206 | + companyList:[], | |
| 200 | 207 | dictNames:[], |
| 201 | - dictTypes:[], | |
| 202 | 208 | dictPlaces:[], |
| 203 | - names:[{label:"่ฟ่พไผไธA",value:"่ฟ่พไผไธA",id:"A"}, | |
| 204 | - {label:"่ฟ่พไผไธB",value:"่ฟ่พไผไธB",id:"B"}, | |
| 205 | - {label:"่ฟ่พไผไธC",value:"่ฟ่พไผไธC",id:"C"}, | |
| 206 | - {label:"่ฟ่พไผไธD",value:"่ฟ่พไผไธD",id:"D"}, | |
| 207 | - {label:"่ฟ่พไผไธE",value:"่ฟ่พไผไธE",id:"E"}], | |
| 208 | - types:[{label:"่ฟ่พไผไธA",value:"่ฟ่พไผไธA",id:"A"}, | |
| 209 | - {label:"่ฟ่พไผไธB",value:"่ฟ่พไผไธB",id:"B"}, | |
| 210 | - {label:"่ฟ่พไผไธC",value:"่ฟ่พไผไธC",id:"C"}, | |
| 211 | - {label:"่ฟ่พไผไธD",value:"่ฟ่พไผไธD",id:"D"}, | |
| 212 | - {label:"่ฟ่พไผไธE",value:"่ฟ่พไผไธE",id:"E"}], | |
| 213 | - places:[{label:"่ฟ่พไผไธA",value:"่ฟ่พไผไธA",id:"A"}, | |
| 214 | - {label:"่ฟ่พไผไธB",value:"่ฟ่พไผไธB",id:"B"}, | |
| 215 | - {label:"่ฟ่พไผไธC",value:"่ฟ่พไผไธC",id:"C"}, | |
| 216 | - {label:"่ฟ่พไผไธD",value:"่ฟ่พไผไธD",id:"D"}, | |
| 217 | - {label:"่ฟ่พไผไธE",value:"่ฟ่พไผไธE",id:"E"}], | |
| 218 | 209 | // ๅผนๅบๅฑๆ ้ข |
| 219 | 210 | title: "", |
| 220 | 211 | // ๆฏๅฆๆพ็คบๅผนๅบๅฑ |
| ... | ... | @@ -247,10 +238,28 @@ |
| 247 | 238 | }; |
| 248 | 239 | }, |
| 249 | 240 | created() { |
| 250 | - this.getList(); | |
| 251 | - this.getNamesData(); | |
| 241 | + this.init(); | |
| 252 | 242 | }, |
| 253 | 243 | methods: { |
| 244 | + init(){ | |
| 245 | + this.getList(); | |
| 246 | + getNames(this.queryParams).then(response => { | |
| 247 | + this.dictNames = response; | |
| 248 | + }); | |
| 249 | + getPlaces(this.queryParams).then(response => { | |
| 250 | + this.dictPlaces = response; | |
| 251 | + }); | |
| 252 | + | |
| 253 | + let query = { | |
| 254 | + 'page':1, | |
| 255 | + 'size':9999, | |
| 256 | + 'creditStatus':0 | |
| 257 | + } | |
| 258 | + companyList(query).then(response => { | |
| 259 | + | |
| 260 | + this.companyList = response.result.list; | |
| 261 | + }); | |
| 262 | + }, | |
| 254 | 263 | getDataInfo(row){ |
| 255 | 264 | console.log(row); |
| 256 | 265 | |
| ... | ... | @@ -262,11 +271,6 @@ |
| 262 | 271 | }); |
| 263 | 272 | |
| 264 | 273 | }, |
| 265 | - getNamesData(){ | |
| 266 | - getNames(this.queryParams).then(response => { | |
| 267 | - this.dictNames = response; | |
| 268 | - }); | |
| 269 | - }, | |
| 270 | 274 | getData(stauts){ |
| 271 | 275 | this.queryParams.status=0; |
| 272 | 276 | this.queryParams.lostCredit=stauts; |
| ... | ... | @@ -282,7 +286,8 @@ |
| 282 | 286 | } |
| 283 | 287 | }, |
| 284 | 288 | getObjId(a){ |
| 285 | - this.form.objectId = a; | |
| 289 | + this.form.objectId = a.id; | |
| 290 | + this.form.place = a.areaName; | |
| 286 | 291 | }, |
| 287 | 292 | getList() { |
| 288 | 293 | this.loading = true; | ... | ... |
trash-ui/src/views/business/ConstructionCredit/index.vue
| ... | ... | @@ -17,7 +17,7 @@ |
| 17 | 17 | <el-form-item label="ๅทฅๅฐๅ็งฐ" prop="name" style="float:right;"> |
| 18 | 18 | <el-select v-model="queryParams.name" filterable clearable reserve-keyword placeholder="ๅทฅๅฐๅ็งฐ" size="small" |
| 19 | 19 | :loading="loading"> |
| 20 | - <el-option v-for="item in dictNames" :label="item" :value="item"> | |
| 20 | + <el-option v-for="item in dictNames" :label="item" :value="item" :key="item"> | |
| 21 | 21 | </el-option> |
| 22 | 22 | </el-select> |
| 23 | 23 | </el-form-item> |
| ... | ... | @@ -27,7 +27,7 @@ |
| 27 | 27 | <el-form-item label="ๆๅฑๅบๅฐ" prop="place"> |
| 28 | 28 | <el-select v-model="queryParams.place" filterable clearable reserve-keyword placeholder="ๆๅฑๅบๅฐ" size="small" |
| 29 | 29 | :loading="loading"> |
| 30 | - <el-option v-for="item in dictPlaces" :label="item" :value="item"> | |
| 30 | + <el-option v-for="item in dictPlaces" :label="item" :value="item" :key="item"> | |
| 31 | 31 | </el-option> |
| 32 | 32 | </el-select> |
| 33 | 33 | </el-form-item> |
| ... | ... | @@ -38,7 +38,7 @@ |
| 38 | 38 | <el-form-item label="ๅๅพ็ฑปๅ" prop="type" style="float:right;"> |
| 39 | 39 | <el-select v-model="queryParams.type" filterable clearable reserve-keyword placeholder="ๅปบ็ญๅๅพ็ฑปๅ" size="small" |
| 40 | 40 | :loading="loading"> |
| 41 | - <el-option v-for="item in dictTypes" :label="item" :value="item"> | |
| 41 | + <el-option v-for="item in dictTypes" :label="item" :value="item" :key="item"> | |
| 42 | 42 | </el-option> |
| 43 | 43 | </el-select> |
| 44 | 44 | </el-form-item> |
| ... | ... | @@ -51,7 +51,6 @@ |
| 51 | 51 | </el-form-item> |
| 52 | 52 | </el-col> |
| 53 | 53 | </el-row> |
| 54 | - | |
| 55 | 54 | </el-form> |
| 56 | 55 | |
| 57 | 56 | <el-row :gutter="10" class="mb8"> |
| ... | ... | @@ -144,15 +143,11 @@ |
| 144 | 143 | <el-dialog title="ๅๅฒๅคฑไฟก" :visible.sync="infoDialog" width="800px" append-to-body> |
| 145 | 144 | <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border> |
| 146 | 145 | <el-table-column label="ๅบๅท" align="center" prop="id" /> |
| 147 | - <el-table-column label="ๅคฑไฟกๆถ้ด" align="center" prop="time" width="180" v-if="queryParams.status==0"> | |
| 148 | - <template slot-scope="scope"> | |
| 149 | - <span>{{ parseTime(scope.row.time, '{y}-{m}-{d}') }}</span> | |
| 150 | - </template> | |
| 151 | - </el-table-column> | |
| 146 | + <el-table-column label="ๅคฑไฟกๆถ้ด" align="center" prop="time" width="180" /> | |
| 152 | 147 | <el-table-column label="ๆ ๅต่ฏดๆ" align="center" prop="reason" /> |
| 153 | 148 | <el-table-column label="ๆไฝๅๅฒ" align="center" prop="lostCredit"> |
| 154 | 149 | <template slot-scope="scope"> |
| 155 | - <span>{{ scope.row.lostCredit== 0 ? "ๆค้ๅคฑไฟก" : scope.row.lostCredit == 1 ? "ๅคฑไฟก" : "ไฟๅฏ" }}</span> | |
| 150 | + <span>{{ scope.row.lostCredit== 0 ? "ๆค้ๅคฑไฟก" : "ๅคฑไฟก" }}</span> | |
| 156 | 151 | </template> |
| 157 | 152 | </el-table-column> |
| 158 | 153 | </el-table> |
| ... | ... | @@ -172,7 +167,7 @@ |
| 172 | 167 | getTypes, |
| 173 | 168 | getPlaces, |
| 174 | 169 | historyCredit |
| 175 | - } from "@/api/business/credit"; | |
| 170 | + } from "@/api/business/constructionsites"; | |
| 176 | 171 | |
| 177 | 172 | import { |
| 178 | 173 | constructionsitesList, |
| ... | ... | @@ -272,6 +267,7 @@ |
| 272 | 267 | 'creditStatus': 0 |
| 273 | 268 | }; |
| 274 | 269 | |
| 270 | + | |
| 275 | 271 | constructionsitesList(query).then(response => { |
| 276 | 272 | this.constructionList = response.result.list |
| 277 | 273 | }); |
| ... | ... | @@ -324,7 +320,7 @@ |
| 324 | 320 | }, |
| 325 | 321 | getHistoryData() { |
| 326 | 322 | this.queryParams.status = 1; |
| 327 | - this.getList(); | |
| 323 | + this.init(); | |
| 328 | 324 | }, |
| 329 | 325 | colStyle(obj) { |
| 330 | 326 | if (obj.column.property == "id") { | ... | ... |
trash-ui/src/views/business/DriverCredit/index.vue
| ... | ... | @@ -2,10 +2,10 @@ |
| 2 | 2 | <div class="app-container"> |
| 3 | 3 | <el-row :gutter="10" class="mb8"> |
| 4 | 4 | <el-col :span="1.5"> |
| 5 | - <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.status==0}" size="mini" @click="getData(1);" >ๅคฑไฟกๅทฅๅฐ</el-button> | |
| 5 | + <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.status==0}" size="mini" @click="getData(1);" >ๅคฑไฟก้ฉพ้ฉถๅ</el-button> | |
| 6 | 6 | </el-col> |
| 7 | 7 | <el-col :span="1.5"> |
| 8 | - <el-button :class="{'el-button':true,'el-button--primary':this.queryParams.status==1}" size="mini" @click="getHistoryData(1);">ๅๅฒๅคฑไฟกๅทฅๅฐ</el-button> | |
| 8 | + <el-button :class="{'el-button':true,'el-button--primary':this.queryParams.status==1}" size="mini" @click="getHistoryData(1);">ๅๅฒ้ฉพ้ฉถๅ</el-button> | |
| 9 | 9 | </el-col> |
| 10 | 10 | </el-row> |
| 11 | 11 | |
| ... | ... | @@ -89,28 +89,17 @@ |
| 89 | 89 | reserve-keyword |
| 90 | 90 | placeholder="้ฉพ้ฉถๅๅงๅ"> |
| 91 | 91 | <el-option |
| 92 | - @click.native="getObjId(item.id)" | |
| 93 | - v-for="item in names" | |
| 94 | - :key="item.value" | |
| 95 | - :label="item.label" | |
| 96 | - :value="item.label"> | |
| 92 | + @click.native="getObjId(item)" | |
| 93 | + v-for="item in driverList" | |
| 94 | + :key="item.id" | |
| 95 | + :label="item.name" | |
| 96 | + :value="item.name"> | |
| 97 | 97 | </el-option> |
| 98 | 98 | </el-select> |
| 99 | 99 | </el-form-item> |
| 100 | 100 | |
| 101 | 101 | <el-form-item label="่ฏไปถๅท็ " prop="idNumber"> |
| 102 | - <el-select | |
| 103 | - v-model="form.idNumber" | |
| 104 | - filterable | |
| 105 | - reserve-keyword | |
| 106 | - placeholder="่ฏไปถๅท็ "> | |
| 107 | - <el-option | |
| 108 | - v-for="item in idNumbers" | |
| 109 | - :key="item.id" | |
| 110 | - :label="item.label" | |
| 111 | - :value="item.value"> | |
| 112 | - </el-option> | |
| 113 | - </el-select> | |
| 102 | + <el-input v-model="form.idNumber" placeholder="่ฏไปถๅท็ " disabled/> | |
| 114 | 103 | </el-form-item> |
| 115 | 104 | <el-form-item label="ๅคฑไฟกๅๅ " prop="reason"> |
| 116 | 105 | <el-input v-model="form.reason" placeholder="ๅคฑไฟกๅๅ " /> |
| ... | ... | @@ -140,7 +129,7 @@ |
| 140 | 129 | <el-dialog title="ๅๅฒๅคฑไฟก" :visible.sync="infoDialog" width="800px" append-to-body> |
| 141 | 130 | <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border> |
| 142 | 131 | <el-table-column label="ๅบๅท" align="center" prop="id" /> |
| 143 | - <el-table-column label="ๅคฑไฟกๆถ้ด" align="center" prop="time" width="180" v-if="queryParams.status==0"> | |
| 132 | + <el-table-column label="ๅคฑไฟกๆถ้ด" align="center" prop="time" width="180"> | |
| 144 | 133 | <template slot-scope="scope"> |
| 145 | 134 | <span>{{ parseTime(scope.row.time, '{y}-{m}-{d}') }}</span> |
| 146 | 135 | </template> |
| ... | ... | @@ -148,7 +137,7 @@ |
| 148 | 137 | <el-table-column label="ๆ ๅต่ฏดๆ" align="center" prop="reason" /> |
| 149 | 138 | <el-table-column label="ๆไฝๅๅฒ" align="center" prop="lostCredit"> |
| 150 | 139 | <template slot-scope="scope"> |
| 151 | - <span>{{ scope.row.lostCredit== 0 ? "ๆค้ๅคฑไฟก" : scope.row.lostCredit == 1 ? "ๅคฑไฟก" : "ไฟๅฏ" }}</span> | |
| 140 | + <span>{{ scope.row.lostCredit== 0 ? "ๆค้ๅคฑไฟก" : "ๅคฑไฟก" }}</span> | |
| 152 | 141 | </template> |
| 153 | 142 | </el-table-column> |
| 154 | 143 | </el-table> |
| ... | ... | @@ -166,10 +155,11 @@ import { |
| 166 | 155 | exportCredit, |
| 167 | 156 | getNames, |
| 168 | 157 | historyCredit |
| 169 | -} from "@/api/business/credit4"; | |
| 158 | +} from "@/api/business/driver"; | |
| 170 | 159 | |
| 171 | 160 | import { |
| 172 | - constructionsitesList | |
| 161 | + companyList, | |
| 162 | + driverList | |
| 173 | 163 | } from "@/api/dict"; |
| 174 | 164 | |
| 175 | 165 | export default { |
| ... | ... | @@ -195,21 +185,10 @@ export default { |
| 195 | 185 | dictNames:[], |
| 196 | 186 | dictTypes:[], |
| 197 | 187 | dictPlaces:[], |
| 198 | - names:[{label:"ๅผ ไธ",value:"ๅผ ไธ",id:"a"}, | |
| 199 | - {label:"ๆๅ",value:"ๆๅ",id:"B"}, | |
| 200 | - {label:"็ไบ",value:"็ไบ",id:"C"}, | |
| 201 | - {label:"่ตตๅ ญ",value:"่ตตๅ ญ",id:"D"}, | |
| 202 | - {label:"็ไธ",value:"็ไธ",id:"E"}], | |
| 203 | - idNumbers:[{label:"124547845124545698",value:"124547845124545698",id:"a"}, | |
| 204 | - {label:"124547845124545698",value:"124547845124545698",id:"B"}, | |
| 205 | - {label:"124547845124545698",value:"124547845124545698",id:"C"}, | |
| 206 | - {label:"124547845124545698",value:"124547845124545698",id:"D"}, | |
| 207 | - {label:"124547845124545698",value:"124547845124545698",id:"E"}], | |
| 208 | - places:[{label:"ๅทฅๅฐA",value:"ๅทฅๅฐA",id:"a"}, | |
| 209 | - {label:"ๅทฅๅฐB",value:"ๅทฅๅฐB",id:"B"}, | |
| 210 | - {label:"ๅทฅๅฐC",value:"ๅทฅๅฐC",id:"C"}, | |
| 211 | - {label:"ๅทฅๅฐD",value:"ๅทฅๅฐD",id:"D"}, | |
| 212 | - {label:"ๅทฅๅฐE",value:"ๅทฅๅฐE",id:"E"}], | |
| 188 | + driverList:[], | |
| 189 | + names:[], | |
| 190 | + idNumbers:[], | |
| 191 | + places:[], | |
| 213 | 192 | // ๅผนๅบๅฑๆ ้ข |
| 214 | 193 | title: "", |
| 215 | 194 | // ๆฏๅฆๆพ็คบๅผนๅบๅฑ |
| ... | ... | @@ -242,20 +221,39 @@ export default { |
| 242 | 221 | }; |
| 243 | 222 | }, |
| 244 | 223 | created() { |
| 245 | - this.getList(); | |
| 246 | - this.getNamesData(); | |
| 247 | - | |
| 248 | - let query = { | |
| 249 | - 'page':1, | |
| 250 | - 'size':9999, | |
| 251 | - 'creditStatus':0 | |
| 252 | - } | |
| 253 | - | |
| 254 | - constructionsitesList(query).then(response => { | |
| 255 | - console.log(response); | |
| 256 | - }); | |
| 224 | + this.init(); | |
| 257 | 225 | }, |
| 258 | 226 | methods: { |
| 227 | + init(){ | |
| 228 | + this.getList(); | |
| 229 | + this.getNamesData(); | |
| 230 | + | |
| 231 | + let query = { | |
| 232 | + 'page':1, | |
| 233 | + 'size':9999, | |
| 234 | + 'creditStatus':0 | |
| 235 | + } | |
| 236 | + | |
| 237 | + companyList(query).then(response => { | |
| 238 | + | |
| 239 | + let companys = response.result.list; | |
| 240 | + | |
| 241 | + let ids = []; | |
| 242 | + | |
| 243 | + for(let i = 0 ;i<companys.length;i++){ | |
| 244 | + ids.push(companys[i].id); | |
| 245 | + } | |
| 246 | + query.companyIds = ids + ""; | |
| 247 | + query.status = 3; | |
| 248 | + | |
| 249 | + driverList(query).then(res=>{ | |
| 250 | + | |
| 251 | + this.driverList = res.result; | |
| 252 | + | |
| 253 | + }); | |
| 254 | + | |
| 255 | + }); | |
| 256 | + }, | |
| 259 | 257 | getDataInfo(row){ |
| 260 | 258 | let param ={"objectId":row.objectId} |
| 261 | 259 | listCredit(param).then(response => { |
| ... | ... | @@ -276,7 +274,7 @@ export default { |
| 276 | 274 | }, |
| 277 | 275 | getHistoryData(){ |
| 278 | 276 | this.queryParams.status=1; |
| 279 | - this.getList(); | |
| 277 | + this.init(); | |
| 280 | 278 | }, |
| 281 | 279 | colStyle(obj){ |
| 282 | 280 | if(obj.column.property == "id"){ |
| ... | ... | @@ -284,7 +282,11 @@ export default { |
| 284 | 282 | } |
| 285 | 283 | }, |
| 286 | 284 | getObjId(a){ |
| 287 | - this.form.objectId = a; | |
| 285 | + this.form.objectId = a.id; | |
| 286 | + if(a.identityNo) | |
| 287 | + this.form.idNumber = a.identityNo; | |
| 288 | + else | |
| 289 | + this.form.idNumber = a.phoneNo ; | |
| 288 | 290 | }, |
| 289 | 291 | getList() { |
| 290 | 292 | this.loading = true; | ... | ... |
trash-ui/src/views/business/EarthSitesCredit/index.vue
| ... | ... | @@ -2,29 +2,22 @@ |
| 2 | 2 | <div class="app-container"> |
| 3 | 3 | <el-row :gutter="10" class="mb8"> |
| 4 | 4 | <el-col :span="1.5"> |
| 5 | - <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.status==0}" size="mini" @click="getData(1);" >ๅคฑไฟกๆถ็บณๅบ</el-button> | |
| 5 | + <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.status==0}" size="mini" | |
| 6 | + @click="getData(1);">ๅคฑไฟกๆถ็บณๅบ</el-button> | |
| 6 | 7 | </el-col> |
| 7 | 8 | <el-col :span="1.5"> |
| 8 | - <el-button :class="{'el-button':true,'el-button--primary':this.queryParams.status==1}" size="mini" @click="getHistoryData(1);">ๅๅฒๅคฑไฟกๆถ็บณๅบ</el-button> | |
| 9 | + <el-button :class="{'el-button':true,'el-button--primary':this.queryParams.status==1}" size="mini" | |
| 10 | + @click="getHistoryData(1);">ๅๅฒๅคฑไฟกๆถ็บณๅบ</el-button> | |
| 9 | 11 | </el-col> |
| 10 | 12 | </el-row> |
| 11 | 13 | |
| 12 | 14 | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"> |
| 13 | 15 | <el-row type="flex" justify="center"> |
| 14 | 16 | <el-col> |
| 15 | - <el-form-item label="ๆถ็บณๅบๅ็งฐ" prop="name" | |
| 16 | - style="float:right;"> | |
| 17 | - <el-select v-model="queryParams.name" | |
| 18 | - filterable | |
| 19 | - clearable | |
| 20 | - reserve-keyword | |
| 21 | - placeholder="ๆถ็บณๅบๅ็งฐ" | |
| 22 | - size="small" | |
| 23 | - :loading="loading"> | |
| 24 | - <el-option | |
| 25 | - v-for="item in dictNames" | |
| 26 | - :label="item" | |
| 27 | - :value="item"> | |
| 17 | + <el-form-item label="ๆถ็บณๅบๅ็งฐ" prop="name" style="float:right;"> | |
| 18 | + <el-select v-model="queryParams.name" filterable clearable reserve-keyword placeholder="ๆถ็บณๅบๅ็งฐ" size="small" | |
| 19 | + :loading="loading"> | |
| 20 | + <el-option v-for="item in dictNames" :label="item" :value="item" :key="item"> | |
| 28 | 21 | </el-option> |
| 29 | 22 | </el-select> |
| 30 | 23 | </el-form-item> |
| ... | ... | @@ -32,30 +25,32 @@ |
| 32 | 25 | |
| 33 | 26 | <el-col> |
| 34 | 27 | <el-form-item label="ๆๅฑๅบๅฐ" prop="place"> |
| 35 | - <el-select v-model="queryParams.place" placeholder="ๆๅฑๅบๅฐ" clearable size="small"> | |
| 36 | - <el-option label="่ฏท้ๆฉๅญๅ ธ็ๆ" value="" /> | |
| 28 | + <el-select v-model="queryParams.place" filterable clearable reserve-keyword placeholder="ๆๅฑๅบๅฐ" size="small" | |
| 29 | + :loading="loading"> | |
| 30 | + <el-option v-for="item in dictPlaces" :label="item" :value="item" :key="item"> | |
| 31 | + </el-option> | |
| 37 | 32 | </el-select> |
| 38 | 33 | </el-form-item> |
| 39 | 34 | </el-col> |
| 40 | 35 | </el-row> |
| 41 | 36 | <el-row type="flex" justify="center"> |
| 42 | 37 | <el-col> |
| 43 | - <el-form-item label="ๆถ็บณๅบ็ฑปๅ" prop="type" | |
| 44 | - style="float:right;"> | |
| 45 | - <el-select v-model="queryParams.type" placeholder="ๅปบ็ญๅๅพ็ฑปๅ" clearable size="small"> | |
| 46 | - <el-option label="่ฏท้ๆฉๅญๅ ธ็ๆ" value="" /> | |
| 38 | + <el-form-item label="ๅๅพ็ฑปๅ" prop="type" style="float:right;"> | |
| 39 | + <el-select v-model="queryParams.type" filterable clearable reserve-keyword placeholder="ๅปบ็ญๅๅพ็ฑปๅ" size="small" | |
| 40 | + :loading="loading"> | |
| 41 | + <el-option v-for="item in dictTypes" :label="item" :value="item" :key="item"> | |
| 42 | + </el-option> | |
| 47 | 43 | </el-select> |
| 48 | 44 | </el-form-item> |
| 49 | - | |
| 50 | - </el-col><el-col> | |
| 51 | - <el-form-item label="ๅคฑไฟกๆฅๆ" prop="time" v-show="queryParams.status==0"> | |
| 52 | - <el-date-picker clearable size="small" style="width: 200px" v-model="queryParams.time" type="date" | |
| 53 | - value-format="yyyy-MM-dd" placeholder="ๅคฑไฟกๆฅๆ"> | |
| 54 | - </el-date-picker> | |
| 55 | - </el-form-item> | |
| 56 | - </el-col> | |
| 45 | + </el-col> | |
| 46 | + <el-col> | |
| 47 | + <el-form-item label="ๅคฑไฟกๆฅๆ" prop="time" v-show="queryParams.status==0"> | |
| 48 | + <el-date-picker clearable size="small" style="width: 200px" v-model="queryParams.time" type="date" | |
| 49 | + value-format="yyyy-MM-dd" placeholder="ๅคฑไฟกๆฅๆ"> | |
| 50 | + </el-date-picker> | |
| 51 | + </el-form-item> | |
| 52 | + </el-col> | |
| 57 | 53 | </el-row> |
| 58 | - | |
| 59 | 54 | </el-form> |
| 60 | 55 | |
| 61 | 56 | <el-row :gutter="10" class="mb8"> |
| ... | ... | @@ -107,42 +102,22 @@ |
| 107 | 102 | reserve-keyword |
| 108 | 103 | placeholder="ๆถ็บณๅบๅ็งฐ"> |
| 109 | 104 | <el-option |
| 110 | - @click.native="getObjId(item.id)" | |
| 111 | - v-for="item in names" | |
| 112 | - :key="item.value" | |
| 113 | - :label="item.label" | |
| 114 | - :value="item.label"> | |
| 105 | + @click.native="getObjId(item)" | |
| 106 | + v-for="item in earthsitesList" | |
| 107 | + :key="item.id" | |
| 108 | + :label="item.name" | |
| 109 | + :value="item.name" | |
| 110 | + v-if="item.creditStatus==0"> | |
| 115 | 111 | </el-option> |
| 116 | 112 | </el-select> |
| 117 | 113 | </el-form-item> |
| 118 | 114 | |
| 119 | 115 | <el-form-item label="ๆถ็บณๅบ็ฑปๅ" prop="type"> |
| 120 | - <el-select | |
| 121 | - v-model="form.type" | |
| 122 | - filterable | |
| 123 | - reserve-keyword | |
| 124 | - placeholder="ๆถ็บณๅบ็ฑปๅ"> | |
| 125 | - <el-option | |
| 126 | - v-for="item in types" | |
| 127 | - :key="item.id" | |
| 128 | - :label="item.label" | |
| 129 | - :value="item.value"> | |
| 130 | - </el-option> | |
| 131 | - </el-select> | |
| 116 | + | |
| 117 | + <el-input v-model="form.type" disabled/> | |
| 132 | 118 | </el-form-item> |
| 133 | 119 | <el-form-item label="ๆๅฑๅบๅ" prop="place"> |
| 134 | - <el-select | |
| 135 | - v-model="form.place" | |
| 136 | - filterable | |
| 137 | - reserve-keyword | |
| 138 | - placeholder="ๆๅฑๅบๅ"> | |
| 139 | - <el-option | |
| 140 | - v-for="item in places" | |
| 141 | - :key="item.id" | |
| 142 | - :label="item.label" | |
| 143 | - :value="item.value"> | |
| 144 | - </el-option> | |
| 145 | - </el-select> | |
| 120 | + <el-input v-model="form.place" disabled/> | |
| 146 | 121 | </el-form-item> |
| 147 | 122 | <el-form-item label="ๅคฑไฟกๅๅ " prop="reason"> |
| 148 | 123 | <el-input v-model="form.reason" placeholder="ๅคฑไฟกๅๅ " /> |
| ... | ... | @@ -172,15 +147,11 @@ |
| 172 | 147 | <el-dialog title="ๅๅฒๅคฑไฟก" :visible.sync="infoDialog" width="800px" append-to-body> |
| 173 | 148 | <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border> |
| 174 | 149 | <el-table-column label="ๅบๅท" align="center" prop="id" /> |
| 175 | - <el-table-column label="ๅคฑไฟกๆถ้ด" align="center" prop="time" width="180" v-if="queryParams.status==0"> | |
| 176 | - <template slot-scope="scope"> | |
| 177 | - <span>{{ parseTime(scope.row.time, '{y}-{m}-{d}') }}</span> | |
| 178 | - </template> | |
| 179 | - </el-table-column> | |
| 150 | + <el-table-column label="ๅคฑไฟกๆถ้ด" align="center" prop="time" width="180" /> | |
| 180 | 151 | <el-table-column label="ๆ ๅต่ฏดๆ" align="center" prop="reason" /> |
| 181 | 152 | <el-table-column label="ๆไฝๅๅฒ" align="center" prop="lostCredit"> |
| 182 | 153 | <template slot-scope="scope"> |
| 183 | - <span>{{ scope.row.lostCredit== 0 ? "ๆค้ๅคฑไฟก" : scope.row.lostCredit == 1 ? "ๅคฑไฟก" : "ไฟๅฏ" }}</span> | |
| 154 | + <span>{{ scope.row.lostCredit== 0 ? "ๆค้ๅคฑไฟก" : "ๅคฑไฟก" }}</span> | |
| 184 | 155 | </template> |
| 185 | 156 | </el-table-column> |
| 186 | 157 | </el-table> |
| ... | ... | @@ -197,15 +168,20 @@ import { |
| 197 | 168 | updateCredit, |
| 198 | 169 | exportCredit, |
| 199 | 170 | getNames, |
| 171 | + getTypes, | |
| 172 | + getPlaces, | |
| 200 | 173 | historyCredit |
| 201 | -} from "@/api/business/credit1"; | |
| 174 | +} from "@/api/business/earthsites"; | |
| 202 | 175 | |
| 203 | 176 | import { |
| 204 | - constructionsitesList | |
| 177 | + earthsitesList, | |
| 178 | + updateEarthsites | |
| 205 | 179 | } from "@/api/dict"; |
| 206 | 180 | |
| 181 | +import requestRemote from '@/utils/requestRemote' | |
| 182 | + | |
| 207 | 183 | export default { |
| 208 | - name: "ConstructionCredit", | |
| 184 | + name: "EarthSitesCredit", | |
| 209 | 185 | data() { |
| 210 | 186 | return { |
| 211 | 187 | // ้ฎ็ฝฉๅฑ |
| ... | ... | @@ -224,24 +200,11 @@ export default { |
| 224 | 200 | // ๅทฅๅฐ่กจๆ ผๆฐๆฎ |
| 225 | 201 | creditList: [], |
| 226 | 202 | creditListInfo: [], |
| 203 | + earthsitesList:[], | |
| 227 | 204 | dictNames:[], |
| 228 | 205 | dictTypes:[], |
| 229 | 206 | dictPlaces:[], |
| 230 | - names:[{label:"ๆถ็บณๅบA",value:"ๆถ็บณๅบA",id:"a"}, | |
| 231 | - {label:"ๆถ็บณๅบB",value:"ๆถ็บณๅบB",id:"B"}, | |
| 232 | - {label:"ๆถ็บณๅบC",value:"ๆถ็บณๅบC",id:"C"}, | |
| 233 | - {label:"ๆถ็บณๅบD",value:"ๆถ็บณๅบD",id:"D"}, | |
| 234 | - {label:"ๆถ็บณๅบE",value:"ๆถ็บณๅบE",id:"E"}], | |
| 235 | - types:[{label:"ๆถ็บณๅบA",value:"ๆถ็บณๅบA",id:"a"}, | |
| 236 | - {label:"ๆถ็บณๅบB",value:"ๆถ็บณๅบB",id:"B"}, | |
| 237 | - {label:"ๆถ็บณๅบC",value:"ๆถ็บณๅบC",id:"C"}, | |
| 238 | - {label:"ๆถ็บณๅบD",value:"ๆถ็บณๅบD",id:"D"}, | |
| 239 | - {label:"ๆถ็บณๅบE",value:"ๆถ็บณๅบE",id:"E"}], | |
| 240 | - places:[{label:"ๆถ็บณๅบA",value:"ๆถ็บณๅบA",id:"a"}, | |
| 241 | - {label:"ๆถ็บณๅบB",value:"ๆถ็บณๅบB",id:"B"}, | |
| 242 | - {label:"ๆถ็บณๅบC",value:"ๆถ็บณๅบC",id:"C"}, | |
| 243 | - {label:"ๆถ็บณๅบD",value:"ๆถ็บณๅบD",id:"D"}, | |
| 244 | - {label:"ๆถ็บณๅบE",value:"ๆถ็บณๅบE",id:"E"}], | |
| 207 | + names:[], | |
| 245 | 208 | // ๅผนๅบๅฑๆ ้ข |
| 246 | 209 | title: "", |
| 247 | 210 | // ๆฏๅฆๆพ็คบๅผนๅบๅฑ |
| ... | ... | @@ -277,20 +240,33 @@ export default { |
| 277 | 240 | }; |
| 278 | 241 | }, |
| 279 | 242 | created() { |
| 280 | - this.getList(); | |
| 281 | - this.getNamesData(); | |
| 282 | - | |
| 283 | - let query = { | |
| 284 | - 'page':1, | |
| 285 | - 'size':9999, | |
| 286 | - 'creditStatus':0 | |
| 287 | - } | |
| 288 | - | |
| 289 | - constructionsitesList(query).then(response => { | |
| 290 | - console.log(response); | |
| 291 | - }); | |
| 243 | + this.init(); | |
| 292 | 244 | }, |
| 293 | 245 | methods: { |
| 246 | + init(){ | |
| 247 | + this.getList(); | |
| 248 | + this.getNamesData(); | |
| 249 | + this.getTypesData(); | |
| 250 | + this.getPlacesData(); | |
| 251 | + | |
| 252 | + let query = { | |
| 253 | + 'page': 1, | |
| 254 | + 'size': 9999, | |
| 255 | + 'creditStatus': 0 | |
| 256 | + }; | |
| 257 | + | |
| 258 | + // requestRemote({ | |
| 259 | + // url: '/api/siteservice/cs/earthsites/list', | |
| 260 | + // method: 'post', | |
| 261 | + // data: query | |
| 262 | + // }).then(response => { | |
| 263 | + // this.creditList = response.result.list | |
| 264 | + // }); | |
| 265 | + | |
| 266 | + earthsitesList(query).then(response => { | |
| 267 | + this.earthsitesList = response.result.list | |
| 268 | + }); | |
| 269 | + }, | |
| 294 | 270 | getDataInfo(row){ |
| 295 | 271 | let param ={"objectId":row.objectId} |
| 296 | 272 | listCredit(param).then(response => { |
| ... | ... | @@ -304,6 +280,16 @@ export default { |
| 304 | 280 | this.dictNames = response; |
| 305 | 281 | }); |
| 306 | 282 | }, |
| 283 | + getTypesData() { | |
| 284 | + getTypes(this.queryParams).then(response => { | |
| 285 | + this.dictTypes = response; | |
| 286 | + }); | |
| 287 | + }, | |
| 288 | + getPlacesData() { | |
| 289 | + getPlaces(this.queryParams).then(response => { | |
| 290 | + this.dictPlaces = response; | |
| 291 | + }); | |
| 292 | + }, | |
| 307 | 293 | getData(stauts){ |
| 308 | 294 | this.queryParams.status=0; |
| 309 | 295 | this.queryParams.lostCredit=stauts; |
| ... | ... | @@ -311,7 +297,7 @@ export default { |
| 311 | 297 | }, |
| 312 | 298 | getHistoryData(){ |
| 313 | 299 | this.queryParams.status=1; |
| 314 | - this.getList(); | |
| 300 | + this.init(); | |
| 315 | 301 | }, |
| 316 | 302 | colStyle(obj){ |
| 317 | 303 | if(obj.column.property == "id"){ |
| ... | ... | @@ -319,7 +305,9 @@ export default { |
| 319 | 305 | } |
| 320 | 306 | }, |
| 321 | 307 | getObjId(a){ |
| 322 | - this.form.objectId = a; | |
| 308 | + this.form.objectId = a.id; | |
| 309 | + this.form.place = a.areaName; | |
| 310 | + this.form.type = a.typeName; | |
| 323 | 311 | }, |
| 324 | 312 | getList() { |
| 325 | 313 | this.loading = true; |
| ... | ... | @@ -396,20 +384,29 @@ export default { |
| 396 | 384 | this.$refs["form"].validate(valid => { |
| 397 | 385 | if (valid) { |
| 398 | 386 | if (this.form.id != null) { |
| 399 | - this.updateForm.id = this.form.id; | |
| 400 | - updateCredit(this.updateForm).then(response => { | |
| 401 | - this.msgSuccess("ๆค้ๆๅ"); | |
| 402 | - this.isEdit = false; | |
| 403 | - this.getList(); | |
| 387 | + this.form.lostCredit = 0; | |
| 388 | + let data = [{creditStatus:this.form.lostCredit,objectId:this.form.objectId}]; | |
| 389 | + updateEarthsites(data).then(res=>{ | |
| 390 | + this.updateForm.id = this.form.id; | |
| 391 | + updateCredit(this.updateForm).then(response => { | |
| 392 | + this.msgSuccess("ๆค้ๆๅ"); | |
| 393 | + this.isEdit = false; | |
| 394 | + | |
| 395 | + this.init(); | |
| 396 | + }); | |
| 404 | 397 | }); |
| 405 | 398 | } else { |
| 406 | 399 | this.form.lostCredit = 1; |
| 407 | - addCredit(this.form).then(response => { | |
| 408 | - this.msgSuccess("ๆฐๅขๆๅ"); | |
| 409 | - this.open = false; | |
| 410 | - this.getList(); | |
| 411 | - this.getNamesData(); | |
| 400 | + let data = [{creditStatus:this.form.lostCredit,objectId:this.form.objectId}]; | |
| 401 | + updateEarthsites(data).then(res=>{ | |
| 402 | + addCredit(this.form).then(response => { | |
| 403 | + this.msgSuccess("ๆฐๅขๆๅ"); | |
| 404 | + this.open = false; | |
| 405 | + | |
| 406 | + this.init(); | |
| 407 | + }); | |
| 412 | 408 | }); |
| 409 | + | |
| 413 | 410 | } |
| 414 | 411 | } |
| 415 | 412 | }); | ... | ... |
trash-ui/src/views/business/TruckCredit/index.vue
| ... | ... | @@ -2,73 +2,71 @@ |
| 2 | 2 | <div class="app-container"> |
| 3 | 3 | <el-row :gutter="10" class="mb8"> |
| 4 | 4 | <el-col :span="1.5"> |
| 5 | - <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.status==0}" size="mini" @click="getData(1);" >ๅคฑไฟก่ฝฆ่พ</el-button> | |
| 5 | + <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.status==0}" size="mini" | |
| 6 | + @click="getData(1);">ๅคฑไฟก่ฝฆ่พ</el-button> | |
| 6 | 7 | </el-col> |
| 7 | 8 | <el-col :span="1.5"> |
| 8 | - <el-button :class="{'el-button':true,'el-button--primary':this.queryParams.status==1}" size="mini" @click="getHistoryData(1);">ๅๅฒๅคฑไฟก่ฝฆ่พ</el-button> | |
| 9 | + <el-button :class="{'el-button':true,'el-button--primary':this.queryParams.status==1}" size="mini" | |
| 10 | + @click="getHistoryData(1);">ๅๅฒๅคฑไฟก่ฝฆ่พ</el-button> | |
| 9 | 11 | </el-col> |
| 10 | 12 | </el-row> |
| 11 | 13 | |
| 12 | 14 | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"> |
| 13 | - <el-row type="flex" justify="center"> | |
| 14 | - <el-col> | |
| 15 | - <el-form-item label="่ฝฆ็ๅท็ " prop="licensePlate" | |
| 16 | - style="float:right;"> | |
| 17 | - <el-select v-model="queryParams.licensePlate" | |
| 18 | - filterable | |
| 19 | - reserve-keyword | |
| 20 | - placeholder="่ฝฆ็ๅท็ " | |
| 21 | - clearable | |
| 22 | - size="small" | |
| 23 | - :loading="loading"> | |
| 24 | - <el-option | |
| 25 | - v-for="item in dictNames" | |
| 26 | - :label="item" | |
| 27 | - :value="item"> | |
| 28 | - </el-option> | |
| 29 | - </el-select> | |
| 30 | - </el-form-item> | |
| 31 | - </el-col> | |
| 15 | + <el-row type="flex" justify="center"> | |
| 16 | + <el-col> | |
| 17 | + <el-form-item label="่ฝฆ็ๅท็ " prop="licensePlate" style="float:right;"> | |
| 18 | + <el-select v-model="queryParams.licensePlate" filterable reserve-keyword placeholder="่ฝฆ็ๅท็ " clearable | |
| 19 | + size="small" :loading="loading"> | |
| 20 | + <el-option v-for="item in dictNames" :label="item" :value="item"> | |
| 21 | + </el-option> | |
| 22 | + </el-select> | |
| 23 | + </el-form-item> | |
| 24 | + </el-col> | |
| 32 | 25 | |
| 33 | - <el-col> | |
| 34 | - <el-form-item label="ไผไธ่ฟ่พ" prop="companyId"> | |
| 35 | - <el-select v-model="queryParams.companyId" placeholder="ไผไธ่ฟ่พ" clearable size="small"> | |
| 36 | - <el-option label="่ฏท้ๆฉๅญๅ ธ็ๆ" value="" /> | |
| 26 | + <el-col> | |
| 27 | + <el-form-item label="่ฟ่พไผไธ" prop="companyId"> | |
| 28 | + <el-select v-model="queryParams.companyId" filterable reserve-keyword placeholder="่ฟ่พไผไธ" clearable | |
| 29 | + size="small" :loading="loading"> | |
| 30 | + <el-option v-for="item in dictCompanys" :label="item" :value="item"> | |
| 31 | + </el-option> | |
| 37 | 32 | </el-select> |
| 38 | - </el-form-item> | |
| 39 | - </el-col> | |
| 40 | - </el-row> | |
| 41 | - <el-row type="flex" justify="center"> | |
| 42 | - <el-col> | |
| 43 | - </el-col><el-col> | |
| 33 | + </el-form-item> | |
| 34 | + </el-col> | |
| 35 | + </el-row> | |
| 36 | + <el-row type="flex" justify="center"> | |
| 37 | + <el-col> | |
| 38 | + </el-col> | |
| 39 | + <el-col> | |
| 44 | 40 | <el-form-item label="ๅคฑไฟกๆฅๆ" prop="time" v-show="queryParams.status==0"> |
| 45 | 41 | <el-date-picker clearable size="small" style="width: 200px" v-model="queryParams.time" type="date" |
| 46 | 42 | value-format="yyyy-MM-dd" placeholder="ๅคฑไฟกๆฅๆ"> |
| 47 | 43 | </el-date-picker> |
| 48 | 44 | </el-form-item> |
| 49 | - </el-col> | |
| 45 | + </el-col> | |
| 50 | 46 | </el-row> |
| 51 | 47 | |
| 52 | 48 | </el-form> |
| 53 | 49 | |
| 54 | 50 | <el-row :gutter="10" class="mb8"> |
| 55 | 51 | <el-col :span="1.5"> |
| 56 | - <el-button type="primary" size="mini" @click="handleAdd" v-hasPermi="['truck:credit:add']" v-if="queryParams.status==0">ๆฐๅข</el-button> | |
| 52 | + <el-button type="primary" size="mini" @click="handleAdd" v-hasPermi="['truck:credit:add']" | |
| 53 | + v-if="queryParams.status==0">ๆฐๅข</el-button> | |
| 57 | 54 | </el-col> |
| 58 | 55 | <el-col :span="1.5"> |
| 59 | - <el-button size="mini" @click="handleExport" v-hasPermi="['truck:credit:export']">ๅฏผๅบ</el-button> | |
| 56 | + <el-button size="mini" @click="handleExport" v-hasPermi="['truck:credit:export']">ๅฏผๅบ</el-button> | |
| 60 | 57 | </el-col> |
| 61 | 58 | |
| 62 | 59 | <el-col :span="20" style="height: 1px;"></el-col> |
| 63 | 60 | <el-col :span="1.5"> |
| 64 | - <el-button type="primary" size="mini" @click="handleQuery">ๆฅ่ฏข</el-button> | |
| 61 | + <el-button type="primary" size="mini" @click="handleQuery">ๆฅ่ฏข</el-button> | |
| 65 | 62 | </el-col> |
| 66 | 63 | <el-col :span="1.5"> |
| 67 | - <el-button size="mini" @click="resetQuery">้็ฝฎ</el-button> | |
| 64 | + <el-button size="mini" @click="resetQuery">้็ฝฎ</el-button> | |
| 68 | 65 | </el-col> |
| 69 | 66 | </el-row> |
| 70 | 67 | |
| 71 | - <el-table v-loading="loading" :data="creditList" @selection-change="handleSelectionChange" :cell-style="colStyle" border> | |
| 68 | + <el-table v-loading="loading" :data="creditList" @selection-change="handleSelectionChange" :cell-style="colStyle" | |
| 69 | + border> | |
| 72 | 70 | <el-table-column label="ๅบๅท" align="center" prop="id" /> |
| 73 | 71 | <el-table-column label="ไผไธ่ฟ่พ" align="center" prop="companyId" /> |
| 74 | 72 | <el-table-column label="่ฝฆ็ๅท็ " align="center" prop="licensePlate" /> |
| ... | ... | @@ -80,8 +78,10 @@ |
| 80 | 78 | <el-table-column label="ๅคฑไฟกๅๅ " align="center" prop="reason" /> |
| 81 | 79 | <el-table-column label="ๆไฝ" align="center" class-name="small-padding fixed-width"> |
| 82 | 80 | <template slot-scope="scope"> |
| 83 | - <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['truck:credit:edit']" v-if="queryParams.status==0">ๆค้ๅคฑไฟก</el-button> | |
| 84 | - <el-button size="mini" type="text" icon="el-icon-edit" @click="getDataInfo(scope.row)" v-if="queryParams.status==1">ๆฅ็</el-button> | |
| 81 | + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" | |
| 82 | + v-hasPermi="['truck:credit:edit']" v-if="queryParams.status==0">ๆค้ๅคฑไฟก</el-button> | |
| 83 | + <el-button size="mini" type="text" icon="el-icon-edit" @click="getDataInfo(scope.row)" | |
| 84 | + v-if="queryParams.status==1">ๆฅ็</el-button> | |
| 85 | 85 | </template> |
| 86 | 86 | </el-table-column> |
| 87 | 87 | </el-table> |
| ... | ... | @@ -90,36 +90,20 @@ |
| 90 | 90 | @pagination="getList" /> |
| 91 | 91 | |
| 92 | 92 | <!-- ๆทปๅ ๆไฟฎๆนๅทฅๅฐๅฏน่ฏๆก --> |
| 93 | - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> | |
| 93 | + <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> | |
| 94 | 94 | <el-form ref="form" :model="form" :rules="rules" label-width="120px"> |
| 95 | 95 | <el-form-item label="่ฟ่พไผไธ" prop="companyId"> |
| 96 | - <el-select | |
| 97 | - v-model="form.companyId" | |
| 98 | - filterable | |
| 99 | - reserve-keyword | |
| 100 | - placeholder="่ฟ่พไผไธ"> | |
| 101 | - <el-option | |
| 102 | - @click.native="getObjId(item.id)" | |
| 103 | - v-for="item in companyIds" | |
| 104 | - :key="item.value" | |
| 105 | - :label="item.label" | |
| 106 | - :value="item.label"> | |
| 107 | - </el-option> | |
| 108 | - </el-select> | |
| 109 | - </el-form-item> | |
| 96 | + <el-select v-model="form.companyId" filterable reserve-keyword placeholder="่ฟ่พไผไธ"> | |
| 97 | + <el-option v-for="item in companyList" :key="item.name" | |
| 98 | + :label="item.name" :value="item.name"> | |
| 99 | + </el-option> | |
| 100 | + </el-select> | |
| 101 | + </el-form-item> | |
| 110 | 102 | <el-form-item label="่ฝฆ็ๅท็ " prop="licensePlate"> |
| 111 | - <el-select | |
| 112 | - v-model="form.licensePlate" | |
| 113 | - filterable | |
| 114 | - reserve-keyword | |
| 115 | - placeholder="่ฝฆ็ๅท็ "> | |
| 116 | - <el-option | |
| 117 | - v-for="item in licensePlates" | |
| 118 | - :key="item.id" | |
| 119 | - :label="item.label" | |
| 120 | - :value="item.value"> | |
| 121 | - </el-option> | |
| 122 | - </el-select> | |
| 103 | + <el-select v-model="form.licensePlate" filterable reserve-keyword placeholder="่ฝฆ็ๅท็ "> | |
| 104 | + <el-option @click.native="getObjId(item)" v-for="item in companyList" :key="item.id" :label="item.name" :value="item.name"> | |
| 105 | + </el-option> | |
| 106 | + </el-select> | |
| 123 | 107 | </el-form-item> |
| 124 | 108 | <el-form-item label="ๅคฑไฟกๅๅ " prop="reason"> |
| 125 | 109 | <el-input v-model="form.reason" placeholder="ๅคฑไฟกๅๅ " /> |
| ... | ... | @@ -134,10 +118,10 @@ |
| 134 | 118 | </el-dialog> |
| 135 | 119 | |
| 136 | 120 | |
| 137 | - <el-dialog title="ๆค้ๅคฑไฟก" :visible.sync="isEdit" width="500px" append-to-body> | |
| 121 | + <el-dialog title="ๆค้ๅคฑไฟก" :visible.sync="isEdit" width="500px" append-to-body> | |
| 138 | 122 | <el-form ref="form" :model="updateForm" :rules="rules" label-width="120px"> |
| 139 | 123 | <el-form-item label="ๆ ๅต่ฏดๆ" prop="reason"> |
| 140 | - <el-input v-model="updateForm.reason" type="textarea" maxlength="200" show-word-limit/> | |
| 124 | + <el-input v-model="updateForm.reason" type="textarea" maxlength="200" show-word-limit /> | |
| 141 | 125 | </el-form-item> |
| 142 | 126 | </el-form> |
| 143 | 127 | <div slot="footer" class="dialog-footer"> |
| ... | ... | @@ -146,21 +130,21 @@ |
| 146 | 130 | </div> |
| 147 | 131 | </el-dialog> |
| 148 | 132 | |
| 149 | - <el-dialog title="ๅๅฒๅคฑไฟก" :visible.sync="infoDialog" width="800px" append-to-body center="true"> | |
| 150 | - <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border> | |
| 151 | - <el-table-column label="ๅบๅท" align="center" prop="id" /> | |
| 152 | - <el-table-column label="ๅคฑไฟกๆถ้ด" align="center" prop="time" width="180" v-if="queryParams.status==0"> | |
| 153 | - <template slot-scope="scope"> | |
| 154 | - <span>{{ parseTime(scope.row.time, '{y}-{m}-{d}') }}</span> | |
| 155 | - </template> | |
| 156 | - </el-table-column> | |
| 157 | - <el-table-column label="ๆ ๅต่ฏดๆ" align="center" prop="reason" /> | |
| 158 | - <el-table-column label="ๆไฝๅๅฒ" align="center" prop="lostCredit"> | |
| 159 | - <template slot-scope="scope"> | |
| 160 | - <span>{{ scope.row.lostCredit== 0 ? "ๆค้ๅคฑไฟก" : scope.row.lostCredit == 1 ? "ๅคฑไฟก" : "ไฟๅฏ" }}</span> | |
| 161 | - </template> | |
| 162 | - </el-table-column> | |
| 163 | - </el-table> | |
| 133 | + <el-dialog title="ๅๅฒๅคฑไฟก" :visible.sync="infoDialog" width="800px" append-to-body center="true"> | |
| 134 | + <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border> | |
| 135 | + <el-table-column label="ๅบๅท" align="center" prop="id" /> | |
| 136 | + <el-table-column label="ๅคฑไฟกๆถ้ด" align="center" prop="time" width="180" v-if="queryParams.status==0"> | |
| 137 | + <template slot-scope="scope"> | |
| 138 | + <span>{{ parseTime(scope.row.time, '{y}-{m}-{d}') }}</span> | |
| 139 | + </template> | |
| 140 | + </el-table-column> | |
| 141 | + <el-table-column label="ๆ ๅต่ฏดๆ" align="center" prop="reason" /> | |
| 142 | + <el-table-column label="ๆไฝๅๅฒ" align="center" prop="lostCredit"> | |
| 143 | + <template slot-scope="scope"> | |
| 144 | + <span>{{ scope.row.lostCredit== 0 ? "ๆค้ๅคฑไฟก" : scope.row.lostCredit == 1 ? "ๅคฑไฟก" : "ไฟๅฏ" }}</span> | |
| 145 | + </template> | |
| 146 | + </el-table-column> | |
| 147 | + </el-table> | |
| 164 | 148 | </el-dialog> |
| 165 | 149 | </div> |
| 166 | 150 | </template> |
| ... | ... | @@ -174,8 +158,15 @@ |
| 174 | 158 | updateCredit, |
| 175 | 159 | exportCredit, |
| 176 | 160 | getNames, |
| 161 | + getCompanys, | |
| 177 | 162 | historyCredit |
| 178 | - } from "@/api/business/credit3"; | |
| 163 | + } from "@/api/business/truck"; | |
| 164 | + | |
| 165 | + | |
| 166 | + import { | |
| 167 | + companyList, | |
| 168 | + truckList | |
| 169 | + } from "@/api/dict"; | |
| 179 | 170 | |
| 180 | 171 | export default { |
| 181 | 172 | name: "Credit", |
| ... | ... | @@ -191,37 +182,27 @@ |
| 191 | 182 | multiple: true, |
| 192 | 183 | // ๆพ็คบๆ็ดขๆกไปถ |
| 193 | 184 | showSearch: true, |
| 194 | - infoDialog :false, | |
| 185 | + infoDialog: false, | |
| 195 | 186 | // ๆปๆกๆฐ |
| 196 | 187 | total: 0, |
| 197 | 188 | // ๅทฅๅฐ่กจๆ ผๆฐๆฎ |
| 198 | 189 | creditList: [], |
| 199 | 190 | creditListInfo: [], |
| 200 | - dictNames:[], | |
| 201 | - dictTypes:[], | |
| 202 | - dictPlaces:[], | |
| 203 | - companyIds:[{label:"่ฟ่พๅ ฌๅธA",value:"1",id:"a"}, | |
| 204 | - {label:"่ฟ่พๅ ฌๅธB",value:"2",id:"B"}, | |
| 205 | - {label:"่ฟ่พๅ ฌๅธC",value:"3",id:"C"}, | |
| 206 | - {label:"่ฟ่พๅ ฌๅธD",value:"4",id:"D"}, | |
| 207 | - {label:"่ฟ่พๅ ฌๅธE",value:"5",id:"E"}], | |
| 208 | - licensePlates: | |
| 209 | - [{label:"XL:010101",value:"XL:010101",id:"a"}, | |
| 210 | - {label:"XL:010102",value:"XL:010102",id:"B"}, | |
| 211 | - {label:"XL:010103",value:"XL:010103",id:"C"}, | |
| 212 | - {label:"XL:010104",value:"XL:010104",id:"D"}, | |
| 213 | - {label:"XL:010105",value:"XL:010105",id:"E"}], | |
| 191 | + dictNames: [], | |
| 192 | + dictCompanys: [], | |
| 193 | + companyList:[], | |
| 194 | + truckList: [], | |
| 214 | 195 | // ๅผนๅบๅฑๆ ้ข |
| 215 | 196 | title: "", |
| 216 | 197 | // ๆฏๅฆๆพ็คบๅผนๅบๅฑ |
| 217 | 198 | open: false, |
| 218 | - isEdit:false, | |
| 199 | + isEdit: false, | |
| 219 | 200 | // ๆฅ่ฏขๅๆฐ |
| 220 | 201 | queryParams: { |
| 221 | 202 | pageNum: 1, |
| 222 | 203 | pageSize: 10, |
| 223 | 204 | companyId: null, |
| 224 | - licensePlate:null, | |
| 205 | + licensePlate: null, | |
| 225 | 206 | time: null, |
| 226 | 207 | reason: null, |
| 227 | 208 | status: 0, |
| ... | ... | @@ -229,28 +210,81 @@ |
| 229 | 210 | }, |
| 230 | 211 | // ่กจๅๅๆฐ |
| 231 | 212 | form: {}, |
| 232 | - updateForm:{}, | |
| 213 | + updateForm: {}, | |
| 233 | 214 | // ่กจๅๆ ก้ช |
| 234 | - rules: {companyId: [ | |
| 235 | - { required: true, message: '่ฏท้ๆฉ่ฟ่พๅ ฌๅธ', trigger: 'change' }, | |
| 236 | - ],reason: [ | |
| 237 | - { required: true, message: '่ฏทๅกซๅๅๅ ', trigger: 'blur' }, | |
| 238 | - ],licensePlate :[ | |
| 239 | - { required: true, message: '่ฏท้ๆฉ่ฝฆ่พ', trigger: 'change'} | |
| 240 | - ],time: [ | |
| 241 | - { required: true, message: '่ฏท้ๆฉๅคฑไฟกๆถ้ด', trigger: 'change' }, | |
| 242 | - ],} | |
| 215 | + rules: { | |
| 216 | + companyId: [{ | |
| 217 | + required: true, | |
| 218 | + message: '่ฏท้ๆฉ่ฟ่พๅ ฌๅธ', | |
| 219 | + trigger: 'change' | |
| 220 | + }, ], | |
| 221 | + reason: [{ | |
| 222 | + required: true, | |
| 223 | + message: '่ฏทๅกซๅๅๅ ', | |
| 224 | + trigger: 'blur' | |
| 225 | + }, ], | |
| 226 | + licensePlate: [{ | |
| 227 | + required: true, | |
| 228 | + message: '่ฏท้ๆฉ่ฝฆ่พ', | |
| 229 | + trigger: 'change' | |
| 230 | + }], | |
| 231 | + time: [{ | |
| 232 | + required: true, | |
| 233 | + message: '่ฏท้ๆฉๅคฑไฟกๆถ้ด', | |
| 234 | + trigger: 'change' | |
| 235 | + }, ], | |
| 236 | + } | |
| 243 | 237 | }; |
| 244 | 238 | }, |
| 245 | 239 | created() { |
| 246 | - this.getList(); | |
| 247 | - this.getNamesData(); | |
| 240 | + this.init(); | |
| 248 | 241 | }, |
| 249 | 242 | methods: { |
| 250 | - getDataInfo(row){ | |
| 243 | + | |
| 244 | + init() { | |
| 245 | + | |
| 246 | + this.getList(); | |
| 247 | + getNames(this.queryParams).then(response => { | |
| 248 | + this.dictNames = response; | |
| 249 | + }); | |
| 250 | + | |
| 251 | + getCompanys(this.queryParams).then(response => { | |
| 252 | + this.dictCompanys = response; | |
| 253 | + }); | |
| 254 | + | |
| 255 | + let query = { | |
| 256 | + 'page':1, | |
| 257 | + 'size':9999, | |
| 258 | + 'creditStatus':0 | |
| 259 | + } | |
| 260 | + companyList(query).then(response => { | |
| 261 | + | |
| 262 | + let companys = response.result.list; | |
| 263 | + this.companyList = companys; | |
| 264 | + let ids = []; | |
| 265 | + | |
| 266 | + for(let i = 0 ;i<companys.length;i++){ | |
| 267 | + ids.push(companys[i].id); | |
| 268 | + } | |
| 269 | + // query.companyID = ids + ""; | |
| 270 | + query.valid = 0; | |
| 271 | + | |
| 272 | + truckList(query).then(res=>{ | |
| 273 | + | |
| 274 | + this.truckList = res.result; | |
| 275 | + | |
| 276 | + }); | |
| 277 | + | |
| 278 | + }); | |
| 279 | + | |
| 280 | + | |
| 281 | + }, | |
| 282 | + getDataInfo(row) { | |
| 251 | 283 | console.log(row); |
| 252 | 284 | |
| 253 | - let param ={"objectId":row.objectId} | |
| 285 | + let param = { | |
| 286 | + "objectId": row.objectId | |
| 287 | + } | |
| 254 | 288 | |
| 255 | 289 | listCredit(param).then(response => { |
| 256 | 290 | this.creditListInfo = response.rows; |
| ... | ... | @@ -258,38 +292,35 @@ |
| 258 | 292 | }); |
| 259 | 293 | |
| 260 | 294 | }, |
| 261 | - getNamesData(){ | |
| 262 | - getNames(this.queryParams).then(response => { | |
| 263 | - this.dictNames = response; | |
| 264 | - }); | |
| 265 | - }, | |
| 266 | - getData(stauts){ | |
| 267 | - this.queryParams.status=0; | |
| 268 | - this.queryParams.lostCredit=stauts; | |
| 295 | + getData(stauts) { | |
| 296 | + this.queryParams.status = 0; | |
| 297 | + this.queryParams.lostCredit = stauts; | |
| 269 | 298 | this.getList(); |
| 270 | 299 | }, |
| 271 | - getHistoryData(){ | |
| 272 | - this.queryParams.status=1; | |
| 300 | + getHistoryData() { | |
| 301 | + this.queryParams.status = 1; | |
| 273 | 302 | this.getList(); |
| 274 | 303 | }, |
| 275 | - colStyle(obj){ | |
| 276 | - if(obj.column.property == "id"){ | |
| 277 | - return {background:"#f8f8f9"} | |
| 304 | + colStyle(obj) { | |
| 305 | + if (obj.column.property == "id") { | |
| 306 | + return { | |
| 307 | + background: "#f8f8f9" | |
| 308 | + } | |
| 278 | 309 | } |
| 279 | 310 | }, |
| 280 | - getObjId(a){ | |
| 281 | - this.form.objectId = a; | |
| 311 | + getObjId(a) { | |
| 312 | + this.form.objectId = a.id; | |
| 282 | 313 | }, |
| 283 | 314 | getList() { |
| 284 | 315 | this.loading = true; |
| 285 | - if(this.queryParams.status==0){ | |
| 316 | + if (this.queryParams.status == 0) { | |
| 286 | 317 | listCredit(this.queryParams).then(response => { |
| 287 | 318 | this.creditList = response.rows; |
| 288 | 319 | this.total = response.total; |
| 289 | 320 | this.loading = false; |
| 290 | 321 | }); |
| 291 | 322 | } |
| 292 | - if(this.queryParams.status==1){ | |
| 323 | + if (this.queryParams.status == 1) { | |
| 293 | 324 | historyCredit(this.queryParams).then(response => { |
| 294 | 325 | this.creditList = response.rows; |
| 295 | 326 | this.total = response.total; |
| ... | ... | @@ -309,7 +340,7 @@ |
| 309 | 340 | this.form = { |
| 310 | 341 | id: null, |
| 311 | 342 | companyId: null, |
| 312 | - licensePlate:null, | |
| 343 | + licensePlate: null, | |
| 313 | 344 | time: null, |
| 314 | 345 | reason: null, |
| 315 | 346 | status: null, |
| ... | ... | @@ -358,15 +389,15 @@ |
| 358 | 389 | updateCredit(this.updateForm).then(response => { |
| 359 | 390 | this.msgSuccess("ๆค้ๆๅ"); |
| 360 | 391 | this.isEdit = false; |
| 361 | - this.getList(); | |
| 392 | + this.init(); | |
| 362 | 393 | }); |
| 363 | 394 | } else { |
| 364 | 395 | this.form.lostCredit = 1; |
| 396 | + this.form.createType = 0; | |
| 365 | 397 | addCredit(this.form).then(response => { |
| 366 | 398 | this.msgSuccess("ๆฐๅขๆๅ"); |
| 367 | 399 | this.open = false; |
| 368 | - this.getList(); | |
| 369 | - this.getNamesData(); | |
| 400 | + this.init(); | |
| 370 | 401 | }); |
| 371 | 402 | } |
| 372 | 403 | } | ... | ... |
trash-ui/src/views/business/dayWorkReport/index.vue
0 โ 100644
| 1 | +<template> | |
| 2 | + <div class="app-container"> | |
| 3 | + | |
| 4 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> | |
| 5 | + <el-form-item label="้กน็ฎๅ็งฐ" prop="name"> | |
| 6 | + <el-input v-model="queryParams.name" placeholder="่ฏท่พๅ ฅ้กน็ฎๅ็งฐ" clearable size="small" | |
| 7 | + @keyup.enter.native="handleQuery" /> | |
| 8 | + </el-form-item> | |
| 9 | + <el-form-item label="้กน็ฎ็ฑปๅ" prop="type"> | |
| 10 | + <el-select v-model="queryParams.type" placeholder="่ฏท้ๆฉ้กน็ฎ็ฑปๅ " clearable size="small"> | |
| 11 | + <el-option label="ๅทฅๅฐ" value="0" /> | |
| 12 | + <el-option label="ๆถ็บณๅบ" value="1" /> | |
| 13 | + </el-select> | |
| 14 | + </el-form-item> | |
| 15 | + <el-form-item label="ๆๅฑๅบๅ" prop="place"> | |
| 16 | + <el-select v-model="queryParams.place" placeholder="่ฏท้ๆฉๆๅฑๅบๅ " clearable size="small"> | |
| 17 | + <el-option label="ๅทฅๅฐ" value="0" /> | |
| 18 | + <el-option label="ๆถ็บณๅบ" value="1" /> | |
| 19 | + </el-select> | |
| 20 | + </el-form-item> | |
| 21 | + <el-form-item> | |
| 22 | + <el-button type="primary" size="mini" @click="handleQuery">ๆ็ดข</el-button> | |
| 23 | + <el-button size="mini" @click="resetQuery">้็ฝฎ</el-button> | |
| 24 | + </el-form-item> | |
| 25 | + </el-form> | |
| 26 | + | |
| 27 | + <el-row :gutter="10" class="mb8"> | |
| 28 | + <el-col :span="1.5"> | |
| 29 | + <el-button size="mini" @click="handleExport" v-hasPermi="['business:threestep:export']">ๅฏผๅบ</el-button> | |
| 30 | + </el-col> | |
| 31 | + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | |
| 32 | + </el-row> | |
| 33 | + | |
| 34 | + <el-table v-loading="loading" :data="threestepList" @selection-change="handleSelectionChange"> | |
| 35 | + <el-table-column label="ๅบๅท" align="center" prop="id" /> | |
| 36 | + <el-table-column label="ๅทฅๅฐๅ็งฐ" align="center" prop="name" /> | |
| 37 | + <el-table-column label="้กน็ฎ็ฑปๅ" align="center" prop="type" /> | |
| 38 | + <el-table-column label="็ฎก่พๅบ" align="center" prop="place" /> | |
| 39 | + <el-table-column label="ๅฎกๆฅๆ่ง" align="center" prop="sub_reason" width="180" /> | |
| 40 | + <el-table-column label="ๆถ็บณๅบๅ็งฐ" align="center" prop="ename" width="180" /> | |
| 41 | + <el-table-column label="ๆถ็บณๅบ็ฑปๅ" align="center" prop="etype" width="180"/> | |
| 42 | + <el-table-column label="็ฎก่พๅบ" align="center" prop="eplace" /> | |
| 43 | + <el-table-column label="ๅฎกๆฅๆ่ง" align="center" prop="esub_reason" width="180" /> | |
| 44 | + <el-table-column label="ๅผๅทฅ็ถๆ" align="center" prop="estatus" class-name="small-padding fixed-width"/> | |
| 45 | + </el-table> | |
| 46 | + | |
| 47 | + <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" | |
| 48 | + @pagination="getList" /> | |
| 49 | + </div> | |
| 50 | + | |
| 51 | +</template> | |
| 52 | + | |
| 53 | +<script> | |
| 54 | + import { | |
| 55 | + dayWorkList, | |
| 56 | + } from "@/api/business/daywork"; | |
| 57 | + | |
| 58 | + | |
| 59 | + import { | |
| 60 | + Upload | |
| 61 | + } from "element-ui"; | |
| 62 | + import { | |
| 63 | + getToken | |
| 64 | + } from "@/utils/auth"; | |
| 65 | + | |
| 66 | + import { | |
| 67 | + earthsitesList, | |
| 68 | + constructionsitesList, | |
| 69 | + getDict, | |
| 70 | + getArea | |
| 71 | + } from "@/api/dict"; | |
| 72 | + | |
| 73 | + export default { | |
| 74 | + name: "dayWorkReport", | |
| 75 | + data() { | |
| 76 | + return { | |
| 77 | + // ้ฎ็ฝฉๅฑ | |
| 78 | + loading: true, | |
| 79 | + | |
| 80 | + reUpdate : false, | |
| 81 | + | |
| 82 | + info: false, | |
| 83 | + | |
| 84 | + infoData: null, | |
| 85 | + businessKey:null, | |
| 86 | + picSample: false, | |
| 87 | + uploadImageDialog: false, | |
| 88 | + // ้ไธญๆฐ็ป | |
| 89 | + ids: [], | |
| 90 | + // ้ๅไธช็ฆ็จ | |
| 91 | + single: true, | |
| 92 | + // ้ๅคไธช็ฆ็จ | |
| 93 | + multiple: true, | |
| 94 | + // ๆพ็คบๆ็ดขๆกไปถ | |
| 95 | + showSearch: true, | |
| 96 | + // ๆปๆกๆฐ | |
| 97 | + total: 0, | |
| 98 | + // ใ่ฏทๅกซๅๅ่ฝๅ็งฐใ่กจๆ ผๆฐๆฎ | |
| 99 | + threestepList: [], | |
| 100 | + fileList: [], | |
| 101 | + // ๅผนๅบๅฑๆ ้ข | |
| 102 | + title: "", | |
| 103 | + // ๆฏๅฆๆพ็คบๅผนๅบๅฑ | |
| 104 | + open: false, | |
| 105 | + // ๆฅ่ฏขๅๆฐ | |
| 106 | + queryParams: { | |
| 107 | + pageNum: 1, | |
| 108 | + pageSize: 10 | |
| 109 | + }, | |
| 110 | + // ่กจๅๅๆฐ | |
| 111 | + form: { | |
| 112 | + }, | |
| 113 | + picIndex: null, | |
| 114 | + // ่กจๅๆ ก้ช | |
| 115 | + rules: { | |
| 116 | + }, | |
| 117 | + SiteWorkAreaCodeType: [], | |
| 118 | + remoteData: [{name:"a",id:"id"}], | |
| 119 | + remoteQueryData: { | |
| 120 | + "page": 1, | |
| 121 | + "size": 9999 | |
| 122 | + }, | |
| 123 | + areas: [{ | |
| 124 | + code:"a", | |
| 125 | + name:"A"} | |
| 126 | + ], | |
| 127 | + constructionsitesList:[], | |
| 128 | + earthsitesList:[], | |
| 129 | + areaCode: null, | |
| 130 | + bindData: [{name:"a",id:"id"}], | |
| 131 | + bindname:null, | |
| 132 | + projectTypes:null, | |
| 133 | + earthsitesTypes:null, | |
| 134 | + outside:["้ฟๆฒๅฟ","ๆๅๅบ","ๆต้ณๅธ","ๅฎไนกๅธ","ๆ ชๆดฒๅธ","ๆนๆฝญๅธ","ๆฑฉ็ฝๅธ","ๆน้ดๅฟ"], | |
| 135 | + | |
| 136 | + }; | |
| 137 | + }, | |
| 138 | + created() { | |
| 139 | + this.getList(0); | |
| 140 | + getDict({type:"CSConsSiteProjectType"}).then(res=>{ | |
| 141 | + this.projectTypes = res.result; | |
| 142 | + }); | |
| 143 | + | |
| 144 | + getDict({type:"CSDisSiteType"}).then(res=>{ | |
| 145 | + this.earthsitesTypes = res.result; | |
| 146 | + }); | |
| 147 | + }, | |
| 148 | + methods: { | |
| 149 | + areaClear() { | |
| 150 | + this.areaCode = null; | |
| 151 | + }, | |
| 152 | + selectArea(a) { | |
| 153 | + this.areaCode = a; | |
| 154 | + }, | |
| 155 | + getObjId(item) { | |
| 156 | + if (this.form.type == 0) { | |
| 157 | + this.form.objectId = item.id; | |
| 158 | + this.form.place = Number(item.areaCode); | |
| 159 | + } else { | |
| 160 | + this.form.earthsitesId = item.id; | |
| 161 | + this.form.place = Number(item.areaCode); | |
| 162 | + } | |
| 163 | + }, | |
| 164 | + getEarthsiteId(item) { | |
| 165 | + if (this.form.type == 0) { | |
| 166 | + this.form.objectId = item.id; | |
| 167 | + } else { | |
| 168 | + this.form.earthsitesId = item.id; | |
| 169 | + } | |
| 170 | + }, | |
| 171 | + handleClose() { | |
| 172 | + this.uploadImageDialog = false; | |
| 173 | + this.fileList = []; | |
| 174 | + }, | |
| 175 | + /** ๆฅ่ฏขใ่ฏทๅกซๅๅ่ฝๅ็งฐใๅ่กจ */ | |
| 176 | + getList(tabIdx) { | |
| 177 | + | |
| 178 | + this.loading = true; | |
| 179 | + | |
| 180 | + dayWorkList(this.queryParams).then(response => { | |
| 181 | + this.threestepList = response.rows; | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + getArea().then(res => { | |
| 186 | + this.areas = res.result; | |
| 187 | + for(let i =0;i< this.threestepList.length;i++){ | |
| 188 | + this.threestepList[i].place = this.getAreaName(this.threestepList[i].place); | |
| 189 | + | |
| 190 | + if(this.outside.indexOf(this.threestepList[i].place) > -1){ | |
| 191 | + if(this.threestepList[i].status == 1){ | |
| 192 | + this.threestepList[i].estatus = "ๅผๅทฅ"; | |
| 193 | + }else{ | |
| 194 | + this.threestepList[i].estatus = "ๆชๅผๅทฅ"; | |
| 195 | + } | |
| 196 | + }else{ | |
| 197 | + if(this.threestepList[i].status == 1 && this.threestepList[i].estatus == 1){ | |
| 198 | + this.threestepList[i].estatus = "ๅผๅทฅ"; | |
| 199 | + }else{ | |
| 200 | + this.threestepList[i].estatus = "ๆชๅผๅทฅ"; | |
| 201 | + } | |
| 202 | + } | |
| 203 | + } | |
| 204 | + }); | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + constructionsitesList(this.remoteQueryData).then(res => { | |
| 209 | + this.constructionsitesList = res.result.list; | |
| 210 | + for(let i =0;i< this.threestepList.length;i++){ | |
| 211 | + for(let j =0;j<this.constructionsitesList.length;j++){ | |
| 212 | + if(this.threestepList[i].object_id == this.constructionsitesList[j].id){ | |
| 213 | + for(let x in this.projectTypes){ | |
| 214 | + if(this.projectTypes[x].code == this.constructionsitesList[j].projectType){ | |
| 215 | + this.threestepList[i].type = this.projectTypes[x].name; | |
| 216 | + } | |
| 217 | + } | |
| 218 | + } | |
| 219 | + } | |
| 220 | + } | |
| 221 | + }); | |
| 222 | + | |
| 223 | + earthsitesList(this.remoteQueryData).then(res => { | |
| 224 | + this.earthsitesList = res.result.list; | |
| 225 | + for(let i =0;i< this.threestepList.length;i++){ | |
| 226 | + for(let j =0;j<this.earthsitesList.length;j++){ | |
| 227 | + if(this.threestepList[i].eobject_id == this.earthsitesList[j].id){ | |
| 228 | + this.threestepList[i].etype = this.earthsitesList[j].typeName; | |
| 229 | + this.threestepList[i].eplace = this.earthsitesList[j].areaName; | |
| 230 | + } | |
| 231 | + } | |
| 232 | + } | |
| 233 | + }); | |
| 234 | + | |
| 235 | + this.total = response.total; | |
| 236 | + this.loading = false; | |
| 237 | + }); | |
| 238 | + | |
| 239 | + | |
| 240 | + }, | |
| 241 | + // ๅๆถๆ้ฎ | |
| 242 | + cancel() { | |
| 243 | + this.open = false; | |
| 244 | + this.reset(); | |
| 245 | + }, | |
| 246 | + // ่กจๅ้็ฝฎ | |
| 247 | + reset() { | |
| 248 | + this.form = { | |
| 249 | + id: null, | |
| 250 | + name: null, | |
| 251 | + type: null, | |
| 252 | + place: null, | |
| 253 | + selfCheckTime: null, | |
| 254 | + objectId: null, | |
| 255 | + earthsitesId: null, | |
| 256 | + createTime: null, | |
| 257 | + checkTime: null, | |
| 258 | + earthsitesName: null, | |
| 259 | + contract: null, | |
| 260 | + companys: null, | |
| 261 | + companyTrucks: null, | |
| 262 | + img0: null, | |
| 263 | + img1: null, | |
| 264 | + img2: null, | |
| 265 | + img3: null, | |
| 266 | + img4: null, | |
| 267 | + img5: null, | |
| 268 | + img6: null, | |
| 269 | + img7: null, | |
| 270 | + img8: null, | |
| 271 | + img9: null, | |
| 272 | + img10: null, | |
| 273 | + img11: null, | |
| 274 | + img12: null, | |
| 275 | + person: null, | |
| 276 | + phone: null | |
| 277 | + }; | |
| 278 | + this.resetForm("form"); | |
| 279 | + }, | |
| 280 | + /** ๆ็ดขๆ้ฎๆไฝ */ | |
| 281 | + handleQuery() { | |
| 282 | + this.queryParams.pageNum = 1; | |
| 283 | + this.getList(); | |
| 284 | + }, | |
| 285 | + /** ้็ฝฎๆ้ฎๆไฝ */ | |
| 286 | + resetQuery() { | |
| 287 | + this.resetForm("queryForm"); | |
| 288 | + this.handleQuery(); | |
| 289 | + }, | |
| 290 | + // ๅค้ๆก้ไธญๆฐๆฎ | |
| 291 | + handleSelectionChange(selection) { | |
| 292 | + this.ids = selection.map(item => item.id) | |
| 293 | + this.single = selection.length !== 1 | |
| 294 | + this.multiple = !selection.length | |
| 295 | + }, | |
| 296 | + /** ๆฐๅขๆ้ฎๆไฝ */ | |
| 297 | + handleAdd() { | |
| 298 | + this.reset(); | |
| 299 | + this.open = true; | |
| 300 | + this.title = "ๆฅๅทฅ่ชๆฅ"; | |
| 301 | + }, | |
| 302 | + /** ไฟฎๆนๆ้ฎๆไฝ */ | |
| 303 | + handleUpdate(row) { | |
| 304 | + this.reset(); | |
| 305 | + this.businessKey = row.id +""; | |
| 306 | + this.info = true; | |
| 307 | + }, | |
| 308 | + getAreaName(code){ | |
| 309 | + for(let i =0;i<this.areas.length;i++){ | |
| 310 | + if(Number(code) == this.areas[i].code){ | |
| 311 | + return this.areas[i].name; | |
| 312 | + break; | |
| 313 | + } | |
| 314 | + } | |
| 315 | + return code; | |
| 316 | + }, | |
| 317 | + | |
| 318 | + reSub(row){ | |
| 319 | + this.reset(); | |
| 320 | + | |
| 321 | + this.open = true; | |
| 322 | + this.title = "ๅๆฌกๆไบค"; | |
| 323 | + getThreestep(row.id).then(res=>{ | |
| 324 | + this.form = res.data; | |
| 325 | + this.form.type = this.form.type + ""; | |
| 326 | + | |
| 327 | + for (let i = 0; i < 13; i++) { | |
| 328 | + if (this.form["img" + i]) { | |
| 329 | + this.form["img" + i] = this.form["img" + i].split(","); | |
| 330 | + } | |
| 331 | + } | |
| 332 | + | |
| 333 | + | |
| 334 | + this.form.status = 0; | |
| 335 | + this.form.id = null; | |
| 336 | + }); | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + }, | |
| 341 | + | |
| 342 | + checkEndSuccess(){ | |
| 343 | + this.form.checkEndTime = new Date(); | |
| 344 | + this.form.id = this.businessKey; | |
| 345 | + for (let i = 1; i < 4; i++) { | |
| 346 | + if (this.form["attchItem" + i]) { | |
| 347 | + this.form["attchItem" + i] = this.form["attchItem" + i] + ""; | |
| 348 | + } | |
| 349 | + } | |
| 350 | + this.submitForm(); | |
| 351 | + }, | |
| 352 | + checkEndError(){ | |
| 353 | + console.log(this.form, this.businessKey); | |
| 354 | + //ๅ่ตทๆกๅท | |
| 355 | + }, | |
| 356 | + | |
| 357 | + /** ๆไบคๆ้ฎ */ | |
| 358 | + submitForm() { | |
| 359 | + this.$refs["form"].validate(valid => { | |
| 360 | + if (valid) { | |
| 361 | + if (this.form.id != null) { | |
| 362 | + updateThreestep(this.form).then(response => { | |
| 363 | + this.msgSuccess("ไฟฎๆนๆๅ"); | |
| 364 | + this.open = false; | |
| 365 | + this.open2 = false; | |
| 366 | + this.getList(); | |
| 367 | + }); | |
| 368 | + } else { | |
| 369 | + this.form.companys = this.form.companys + ""; | |
| 370 | + this.form.companyTrucks = this.form.companyTrucks + ""; | |
| 371 | + | |
| 372 | + for (let i = 0; i < 13; i++) { | |
| 373 | + if (this.form["img" + i]) { | |
| 374 | + | |
| 375 | + this.form["img" + i] = this.form["img" + i] + ""; | |
| 376 | + } | |
| 377 | + } | |
| 378 | + addThreestep(this.form).then(response => { | |
| 379 | + this.msgSuccess("ๆฐๅขๆๅ"); | |
| 380 | + this.open = false; | |
| 381 | + this.open2 = false; | |
| 382 | + this.getList(); | |
| 383 | + }); | |
| 384 | + } | |
| 385 | + } | |
| 386 | + }); | |
| 387 | + }, | |
| 388 | + /** ๅ ้คๆ้ฎๆไฝ */ | |
| 389 | + handleDelete(row) { | |
| 390 | + const ids = row.id || this.ids; | |
| 391 | + this.$confirm('ๆฏๅฆ็กฎ่ฎคๅ ้คใ่ฏทๅกซๅๅ่ฝๅ็งฐใ็ผๅทไธบ"' + ids + '"็ๆฐๆฎ้กน?', "่ญฆๅ", { | |
| 392 | + confirmButtonText: "็กฎๅฎ", | |
| 393 | + cancelButtonText: "ๅๆถ", | |
| 394 | + type: "warning" | |
| 395 | + }).then(function() { | |
| 396 | + return delThreestep(ids); | |
| 397 | + }).then(() => { | |
| 398 | + this.getList(); | |
| 399 | + this.msgSuccess("ๅ ้คๆๅ"); | |
| 400 | + }) | |
| 401 | + }, | |
| 402 | + /** ๅฏผๅบๆ้ฎๆไฝ */ | |
| 403 | + handleExport() { | |
| 404 | + const queryParams = this.queryParams; | |
| 405 | + this.$confirm('ๆฏๅฆ็กฎ่ฎคๅฏผๅบๆๆใ่ฏทๅกซๅๅ่ฝๅ็งฐใๆฐๆฎ้กน?', "่ญฆๅ", { | |
| 406 | + confirmButtonText: "็กฎๅฎ", | |
| 407 | + cancelButtonText: "ๅๆถ", | |
| 408 | + type: "warning" | |
| 409 | + }).then(function() { | |
| 410 | + return exportThreestep(queryParams); | |
| 411 | + }).then(response => { | |
| 412 | + this.download(response.msg); | |
| 413 | + }) | |
| 414 | + } | |
| 415 | + } | |
| 416 | + }; | |
| 417 | +</script> | ... | ... |
trash-ui/src/views/business/supervisionSpecial/index.vue
0 โ 100644
| 1 | +<template> | |
| 2 | + <div class="app-container"> | |
| 3 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> | |
| 4 | + <el-form-item label="็ฑปๅ" prop="type"> | |
| 5 | + <el-select v-model="queryParams.type" placeholder="่ฏท้ๆฉ็ฑปๅ" clearable size="small"> | |
| 6 | + <el-option label="่ฏท้ๆฉๅญๅ ธ็ๆ" value="" /> | |
| 7 | + </el-select> | |
| 8 | + </el-form-item> | |
| 9 | + <el-form-item label="็ฃๆฅไบ้กน" prop="title"> | |
| 10 | + <el-input | |
| 11 | + v-model="queryParams.title" | |
| 12 | + placeholder="่ฏท่พๅ ฅ็ฃๆฅไบ้กน" | |
| 13 | + clearable | |
| 14 | + size="small" | |
| 15 | + @keyup.enter.native="handleQuery" | |
| 16 | + /> | |
| 17 | + </el-form-item> | |
| 18 | + <el-form-item label="่ดฃไปป้จ้จไบบ็ญพๆถ" prop="signPerson"> | |
| 19 | + <el-input | |
| 20 | + v-model="queryParams.signPerson" | |
| 21 | + placeholder="่ฏท่พๅ ฅ่ดฃไปป้จ้จไบบ็ญพๆถ" | |
| 22 | + clearable | |
| 23 | + size="small" | |
| 24 | + @keyup.enter.native="handleQuery" | |
| 25 | + /> | |
| 26 | + </el-form-item> | |
| 27 | + <el-form-item label="็ญพๆถๆถ้ด" prop="signTime"> | |
| 28 | + <el-date-picker clearable size="small" style="width: 200px" | |
| 29 | + v-model="queryParams.signTime" | |
| 30 | + type="date" | |
| 31 | + value-format="yyyy-MM-dd" | |
| 32 | + placeholder="้ๆฉ็ญพๆถๆถ้ด"> | |
| 33 | + </el-date-picker> | |
| 34 | + </el-form-item> | |
| 35 | + <el-form-item label="ๅๅคๆ้" prop="timeLimit"> | |
| 36 | + <el-date-picker clearable size="small" style="width: 200px" | |
| 37 | + v-model="queryParams.timeLimit" | |
| 38 | + type="date" | |
| 39 | + value-format="yyyy-MM-dd" | |
| 40 | + placeholder="้ๆฉๅๅคๆ้"> | |
| 41 | + </el-date-picker> | |
| 42 | + </el-form-item> | |
| 43 | + <el-form-item label="็ถๆ" prop="state"> | |
| 44 | + <el-input | |
| 45 | + v-model="queryParams.state" | |
| 46 | + placeholder="่ฏท่พๅ ฅ็ถๆ" | |
| 47 | + clearable | |
| 48 | + size="small" | |
| 49 | + @keyup.enter.native="handleQuery" | |
| 50 | + /> | |
| 51 | + </el-form-item> | |
| 52 | + <el-form-item label="ๅๅค้จ้จ" prop="resDepart"> | |
| 53 | + <el-input | |
| 54 | + v-model="queryParams.resDepart" | |
| 55 | + placeholder="่ฏท่พๅ ฅๅๅค้จ้จ" | |
| 56 | + clearable | |
| 57 | + size="small" | |
| 58 | + @keyup.enter.native="handleQuery" | |
| 59 | + /> | |
| 60 | + </el-form-item> | |
| 61 | + <el-form-item label="ๅๅคๆถ้ด" prop="resTime"> | |
| 62 | + <el-date-picker clearable size="small" style="width: 200px" | |
| 63 | + v-model="queryParams.resTime" | |
| 64 | + type="date" | |
| 65 | + value-format="yyyy-MM-dd" | |
| 66 | + placeholder="้ๆฉๅๅคๆถ้ด"> | |
| 67 | + </el-date-picker> | |
| 68 | + </el-form-item> | |
| 69 | + <el-form-item label="ๅๅค้จ้จ่ด่ดฃไบบ" prop="resPerson"> | |
| 70 | + <el-input | |
| 71 | + v-model="queryParams.resPerson" | |
| 72 | + placeholder="่ฏท่พๅ ฅๅๅค้จ้จ่ด่ดฃไบบ" | |
| 73 | + clearable | |
| 74 | + size="small" | |
| 75 | + @keyup.enter.native="handleQuery" | |
| 76 | + /> | |
| 77 | + </el-form-item> | |
| 78 | + <el-form-item label="ๆนๆณจ" prop="annotations"> | |
| 79 | + <el-input | |
| 80 | + v-model="queryParams.annotations" | |
| 81 | + placeholder="่ฏท่พๅ ฅๆนๆณจ" | |
| 82 | + clearable | |
| 83 | + size="small" | |
| 84 | + @keyup.enter.native="handleQuery" | |
| 85 | + /> | |
| 86 | + </el-form-item> | |
| 87 | + <el-form-item> | |
| 88 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">ๆ็ดข</el-button> | |
| 89 | + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">้็ฝฎ</el-button> | |
| 90 | + </el-form-item> | |
| 91 | + </el-form> | |
| 92 | + | |
| 93 | + <el-row :gutter="10" class="mb8"> | |
| 94 | + <el-col :span="1.5"> | |
| 95 | + <el-button | |
| 96 | + type="primary" | |
| 97 | + icon="el-icon-plus" | |
| 98 | + size="mini" | |
| 99 | + @click="handleAdd" | |
| 100 | + v-hasPermi="['business:supervisionSpecial:add']" | |
| 101 | + >ๆฐๅข</el-button> | |
| 102 | + </el-col> | |
| 103 | + <el-col :span="1.5"> | |
| 104 | + <el-button | |
| 105 | + type="success" | |
| 106 | + icon="el-icon-edit" | |
| 107 | + size="mini" | |
| 108 | + :disabled="single" | |
| 109 | + @click="handleUpdate" | |
| 110 | + v-hasPermi="['business:supervisionSpecial:edit']" | |
| 111 | + >ไฟฎๆน</el-button> | |
| 112 | + </el-col> | |
| 113 | + <el-col :span="1.5"> | |
| 114 | + <el-button | |
| 115 | + type="danger" | |
| 116 | + icon="el-icon-delete" | |
| 117 | + size="mini" | |
| 118 | + :disabled="multiple" | |
| 119 | + @click="handleDelete" | |
| 120 | + v-hasPermi="['business:supervisionSpecial:remove']" | |
| 121 | + >ๅ ้ค</el-button> | |
| 122 | + </el-col> | |
| 123 | + <el-col :span="1.5"> | |
| 124 | + <el-button | |
| 125 | + type="warning" | |
| 126 | + icon="el-icon-download" | |
| 127 | + size="mini" | |
| 128 | + @click="handleExport" | |
| 129 | + v-hasPermi="['business:supervisionSpecial:export']" | |
| 130 | + >ๅฏผๅบ</el-button> | |
| 131 | + </el-col> | |
| 132 | + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | |
| 133 | + </el-row> | |
| 134 | + | |
| 135 | + <el-table v-loading="loading" :data="supervisionSpecialList" @selection-change="handleSelectionChange"> | |
| 136 | + <el-table-column type="selection" width="55" align="center" /> | |
| 137 | + <el-table-column label="ไธป้ฎID" align="center" prop="id" /> | |
| 138 | + <el-table-column label="็ฑปๅ" align="center" prop="type" /> | |
| 139 | + <el-table-column label="็ฃๆฅไบ้กน" align="center" prop="title" /> | |
| 140 | + <el-table-column label="็ฃๆฅๅ ๅฎน" align="center" prop="content" /> | |
| 141 | + <el-table-column label="่ดฃไปป้จ้จไบบ็ญพๆถ" align="center" prop="signPerson" /> | |
| 142 | + <el-table-column label="็ญพๆถๆถ้ด" align="center" prop="signTime" width="180"> | |
| 143 | + <template slot-scope="scope"> | |
| 144 | + <span>{{ parseTime(scope.row.signTime, '{y}-{m}-{d}') }}</span> | |
| 145 | + </template> | |
| 146 | + </el-table-column> | |
| 147 | + <el-table-column label="ๅๅคๆ้" align="center" prop="timeLimit" width="180"> | |
| 148 | + <template slot-scope="scope"> | |
| 149 | + <span>{{ parseTime(scope.row.timeLimit, '{y}-{m}-{d}') }}</span> | |
| 150 | + </template> | |
| 151 | + </el-table-column> | |
| 152 | + <el-table-column label="็ถๆ" align="center" prop="state" /> | |
| 153 | + <el-table-column label="ๅๅค้จ้จ" align="center" prop="resDepart" /> | |
| 154 | + <el-table-column label="ๅๅคๆถ้ด" align="center" prop="resTime" width="180"> | |
| 155 | + <template slot-scope="scope"> | |
| 156 | + <span>{{ parseTime(scope.row.resTime, '{y}-{m}-{d}') }}</span> | |
| 157 | + </template> | |
| 158 | + </el-table-column> | |
| 159 | + <el-table-column label="ๅๅค้จ้จ่ด่ดฃไบบ" align="center" prop="resPerson" /> | |
| 160 | + <el-table-column label="ๅๅคๅ ๅฎน" align="center" prop="resContent" /> | |
| 161 | + <el-table-column label="ๆนๆณจ" align="center" prop="annotations" /> | |
| 162 | + <el-table-column label="ๆไฝ" align="center" class-name="small-padding fixed-width"> | |
| 163 | + <template slot-scope="scope"> | |
| 164 | + <el-button | |
| 165 | + size="mini" | |
| 166 | + type="text" | |
| 167 | + icon="el-icon-edit" | |
| 168 | + @click="handleUpdate(scope.row)" | |
| 169 | + v-hasPermi="['business:supervisionSpecial:edit']" | |
| 170 | + >ไฟฎๆน</el-button> | |
| 171 | + <el-button | |
| 172 | + size="mini" | |
| 173 | + type="text" | |
| 174 | + icon="el-icon-delete" | |
| 175 | + @click="handleDelete(scope.row)" | |
| 176 | + v-hasPermi="['business:supervisionSpecial:remove']" | |
| 177 | + >ๅ ้ค</el-button> | |
| 178 | + </template> | |
| 179 | + </el-table-column> | |
| 180 | + </el-table> | |
| 181 | + | |
| 182 | + <pagination | |
| 183 | + v-show="total>0" | |
| 184 | + :total="total" | |
| 185 | + :page.sync="queryParams.pageNum" | |
| 186 | + :limit.sync="queryParams.pageSize" | |
| 187 | + @pagination="getList" | |
| 188 | + /> | |
| 189 | + | |
| 190 | + <!-- ๆทปๅ ๆไฟฎๆนไธ้กน็ฃๆฅๅฏน่ฏๆก --> | |
| 191 | + <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> | |
| 192 | + <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | |
| 193 | + <el-form-item label="็ฑปๅ" prop="type"> | |
| 194 | + <el-select v-model="form.type" placeholder="่ฏท้ๆฉ็ฑปๅ"> | |
| 195 | + <el-option label="่ฏท้ๆฉๅญๅ ธ็ๆ" value="" /> | |
| 196 | + </el-select> | |
| 197 | + </el-form-item> | |
| 198 | + <el-form-item label="็ฃๆฅไบ้กน" prop="title"> | |
| 199 | + <el-input v-model="form.title" placeholder="่ฏท่พๅ ฅ็ฃๆฅไบ้กน" /> | |
| 200 | + </el-form-item> | |
| 201 | + <el-form-item label="็ฃๆฅๅ ๅฎน"> | |
| 202 | + <editor v-model="form.content" :min-height="192"/> | |
| 203 | + </el-form-item> | |
| 204 | + <el-form-item label="่ดฃไปป้จ้จไบบ็ญพๆถ" prop="signPerson"> | |
| 205 | + <el-input v-model="form.signPerson" placeholder="่ฏท่พๅ ฅ่ดฃไปป้จ้จไบบ็ญพๆถ" /> | |
| 206 | + </el-form-item> | |
| 207 | + <el-form-item label="็ญพๆถๆถ้ด" prop="signTime"> | |
| 208 | + <el-date-picker clearable size="small" style="width: 200px" | |
| 209 | + v-model="form.signTime" | |
| 210 | + type="date" | |
| 211 | + value-format="yyyy-MM-dd" | |
| 212 | + placeholder="้ๆฉ็ญพๆถๆถ้ด"> | |
| 213 | + </el-date-picker> | |
| 214 | + </el-form-item> | |
| 215 | + <el-form-item label="ๅๅคๆ้" prop="timeLimit"> | |
| 216 | + <el-date-picker clearable size="small" style="width: 200px" | |
| 217 | + v-model="form.timeLimit" | |
| 218 | + type="date" | |
| 219 | + value-format="yyyy-MM-dd" | |
| 220 | + placeholder="้ๆฉๅๅคๆ้"> | |
| 221 | + </el-date-picker> | |
| 222 | + </el-form-item> | |
| 223 | + <el-form-item label="็ถๆ" prop="state"> | |
| 224 | + <el-input v-model="form.state" placeholder="่ฏท่พๅ ฅ็ถๆ" /> | |
| 225 | + </el-form-item> | |
| 226 | + <el-form-item label="ๅๅค้จ้จ" prop="resDepart"> | |
| 227 | + <el-input v-model="form.resDepart" placeholder="่ฏท่พๅ ฅๅๅค้จ้จ" /> | |
| 228 | + </el-form-item> | |
| 229 | + <el-form-item label="ๅๅคๆถ้ด" prop="resTime"> | |
| 230 | + <el-date-picker clearable size="small" style="width: 200px" | |
| 231 | + v-model="form.resTime" | |
| 232 | + type="date" | |
| 233 | + value-format="yyyy-MM-dd" | |
| 234 | + placeholder="้ๆฉๅๅคๆถ้ด"> | |
| 235 | + </el-date-picker> | |
| 236 | + </el-form-item> | |
| 237 | + <el-form-item label="ๅๅค้จ้จ่ด่ดฃไบบ" prop="resPerson"> | |
| 238 | + <el-input v-model="form.resPerson" placeholder="่ฏท่พๅ ฅๅๅค้จ้จ่ด่ดฃไบบ" /> | |
| 239 | + </el-form-item> | |
| 240 | + <el-form-item label="ๅๅคๅ ๅฎน"> | |
| 241 | + <editor v-model="form.resContent" :min-height="192"/> | |
| 242 | + </el-form-item> | |
| 243 | + <el-form-item label="ๆนๆณจ" prop="annotations"> | |
| 244 | + <el-input v-model="form.annotations" placeholder="่ฏท่พๅ ฅๆนๆณจ" /> | |
| 245 | + </el-form-item> | |
| 246 | + </el-form> | |
| 247 | + <div slot="footer" class="dialog-footer"> | |
| 248 | + <el-button type="primary" @click="submitForm">็กฎ ๅฎ</el-button> | |
| 249 | + <el-button @click="cancel">ๅ ๆถ</el-button> | |
| 250 | + </div> | |
| 251 | + </el-dialog> | |
| 252 | + </div> | |
| 253 | +</template> | |
| 254 | + | |
| 255 | +<script> | |
| 256 | +import { listSupervisionSpecial, getSupervisionSpecial, delSupervisionSpecial, addSupervisionSpecial, updateSupervisionSpecial, exportSupervisionSpecial } from "@/api/business/supervisionSpecial"; | |
| 257 | +import Editor from '@/components/Editor'; | |
| 258 | + | |
| 259 | +export default { | |
| 260 | + name: "SupervisionSpecial", | |
| 261 | + components: { Editor }, | |
| 262 | + data() { | |
| 263 | + return { | |
| 264 | + // ้ฎ็ฝฉๅฑ | |
| 265 | + loading: true, | |
| 266 | + // ้ไธญๆฐ็ป | |
| 267 | + ids: [], | |
| 268 | + // ้ๅไธช็ฆ็จ | |
| 269 | + single: true, | |
| 270 | + // ้ๅคไธช็ฆ็จ | |
| 271 | + multiple: true, | |
| 272 | + // ๆพ็คบๆ็ดขๆกไปถ | |
| 273 | + showSearch: true, | |
| 274 | + // ๆปๆกๆฐ | |
| 275 | + total: 0, | |
| 276 | + // ไธ้กน็ฃๆฅ่กจๆ ผๆฐๆฎ | |
| 277 | + supervisionSpecialList: [], | |
| 278 | + // ๅผนๅบๅฑๆ ้ข | |
| 279 | + title: "", | |
| 280 | + // ๆฏๅฆๆพ็คบๅผนๅบๅฑ | |
| 281 | + open: false, | |
| 282 | + // ๆฅ่ฏขๅๆฐ | |
| 283 | + queryParams: { | |
| 284 | + pageNum: 1, | |
| 285 | + pageSize: 10, | |
| 286 | + type: null, | |
| 287 | + title: null, | |
| 288 | + content: null, | |
| 289 | + signPerson: null, | |
| 290 | + signTime: null, | |
| 291 | + timeLimit: null, | |
| 292 | + state: null, | |
| 293 | + resDepart: null, | |
| 294 | + resTime: null, | |
| 295 | + resPerson: null, | |
| 296 | + resContent: null, | |
| 297 | + annotations: null | |
| 298 | + }, | |
| 299 | + // ่กจๅๅๆฐ | |
| 300 | + form: {}, | |
| 301 | + // ่กจๅๆ ก้ช | |
| 302 | + rules: { | |
| 303 | + } | |
| 304 | + }; | |
| 305 | + }, | |
| 306 | + created() { | |
| 307 | + this.getList(); | |
| 308 | + }, | |
| 309 | + methods: { | |
| 310 | + /** ๆฅ่ฏขไธ้กน็ฃๆฅๅ่กจ */ | |
| 311 | + getList() { | |
| 312 | + this.loading = true; | |
| 313 | + listSupervisionSpecial(this.queryParams).then(response => { | |
| 314 | + this.supervisionSpecialList = response.rows; | |
| 315 | + this.total = response.total; | |
| 316 | + this.loading = false; | |
| 317 | + }); | |
| 318 | + }, | |
| 319 | + // ๅๆถๆ้ฎ | |
| 320 | + cancel() { | |
| 321 | + this.open = false; | |
| 322 | + this.reset(); | |
| 323 | + }, | |
| 324 | + // ่กจๅ้็ฝฎ | |
| 325 | + reset() { | |
| 326 | + this.form = { | |
| 327 | + id: null, | |
| 328 | + type: null, | |
| 329 | + title: null, | |
| 330 | + content: null, | |
| 331 | + signPerson: null, | |
| 332 | + signTime: null, | |
| 333 | + timeLimit: null, | |
| 334 | + state: null, | |
| 335 | + createBy: null, | |
| 336 | + createTime: null, | |
| 337 | + updateTime: null, | |
| 338 | + updateBy: null, | |
| 339 | + resDepart: null, | |
| 340 | + resTime: null, | |
| 341 | + resPerson: null, | |
| 342 | + resContent: null, | |
| 343 | + annotations: null | |
| 344 | + }; | |
| 345 | + this.resetForm("form"); | |
| 346 | + }, | |
| 347 | + /** ๆ็ดขๆ้ฎๆไฝ */ | |
| 348 | + handleQuery() { | |
| 349 | + this.queryParams.pageNum = 1; | |
| 350 | + this.getList(); | |
| 351 | + }, | |
| 352 | + /** ้็ฝฎๆ้ฎๆไฝ */ | |
| 353 | + resetQuery() { | |
| 354 | + this.resetForm("queryForm"); | |
| 355 | + this.handleQuery(); | |
| 356 | + }, | |
| 357 | + // ๅค้ๆก้ไธญๆฐๆฎ | |
| 358 | + handleSelectionChange(selection) { | |
| 359 | + this.ids = selection.map(item => item.id) | |
| 360 | + this.single = selection.length!==1 | |
| 361 | + this.multiple = !selection.length | |
| 362 | + }, | |
| 363 | + /** ๆฐๅขๆ้ฎๆไฝ */ | |
| 364 | + handleAdd() { | |
| 365 | + this.reset(); | |
| 366 | + this.open = true; | |
| 367 | + this.title = "ๆทปๅ ไธ้กน็ฃๆฅ"; | |
| 368 | + }, | |
| 369 | + /** ไฟฎๆนๆ้ฎๆไฝ */ | |
| 370 | + handleUpdate(row) { | |
| 371 | + this.reset(); | |
| 372 | + const id = row.id || this.ids | |
| 373 | + getSupervisionSpecial(id).then(response => { | |
| 374 | + this.form = response.data; | |
| 375 | + this.open = true; | |
| 376 | + this.title = "ไฟฎๆนไธ้กน็ฃๆฅ"; | |
| 377 | + }); | |
| 378 | + }, | |
| 379 | + /** ๆไบคๆ้ฎ */ | |
| 380 | + submitForm() { | |
| 381 | + this.$refs["form"].validate(valid => { | |
| 382 | + if (valid) { | |
| 383 | + if (this.form.id != null) { | |
| 384 | + updateSupervisionSpecial(this.form).then(response => { | |
| 385 | + this.msgSuccess("ไฟฎๆนๆๅ"); | |
| 386 | + this.open = false; | |
| 387 | + this.getList(); | |
| 388 | + }); | |
| 389 | + } else { | |
| 390 | + addSupervisionSpecial(this.form).then(response => { | |
| 391 | + this.msgSuccess("ๆฐๅขๆๅ"); | |
| 392 | + this.open = false; | |
| 393 | + this.getList(); | |
| 394 | + }); | |
| 395 | + } | |
| 396 | + } | |
| 397 | + }); | |
| 398 | + }, | |
| 399 | + /** ๅ ้คๆ้ฎๆไฝ */ | |
| 400 | + handleDelete(row) { | |
| 401 | + const ids = row.id || this.ids; | |
| 402 | + this.$confirm('ๆฏๅฆ็กฎ่ฎคๅ ้คไธ้กน็ฃๆฅ็ผๅทไธบ"' + ids + '"็ๆฐๆฎ้กน?', "่ญฆๅ", { | |
| 403 | + confirmButtonText: "็กฎๅฎ", | |
| 404 | + cancelButtonText: "ๅๆถ", | |
| 405 | + type: "warning" | |
| 406 | + }).then(function() { | |
| 407 | + return delSupervisionSpecial(ids); | |
| 408 | + }).then(() => { | |
| 409 | + this.getList(); | |
| 410 | + this.msgSuccess("ๅ ้คๆๅ"); | |
| 411 | + }) | |
| 412 | + }, | |
| 413 | + /** ๅฏผๅบๆ้ฎๆไฝ */ | |
| 414 | + handleExport() { | |
| 415 | + const queryParams = this.queryParams; | |
| 416 | + this.$confirm('ๆฏๅฆ็กฎ่ฎคๅฏผๅบๆๆไธ้กน็ฃๆฅๆฐๆฎ้กน?', "่ญฆๅ", { | |
| 417 | + confirmButtonText: "็กฎๅฎ", | |
| 418 | + cancelButtonText: "ๅๆถ", | |
| 419 | + type: "warning" | |
| 420 | + }).then(function() { | |
| 421 | + return exportSupervisionSpecial(queryParams); | |
| 422 | + }).then(response => { | |
| 423 | + this.download(response.msg); | |
| 424 | + }) | |
| 425 | + } | |
| 426 | + } | |
| 427 | +}; | |
| 428 | +</script> | ... | ... |
trash-ui/src/views/business/threestep/index.vue
| 1 | 1 | <template> |
| 2 | 2 | <div class="app-container"> |
| 3 | + <el-row :gutter="10" class="mb8"> | |
| 4 | + <el-col :span="1.5"> | |
| 5 | + <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.pageStatus==0}" size="mini" | |
| 6 | + @click="getList(0);">ๆฅๅทฅ่ชๆฅ</el-button> | |
| 7 | + </el-col> | |
| 8 | + <el-col :span="1.5"> | |
| 9 | + <el-button :class="{'el-button':true,'el-button--primary':this.queryParams.pageStatus==1}" size="mini" | |
| 10 | + @click="getList(1);">ๆฅๅทฅๆฝๆฅ</el-button> | |
| 11 | + </el-col> | |
| 12 | + </el-row> | |
| 13 | + | |
| 14 | + | |
| 3 | 15 | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| 4 | 16 | <el-form-item label="้กน็ฎๅ็งฐ" prop="name"> |
| 5 | 17 | <el-input v-model="queryParams.name" placeholder="่ฏท่พๅ ฅ้กน็ฎๅ็งฐ" clearable size="small" |
| ... | ... | @@ -25,7 +37,7 @@ |
| 25 | 37 | |
| 26 | 38 | <el-row :gutter="10" class="mb8"> |
| 27 | 39 | <el-col :span="1.5"> |
| 28 | - <el-button type="primary" size="mini" @click="handleAdd" v-hasPermi="['business:threestep:add']">ๆฐๅข</el-button> | |
| 40 | + <el-button type="primary" size="mini" @click="handleAdd" v-hasPermi="['business:threestep:add']" v-if="new Date().getHours() > 7 && new Date().getHours() < 24">ๆฐๅข</el-button> | |
| 29 | 41 | </el-col> |
| 30 | 42 | <el-col :span="1.5"> |
| 31 | 43 | <el-button size="mini" @click="handleExport" v-hasPermi="['business:threestep:export']">ๅฏผๅบ</el-button> |
| ... | ... | @@ -42,20 +54,33 @@ |
| 42 | 54 | </template> |
| 43 | 55 | |
| 44 | 56 | </el-table-column> |
| 45 | - <el-table-column label="็ฎก่พๅบ" align="center" prop="place" /> | |
| 57 | + <el-table-column label="็ฎก่พๅบ" align="center" prop="place"> | |
| 58 | + </el-table-column> | |
| 59 | + | |
| 60 | + | |
| 46 | 61 | <el-table-column label="่ชๆฅๆถ้ด" align="center" prop="selfCheckTime" width="180"> |
| 47 | 62 | <template slot-scope="scope"> |
| 48 | 63 | <span>{{ parseTime(scope.row.selfCheckTime, '{y}-{m}-{d}') }}</span> |
| 49 | 64 | </template> |
| 50 | 65 | </el-table-column> |
| 51 | - <el-table-column label="ๆฝๆฅๆถ้ด" align="center" prop="checkTime" width="180"> | |
| 66 | + <el-table-column label="ๅทกๆฅๆถ้ด" align="center" prop="checkTime" width="180"> | |
| 52 | 67 | <template slot-scope="scope"> |
| 53 | 68 | <span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d}') }}</span> |
| 54 | 69 | </template> |
| 55 | 70 | </el-table-column> |
| 71 | + <el-table-column label="ๆฝๆฅๆถ้ด" align="center" prop="checkEndTime" width="180" v-if="queryParams.pageStatus==1"> | |
| 72 | + <template slot-scope="scope"> | |
| 73 | + <span>{{ parseTime(scope.row.checkEndTime, '{y}-{m}-{d}') }}</span> | |
| 74 | + </template> | |
| 75 | + </el-table-column> | |
| 56 | 76 | <el-table-column label="ๆไฝ" align="center" class-name="small-padding fixed-width"> |
| 57 | 77 | <template slot-scope="scope"> |
| 58 | 78 | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" |
| 79 | + v-hasPermi="['business:threestep:edit']" v-if="queryParams.pageStatus==1 && scope.row.status==1">ๆฝๆฅ</el-button> | |
| 80 | + <el-button size="mini" type="text" icon="el-icon-edit" @click="reSub(scope.row)" | |
| 81 | + v-hasPermi="['business:threestep:add']" v-if="scope.row.status==2">่ขซ้ฉณๅ</el-button> | |
| 82 | + | |
| 83 | + <el-button size="mini" type="text" @click="handleUpdate(scope.row)" | |
| 59 | 84 | v-hasPermi="['business:threestep:edit']">ๆฅ็่ฏฆๆ </el-button> |
| 60 | 85 | </template> |
| 61 | 86 | </el-table-column> |
| ... | ... | @@ -120,8 +145,7 @@ |
| 120 | 145 | <el-col :span="12"> |
| 121 | 146 | <el-form-item label="่ฟ่พไผไธ" prop="companys"> |
| 122 | 147 | <el-select v-model="form.companys" filterable multiple clearable reserve-keyword> |
| 123 | - <el-option label="Aๅบ" value="0" /> | |
| 124 | - <el-option label="Bๅบ" value="1" /> | |
| 148 | + <el-option v-for="item in companyList" :label="item.name" :value="item.name" :key="item.id" /> | |
| 125 | 149 | </el-select> |
| 126 | 150 | </el-form-item> |
| 127 | 151 | </el-col> |
| ... | ... | @@ -156,73 +180,73 @@ |
| 156 | 180 | <el-col :span="6"> |
| 157 | 181 | <a style="color:blue;font-size: 12px;" @click="showFileUpload(0)">่ฟๆฐดๆงฝ็ ง็</a> |
| 158 | 182 | <el-input v-model="form.img0" type="hidden"></el-input> |
| 159 | - <p v-for="img in form.img0">{{img.split(":")[0]}}<a @click="removeImage(0,img)" style="color:red"> x</a></p> | |
| 183 | + <p v-for="img,index in form.img0">่ฟๆฐดๆงฝ็ ง็ - {{index+1}}<a @click="removeImage(0,img)" style="color:red"> x</a></p> | |
| 160 | 184 | </el-col> |
| 161 | 185 | <el-col :span="6"> |
| 162 | 186 | <a style="color:blue;font-size: 12px;" @click="showFileUpload(1)">ๆด่ฝฆๅนณๅฐ็ ง็</a> |
| 163 | 187 | <el-input v-model="form.img1" type="hidden"></el-input> |
| 164 | - <p v-for="img in form.img1">{{img.split(":")[0]}}<a @click="removeImage(1,img)" style="color:red"> x</a></p> | |
| 188 | + <p v-for="img,index in form.img1">ๆด่ฝฆๅนณๅฐ็ ง็ - {{index+1}}<a @click="removeImage(1,img)" style="color:red"> x</a></p> | |
| 165 | 189 | </el-col> |
| 166 | 190 | <el-col :span="6"> |
| 167 | 191 | <a style="color:blue;font-size: 12px;" @click="showFileUpload(2)">ๅบๅ ฅๅฃ็ ง็</a> |
| 168 | 192 | <el-input v-model="form.img2" type="hidden"></el-input> |
| 169 | - <p v-for="img in form.img2">{{img.split(":")[0]}}<a @click="removeImage(2,img)" style="color:red"> x</a></p> | |
| 193 | + <p v-for="img,index in form.img2">ๅบๅ ฅๅฃ็ ง็ - {{index+1}}<a @click="removeImage(2,img)" style="color:red"> x</a></p> | |
| 170 | 194 | </el-col> |
| 171 | 195 | <el-col :span="6"> |
| 172 | 196 | <a style="color:blue;font-size: 12px;" @click="showFileUpload(3)">ๆฒๆทๆฑ ็ ง็</a> |
| 173 | 197 | <el-input v-model="form.img3" type="hidden"></el-input> |
| 174 | - <p v-for="img in form.img3">{{img.split(":")[0]}}<a @click="removeImage(3,img)" style="color:red"> x</a></p> | |
| 198 | + <p v-for="img,index in form.img3">ๆฒๆทๆฑ ็ ง็ - {{index+1}}<a @click="removeImage(3,img)" style="color:red"> x</a></p> | |
| 175 | 199 | </el-col> |
| 176 | 200 | </el-row> |
| 177 | 201 | <el-row type="flex" justify="center"> |
| 178 | 202 | <el-col :span="6"> |
| 179 | 203 | <a style="color:blue;font-size: 12px;" @click="showFileUpload(4)">็กฌ่ดจ่ทฏ้ข็ ง็</a> |
| 180 | 204 | <el-input v-model="form.img4" type="hidden"></el-input> |
| 181 | - <p v-for="img in form.img4">{{img.split(":")[0]}}<a @click="removeImage(4,img)" style="color:red"> x</a></p> | |
| 205 | + <p v-for="img,index in form.img4">็กฌ่ดจ่ทฏ้ข็ ง็ - {{index+1}}<a @click="removeImage(4,img)" style="color:red"> x</a></p> | |
| 182 | 206 | </el-col> |
| 183 | 207 | <el-col :span="6"> |
| 184 | 208 | <a style="color:blue;font-size: 12px;" @click="showFileUpload(5)">ๆๅๅคด่ง้ขๆชๅพ1</a> |
| 185 | 209 | <el-input v-model="form.img5" type="hidden"></el-input> |
| 186 | - <p v-for="img in form.img5">{{img.split(":")[0]}}<a @click="removeImage(5,img)" style="color:red"> x</a></p> | |
| 210 | + <p v-for="img,index in form.img5">ๆๅๅคด่ง้ขๆชๅพ1 - {{index+1}}<a @click="removeImage(5,img)" style="color:red"> x</a></p> | |
| 187 | 211 | </el-col> |
| 188 | 212 | <el-col :span="6"> |
| 189 | 213 | <a style="color:blue;font-size: 12px;" @click="showFileUpload(6)">ๆๅๅคด่ง้ขๆชๅพ2</a> |
| 190 | 214 | <el-input v-model="form.img6" type="hidden"></el-input> |
| 191 | - <p v-for="img in form.img6">{{img.split(":")[0]}}<a @click="removeImage(6,img)" style="color:red"> x</a></p> | |
| 215 | + <p v-for="img,index in form.img6">ๆๅๅคด่ง้ขๆชๅพ2 - {{index+1}}<a @click="removeImage(6,img)" style="color:red"> x</a></p> | |
| 192 | 216 | </el-col> |
| 193 | 217 | <el-col :span="6"> |
| 194 | 218 | <a style="color:blue;font-size: 12px;" @click="showFileUpload(7)">ๆๅๅคด่ง้ขๆชๅพ3</a> |
| 195 | 219 | <el-input v-model="form.img7" type="hidden"></el-input> |
| 196 | - <p v-for="img in form.img7">{{img.split(":")[0]}}<a @click="removeImage(7,img)" style="color:red"> x</a></p> | |
| 220 | + <p v-for="img,index in form.img7">ๆๅๅคด่ง้ขๆชๅพ3 - {{index+1}}<a @click="removeImage(7,img)" style="color:red"> x</a></p> | |
| 197 | 221 | </el-col> |
| 198 | 222 | </el-row> |
| 199 | 223 | <el-row type="flex" justify="center"> |
| 200 | 224 | <el-col :span="5"> |
| 201 | 225 | <a style="color:blue;font-size: 12px;" @click="showFileUpload(8)">ๅ ถไป1</a> |
| 202 | 226 | <el-input v-model="form.img8" type="hidden"></el-input> |
| 203 | - <p v-for="img in form.img8">{{img.split(":")[0]}}<a @click="removeImage(8,img)" style="color:red"> x</a></p> | |
| 227 | + <p v-for="img,index in form.img8">ๅ ถไป1 - {{index+1}}<a @click="removeImage(8,img)" style="color:red"> x</a></p> | |
| 204 | 228 | </el-col> |
| 205 | 229 | <el-col :span="5"> |
| 206 | 230 | <a style="color:blue;font-size: 12px;" @click="showFileUpload(9)">ๅ ถไป2</a> |
| 207 | 231 | <el-input v-model="form.img9" type="hidden"></el-input> |
| 208 | - <p v-for="img in form.img9">{{img.split(":")[0]}}<a @click="removeImage(9,img)" style="color:red"> x</a></p> | |
| 232 | + <p v-for="img,index in form.img9">ๅ ถไป2 - {{index+1}}<a @click="removeImage(9,img)" style="color:red"> x</a></p> | |
| 209 | 233 | </el-col> |
| 210 | 234 | <el-col :span="5"> |
| 211 | 235 | <a style="color:blue;font-size: 12px;" @click="showFileUpload(10)">ๅ ถไป3</a> |
| 212 | 236 | <el-input v-model="form.img10" type="hidden"></el-input> |
| 213 | - <p v-for="img in form.img10">{{img.split(":")[0]}}<a @click="removeImage(10,img)" style="color:red"> x</a> | |
| 237 | + <p v-for="img,index in form.img10">ๅ ถไป3 - {{index+1}}<a @click="removeImage(10,img)" style="color:red"> x</a> | |
| 214 | 238 | </p> |
| 215 | 239 | </el-col> |
| 216 | 240 | <el-col :span="5"> |
| 217 | 241 | <a style="color:blue;font-size: 12px;" @click="showFileUpload(11)">ๅ ถไป4</a> |
| 218 | 242 | <el-input v-model="form.img11" type="hidden"></el-input> |
| 219 | - <p v-for="img in form.img11">{{img.split(":")[0]}}<a @click="removeImage(11,img)" style="color:red"> x</a> | |
| 243 | + <p v-for="img,index in form.img11">ๅ ถไป4 - {{index+1}}<a @click="removeImage(11,img)" style="color:red"> x</a> | |
| 220 | 244 | </p> |
| 221 | 245 | </el-col> |
| 222 | 246 | <el-col :span="4"> |
| 223 | 247 | <a style="color:blue;font-size: 12px;" @click="showFileUpload(12)">ๅ ถไป5</a> |
| 224 | 248 | <el-input v-model="form.img12" type="hidden"></el-input> |
| 225 | - <p v-for="img in form.img12">{{img.split(":")[0]}}<a @click="removeImage(12,img)" style="color:red"> x</a> | |
| 249 | + <p v-for="img,index in form.img12">ๅ ถไป5 - {{index+1}}<a @click="removeImage(12,img)" style="color:red"> x</a> | |
| 226 | 250 | </p> |
| 227 | 251 | </el-col> |
| 228 | 252 | </el-row> |
| ... | ... | @@ -238,223 +262,42 @@ |
| 238 | 262 | </el-dialog> |
| 239 | 263 | |
| 240 | 264 | |
| 241 | - <el-dialog title="ๆฅ็่ฏฆๆ " :visible.sync="info" width="800px" append-to-body v-if="infoData!=null"> | |
| 242 | - <el-form ref="form" label-width="100px"> | |
| 265 | + <el-dialog title="ๆฅ็่ฏฆๆ " width="800px" append-to-body :visible.sync="info"> | |
| 266 | + <threestepInfo :businessKey="businessKey" v-if="info"/> | |
| 267 | + | |
| 268 | + <el-form ref="form" :model="form" :rules="rules" label-width="100px" v-if="this.queryParams.pageStatus==1"> | |
| 269 | + <el-form-item label="่กฅๅ ่ฏดๆ"> | |
| 270 | + <el-input type="textarea" v-model="form.subSubReason"></el-input> | |
| 271 | + </el-form-item> | |
| 272 | + | |
| 243 | 273 | <el-row type="flex" justify="center"> |
| 244 | - <el-col :span="12"> | |
| 245 | - <el-form-item label="้กน็ฎ็ฑปๅ"> | |
| 246 | - <el-select v-model="infoData.type" disabled> | |
| 247 | - <el-option label="ๅทฅๅฐ" value=0 /> | |
| 248 | - <el-option label="ๆถ็บณๅบ" value=1 /> | |
| 249 | - </el-select> | |
| 250 | - </el-form-item> | |
| 251 | - </el-col> | |
| 252 | - <el-col :span="12"> | |
| 253 | - <el-form-item label="ๆๅฑๅบๅ"> | |
| 254 | - <el-select v-model="infoData.place" disabled> | |
| 255 | - <el-option label="Aๅบ" value="Aๅบ" /> | |
| 256 | - <el-option label="Bๅบ" value="Bๅบ" /> | |
| 257 | - </el-select> | |
| 258 | - </el-form-item> | |
| 274 | + <el-col :span="8"> | |
| 275 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(91)">้ไปถ1</a> | |
| 276 | + <el-input v-model="form.attchItem1" type="hidden"></el-input> | |
| 277 | + <p v-for="img,index in form.attchItem1">้ไปถ1 - {{index+1}}<a @click="removeAttchItem(1,img)" style="color:red"> x</a></p> | |
| 259 | 278 | </el-col> |
| 260 | - </el-row> | |
| 261 | - <el-row type="flex" justify="center"> | |
| 262 | - <el-col :span="12"> | |
| 263 | - <el-form-item :label="labelName"> | |
| 264 | - <el-select v-model="infoData.name" disabled> | |
| 265 | - <el-option label="Aๅบ" value="Aๅบ" /> | |
| 266 | - <el-option label="Bๅบ" value="Bๅบ" /> | |
| 267 | - </el-select> | |
| 268 | - </el-form-item> | |
| 279 | + <el-col :span="8"> | |
| 280 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(92)">้ไปถ2</a> | |
| 281 | + <el-input v-model="form.attchItem2" type="hidden"></el-input> | |
| 282 | + <p v-for="img,index in form.attchItem2">้ไปถ2 - {{index+1}}<a @click="removeAttchItem(2,img)" style="color:red"> x</a></p> | |
| 269 | 283 | </el-col> |
| 270 | - <el-col :span="12"> | |
| 271 | - <el-form-item :label="labelName2" prop="place"> | |
| 272 | - <el-select v-model="infoData.objectId" disabled> | |
| 273 | - <el-option label="Aๅบ" value="Aๅบ" /> | |
| 274 | - <el-option label="Bๅบ" value="Aๅบ" /> | |
| 275 | - </el-select> | |
| 276 | - </el-form-item> | |
| 284 | + <el-col :span="8"> | |
| 285 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(93)">้ไปถ3</a> | |
| 286 | + <el-input v-model="form.attchItem3" type="hidden"></el-input> | |
| 287 | + <p v-for="img,index in form.attchItem3">้ไปถ3 - {{index+1}}<a @click="removeAttchItem(3,img)" style="color:red"> x</a></p> | |
| 277 | 288 | </el-col> |
| 278 | 289 | </el-row> |
| 279 | - <el-row type="flex" justify="center"> | |
| 280 | - <el-col> | |
| 281 | - <el-form-item label="ๆถ็บณๅๅ"> | |
| 282 | - <span>{{infoData.contract}}</span> | |
| 283 | - </el-form-item> | |
| 284 | 290 | |
| 285 | - </el-col> | |
| 286 | - <el-col> | |
| 287 | - <el-form-item label="่ชๆฅๆถ้ด"> | |
| 288 | - <span>{{ parseTime(infoData.selfCheckTime, '{y}-{m}-{d}') }}</span> | |
| 289 | - </el-form-item> | |
| 290 | - </el-col> | |
| 291 | - </el-row> | |
| 292 | - <el-row type="flex" justify="center" v-show="infoData.type == 0"> | |
| 293 | - <el-col :span="12"> | |
| 294 | - <el-form-item label="่ฟ่พไผไธ" prop="companys"> | |
| 295 | - <el-select v-model="infoData.companys" disabled> | |
| 296 | - <el-option label="Aๅบ" value="0" /> | |
| 297 | - <el-option label="Bๅบ" value="1" /> | |
| 298 | - </el-select> | |
| 299 | - </el-form-item> | |
| 300 | - </el-col> | |
| 301 | - <el-col :span="12"> | |
| 302 | - <el-form-item label="่ฟ่พ่ฝฆ่พ" prop="companyTrucks"> | |
| 303 | - <el-select v-model="infoData.companyTrucks" disabled> | |
| 304 | - <el-option label="Aๅบ" value="0" /> | |
| 305 | - <el-option label="Bๅบ" value="1" /> | |
| 306 | - </el-select> | |
| 307 | - </el-form-item> | |
| 308 | - </el-col> | |
| 309 | - </el-row> | |
| 310 | - <el-row type="flex" justify="center"> | |
| 311 | - <el-col :span="12"> | |
| 312 | - <el-form-item label="็ฐๅบ่ด่ดฃไบบ"> | |
| 313 | - <el-input v-model="infoData.person" :maxlength="20" show-word-limit clearable disabled /> | |
| 314 | - </el-form-item> | |
| 315 | - </el-col> | |
| 316 | - <el-col :span="12"> | |
| 317 | - <el-form-item label="่็ณป็ต่ฏ"> | |
| 318 | - <el-input v-model="infoData.phone" :maxlength="11" show-word-limit clearable disabled /> | |
| 319 | - </el-select> | |
| 320 | - </el-form-item> | |
| 321 | - </el-col> | |
| 322 | - </el-row> | |
| 323 | 291 | |
| 324 | - <el-row v-if="infoData.img0"> | |
| 325 | - <el-col :span="4"> | |
| 326 | - ่ฟๆฐดๆงฝ็ ง็ | |
| 327 | - </el-col> | |
| 328 | - <el-col :span="20"> | |
| 329 | - <el-row v-for="img in infoData.img0.split(',')" style="margin-bottom:10px;"> | |
| 330 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 331 | - </el-row> | |
| 332 | - </el-col> | |
| 333 | - </el-row> | |
| 334 | - <el-row v-if="infoData.img1"> | |
| 335 | - <el-col :span="4"> | |
| 336 | - ๆด่ฝฆๅนณๅฐ็ ง็ | |
| 337 | - </el-col> | |
| 338 | - <el-col :span="20"> | |
| 339 | - <el-row v-for="img in infoData.img1.split(',')" style="margin-bottom:10px;"> | |
| 340 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 341 | - </el-row> | |
| 342 | - </el-col> | |
| 343 | - </el-row> | |
| 344 | - <el-row v-if="infoData.img2"> | |
| 345 | - <el-col :span="4"> | |
| 346 | - ๅบๅ ฅๅฃ็ ง็ | |
| 347 | - </el-col> | |
| 348 | - <el-col :span="20"> | |
| 349 | - <el-row v-for="img in infoData.img2.split(',')" style="margin-bottom:10px;"> | |
| 350 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 351 | - </el-row> | |
| 352 | - </el-col> | |
| 353 | - </el-row> | |
| 354 | - <el-row v-if="infoData.img3"> | |
| 355 | - <el-col :span="4"> | |
| 356 | - ๆฒๆทๆฑ ็ ง็ | |
| 357 | - </el-col> | |
| 358 | - <el-col :span="20"> | |
| 359 | - <el-row v-for="img in infoData.img3.split(',')" style="margin-bottom:10px;"> | |
| 360 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 361 | - </el-row> | |
| 362 | - </el-col> | |
| 363 | - </el-row> | |
| 364 | - <el-row v-if="infoData.img4"> | |
| 365 | - <el-col :span="4"> | |
| 366 | - ็กฌ่ดจ่ทฏ้ข็ ง็ | |
| 367 | - </el-col> | |
| 368 | - <el-col :span="20"> | |
| 369 | - <el-row v-for="img in infoData.img4.split(',')" style="margin-bottom:10px;"> | |
| 370 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 371 | - </el-row> | |
| 372 | - </el-col> | |
| 373 | - </el-row> | |
| 374 | - <el-row v-if="infoData.img5"> | |
| 375 | - <el-col :span="4"> | |
| 376 | - ๆๅๅคด่ง้ขๆชๅพ1 | |
| 377 | - </el-col> | |
| 378 | - <el-col :span="20"> | |
| 379 | - <el-row v-for="img in infoData.img5.split(',')" style="margin-bottom:10px;"> | |
| 380 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 381 | - </el-row> | |
| 382 | - </el-col> | |
| 383 | - </el-row> | |
| 384 | - <el-row v-if="infoData.img6"> | |
| 385 | - <el-col :span="4"> | |
| 386 | - ๆๅๅคด่ง้ขๆชๅพ2 | |
| 387 | - </el-col> | |
| 388 | - <el-col :span="20"> | |
| 389 | - <el-row v-for="img in infoData.img6.split(',')" style="margin-bottom:10px;"> | |
| 390 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 391 | - </el-row> | |
| 392 | - </el-col> | |
| 393 | - </el-row> | |
| 394 | - <el-row v-if="infoData.img7"> | |
| 395 | - <el-col :span="4"> | |
| 396 | - ๆๅๅคด่ง้ขๆชๅพ3 | |
| 397 | - </el-col> | |
| 398 | - <el-col :span="20"> | |
| 399 | - <el-row v-for="img in infoData.img7.split(',')" style="margin-bottom:10px;"> | |
| 400 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 401 | - </el-row> | |
| 402 | - </el-col> | |
| 403 | - </el-row> | |
| 404 | - <el-row v-if="infoData.img8"> | |
| 405 | - <el-col :span="4"> | |
| 406 | - ๅ ถไป1 | |
| 407 | - </el-col> | |
| 408 | - <el-col :span="20"> | |
| 409 | - <el-row v-for="img in infoData.img8.split(',')" style="margin-bottom:10px;"> | |
| 410 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 411 | - </el-row> | |
| 412 | - </el-col> | |
| 413 | - </el-row> | |
| 414 | - <el-row v-if="infoData.img9"> | |
| 415 | - <el-col :span="4"> | |
| 416 | - ๅ ถไป2 | |
| 417 | - </el-col> | |
| 418 | - <el-col :span="20"> | |
| 419 | - <el-row v-for="img in infoData.img9.split(',')" style="margin-bottom:10px;"> | |
| 420 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 421 | - </el-row> | |
| 422 | - </el-col> | |
| 423 | - </el-row> | |
| 424 | - <el-row v-if="infoData.img10"> | |
| 425 | - <el-col :span="4"> | |
| 426 | - ๅ ถไป3 | |
| 427 | - </el-col> | |
| 428 | - <el-col :span="20"> | |
| 429 | - <el-row v-for="img in infoData.img10.split(',')" style="margin-bottom:10px;"> | |
| 430 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 431 | - </el-row> | |
| 432 | - </el-col> | |
| 433 | - </el-row> | |
| 434 | - <el-row v-if="infoData.img11"> | |
| 435 | - <el-col :span="4"> | |
| 436 | - ๅ ถไป4 | |
| 437 | - </el-col> | |
| 438 | - <el-col :span="20"> | |
| 439 | - <el-row v-for="img in infoData.img11.split(',')" style="margin-bottom:10px;"> | |
| 440 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 441 | - </el-row> | |
| 442 | - </el-col> | |
| 443 | - </el-row> | |
| 444 | - <el-row v-if="infoData.img12"> | |
| 445 | - <el-col :span="4"> | |
| 446 | - ๅ ถไป5 | |
| 447 | - </el-col> | |
| 448 | - <el-col :span="20"> | |
| 449 | - <el-row v-for="img in infoData.img12.split(',')" style="margin-bottom:10px;"> | |
| 450 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 451 | - </el-row> | |
| 452 | - </el-col> | |
| 453 | - </el-row> | |
| 292 | + | |
| 454 | 293 | </el-form> |
| 455 | 294 | |
| 456 | 295 | <div slot="footer" class="dialog-footer"> |
| 457 | - <el-button @click="info=false;">ๅ ณ้ญ</el-button> | |
| 296 | + <el-button type="primary" @click="checkEndSuccess()" v-if="this.queryParams.pageStatus==1">ๆฝๆฅ้่ฟ</el-button> | |
| 297 | + <el-button type="danger" @click="checkEndError()" v-if="this.queryParams.pageStatus==1">ๅผๅธธ</el-button> | |
| 298 | + | |
| 299 | + | |
| 300 | + <el-button @click="info=false;">ๅ ณ ้ญ</el-button> | |
| 458 | 301 | </div> |
| 459 | 302 | </el-dialog> |
| 460 | 303 | |
| ... | ... | @@ -485,6 +328,10 @@ |
| 485 | 328 | updateThreestep, |
| 486 | 329 | exportThreestep |
| 487 | 330 | } from "@/api/business/threestep"; |
| 331 | + | |
| 332 | + | |
| 333 | + import threestepInfo from "@/views/business/threestep/threestepInfo"; | |
| 334 | + | |
| 488 | 335 | import { |
| 489 | 336 | Upload |
| 490 | 337 | } from "element-ui"; |
| ... | ... | @@ -496,20 +343,26 @@ |
| 496 | 343 | earthsitesList, |
| 497 | 344 | constructionsitesList, |
| 498 | 345 | getDict, |
| 499 | - getArea | |
| 346 | + getArea, | |
| 347 | + companyList, | |
| 500 | 348 | } from "@/api/dict"; |
| 501 | 349 | |
| 502 | 350 | export default { |
| 503 | 351 | name: "Threestep", |
| 352 | + components: { | |
| 353 | + threestepInfo | |
| 354 | + }, | |
| 504 | 355 | data() { |
| 505 | 356 | return { |
| 506 | 357 | // ้ฎ็ฝฉๅฑ |
| 507 | 358 | loading: true, |
| 508 | 359 | |
| 360 | + reUpdate : false, | |
| 361 | + | |
| 509 | 362 | info: false, |
| 510 | 363 | |
| 511 | 364 | infoData: null, |
| 512 | - | |
| 365 | + businessKey:null, | |
| 513 | 366 | picSample: false, |
| 514 | 367 | uploadImageDialog: false, |
| 515 | 368 | // ้ไธญๆฐ็ป |
| ... | ... | @@ -547,6 +400,7 @@ |
| 547 | 400 | open: false, |
| 548 | 401 | // ๆฅ่ฏขๅๆฐ |
| 549 | 402 | queryParams: { |
| 403 | + pageStatus:0,//ๅฝๅๅคไบๅชไธไธชtag | |
| 550 | 404 | pageNum: 1, |
| 551 | 405 | pageSize: 10, |
| 552 | 406 | name: null, |
| ... | ... | @@ -559,7 +413,8 @@ |
| 559 | 413 | earthsitesName: null, |
| 560 | 414 | contract: null, |
| 561 | 415 | companys: null, |
| 562 | - companyTrucks: null | |
| 416 | + companyTrucks: null, | |
| 417 | + status:null, | |
| 563 | 418 | }, |
| 564 | 419 | // ่กจๅๅๆฐ |
| 565 | 420 | form: { |
| ... | ... | @@ -615,22 +470,29 @@ |
| 615 | 470 | ] |
| 616 | 471 | }, |
| 617 | 472 | SiteWorkAreaCodeType: [], |
| 618 | - remoteData: [], | |
| 473 | + remoteData: [{name:"a",id:"id"}], | |
| 619 | 474 | remoteQueryData: { |
| 620 | 475 | "page": 1, |
| 621 | 476 | "size": 9999 |
| 622 | 477 | }, |
| 623 | - areas: [], | |
| 478 | + companyList:[], | |
| 479 | + areas: [{ | |
| 480 | + code:"a", | |
| 481 | + name:"A"} | |
| 482 | + ], | |
| 624 | 483 | areaCode: null, |
| 625 | - bindData: [], | |
| 484 | + bindData: [{name:"a",id:"id"}], | |
| 626 | 485 | bindname:null, |
| 627 | 486 | }; |
| 628 | 487 | }, |
| 629 | 488 | created() { |
| 630 | 489 | getArea().then(res => { |
| 631 | 490 | this.areas = res.result; |
| 491 | + for(let i =0;i< this.threestepList.length;i++){ | |
| 492 | + this.threestepList[i].place = this.getAreaName(this.threestepList[i].place); | |
| 493 | + } | |
| 632 | 494 | }); |
| 633 | - this.getList(); | |
| 495 | + this.getList(0); | |
| 634 | 496 | }, |
| 635 | 497 | methods: { |
| 636 | 498 | areaClear() { |
| ... | ... | @@ -640,37 +502,47 @@ |
| 640 | 502 | this.areaCode = a; |
| 641 | 503 | }, |
| 642 | 504 | getObjId(item) { |
| 643 | - if (this.form.type == 0) { | |
| 644 | 505 | this.form.objectId = item.id; |
| 645 | 506 | this.form.place = Number(item.areaCode); |
| 646 | - } else { | |
| 647 | - this.form.earthsitesId = item.id; | |
| 648 | - this.form.place = Number(item.areaCode); | |
| 649 | - } | |
| 650 | 507 | }, |
| 651 | 508 | getEarthsiteId(item) { |
| 652 | - if (this.form.type == 0) { | |
| 653 | - this.form.objectId = item.id; | |
| 654 | - } else { | |
| 655 | - this.form.earthsitesId = item.id; | |
| 656 | - } | |
| 509 | + this.form.earthsitesName = item.name; | |
| 510 | + this.form.earthsitesId = item.id; | |
| 657 | 511 | }, |
| 658 | 512 | downloadFile(path) { |
| 659 | 513 | window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(path); |
| 660 | 514 | }, |
| 661 | 515 | removeImage(index, img) { |
| 662 | - let target = "img" + this.picIndex; | |
| 516 | + let target = "img" + index; | |
| 517 | + this.form[target].splice(this.form[target].indexOf(img), 1); | |
| 518 | + this.$forceUpdate(); | |
| 519 | + | |
| 520 | + }, | |
| 521 | + removeAttchItem(index, img) { | |
| 522 | + let target = "attchItem" + index; | |
| 663 | 523 | this.form[target].splice(this.form[target].indexOf(img), 1); |
| 524 | + this.$forceUpdate(); | |
| 664 | 525 | }, |
| 526 | + | |
| 665 | 527 | uploadSuccess(res, file, fileList) { |
| 666 | 528 | |
| 529 | + if(this.picIndex > 90){ | |
| 530 | + let target = "attchItem" + (this.picIndex-90); | |
| 531 | + if (!this.form[target]) { | |
| 532 | + this.form[target] = []; | |
| 533 | + } | |
| 534 | + this.form[target].push(res); | |
| 535 | + return; | |
| 536 | + } | |
| 537 | + | |
| 538 | + | |
| 667 | 539 | let target = "img" + this.picIndex; |
| 668 | 540 | |
| 669 | 541 | if (!this.form[target]) { |
| 670 | 542 | this.form[target] = []; |
| 671 | 543 | } |
| 672 | 544 | |
| 673 | - this.form[target].push(file.name + ':' + res); | |
| 545 | + this.form[target].push(res); | |
| 674 | 546 | |
| 675 | 547 | }, |
| 676 | 548 | showFileUpload(i) { |
| ... | ... | @@ -727,14 +599,48 @@ |
| 727 | 599 | }); |
| 728 | 600 | |
| 729 | 601 | }, |
| 602 | + | |
| 603 | + getAreaName(code){ | |
| 604 | + for(let i =0;i<this.areas.length;i++){ | |
| 605 | + if(Number(code) == this.areas[i].code){ | |
| 606 | + return this.areas[i].name; | |
| 607 | + break; | |
| 608 | + } | |
| 609 | + } | |
| 610 | + return code; | |
| 611 | + }, | |
| 612 | + | |
| 730 | 613 | /** ๆฅ่ฏขใ่ฏทๅกซๅๅ่ฝๅ็งฐใๅ่กจ */ |
| 731 | - getList() { | |
| 614 | + getList(tabIdx) { | |
| 615 | + | |
| 616 | + if(tabIdx == 1){ | |
| 617 | + this.queryParams.pageStatus = tabIdx; | |
| 618 | + this.queryParams.status = tabIdx; | |
| 619 | + }else if(tabIdx == 0){ | |
| 620 | + this.queryParams.pageStatus = tabIdx; | |
| 621 | + this.queryParams.status = null; | |
| 622 | + } | |
| 623 | + | |
| 732 | 624 | this.loading = true; |
| 733 | - listThreestep(this.queryParams).then(response => { | |
| 734 | - this.threestepList = response.rows; | |
| 735 | - this.total = response.total; | |
| 736 | - this.loading = false; | |
| 737 | - }); | |
| 625 | + listThreestep(this.queryParams).then(response => { | |
| 626 | + this.threestepList = response.rows; | |
| 627 | + this.total = response.total; | |
| 628 | + this.loading = false; | |
| 629 | + for(let i =0;i< this.threestepList.length;i++){ | |
| 630 | + this.threestepList[i].place = this.getAreaName(this.threestepList[i].place); | |
| 631 | + } | |
| 632 | + }); | |
| 633 | + | |
| 634 | + let query = { | |
| 635 | + 'page':1, | |
| 636 | + 'size':9999, | |
| 637 | + 'creditStatus':0 | |
| 638 | + } | |
| 639 | + companyList(query).then(response => { | |
| 640 | + | |
| 641 | + this.companyList = response.result.list; | |
| 642 | + }); | |
| 643 | + | |
| 738 | 644 | }, |
| 739 | 645 | // ๅๆถๆ้ฎ |
| 740 | 646 | cancel() { |
| ... | ... | @@ -799,61 +705,87 @@ |
| 799 | 705 | }, |
| 800 | 706 | /** ไฟฎๆนๆ้ฎๆไฝ */ |
| 801 | 707 | handleUpdate(row) { |
| 802 | - this.reset(); | |
| 803 | - const id = row.id || this.ids | |
| 804 | - getThreestep(id).then(response => { | |
| 805 | - this.infoData = response.data; | |
| 708 | + this.reset(); | |
| 709 | + this.businessKey = row.id +""; | |
| 806 | 710 | this.info = true; |
| 711 | + }, | |
| 712 | + reSub(row){ | |
| 713 | + this.reset(); | |
| 807 | 714 | |
| 715 | + this.open = true; | |
| 716 | + this.title = "ๅๆฌกๆไบค"; | |
| 717 | + getThreestep(row.id).then(res=>{ | |
| 718 | + this.form = res.data; | |
| 719 | + this.form.type = this.form.type + ""; | |
| 720 | + | |
| 721 | + for (let i = 0; i < 13; i++) { | |
| 722 | + if (this.form["img" + i]) { | |
| 723 | + this.form["img" + i] = this.form["img" + i].split(","); | |
| 724 | + } | |
| 725 | + } | |
| 726 | + }); | |
| 727 | + }, | |
| 808 | 728 | |
| 809 | - this.selectType(this.infoData.type); | |
| 810 | - this.infoData.type = this.infoData.type + ""; | |
| 811 | - | |
| 812 | - | |
| 813 | - if (this.infoData.companys) { | |
| 814 | - let arr = this.infoData.companys.split(','); | |
| 815 | - this.infoData.companys = []; | |
| 816 | - | |
| 817 | - this.infoData.companys.push(arr) | |
| 818 | - } | |
| 819 | - if (this.infoData.companyTrucks) { | |
| 820 | - | |
| 821 | - let arr = this.infoData.companyTrucks.split(','); | |
| 822 | - | |
| 823 | - this.infoData.companyTrucks = []; | |
| 824 | - | |
| 825 | - this.infoData.companyTrucks.push(arr) | |
| 729 | + checkEndSuccess(){ | |
| 730 | + this.form.checkEndTime = new Date(); | |
| 731 | + this.form.id = this.businessKey; | |
| 732 | + for (let i = 1; i < 4; i++) { | |
| 733 | + if (this.form["attchItem" + i]) { | |
| 734 | + this.form["attchItem" + i] = this.form["attchItem" + i] + ""; | |
| 826 | 735 | } |
| 827 | - }); | |
| 736 | + } | |
| 737 | + this.submitForm(); | |
| 738 | + }, | |
| 739 | + checkEndError(){ | |
| 740 | + console.log(this.form, this.businessKey); | |
| 741 | + //ๅ่ตทๆกๅท | |
| 828 | 742 | }, |
| 743 | + | |
| 829 | 744 | /** ๆไบคๆ้ฎ */ |
| 830 | 745 | submitForm() { |
| 831 | 746 | this.$refs["form"].validate(valid => { |
| 832 | 747 | if (valid) { |
| 833 | 748 | if (this.form.id != null) { |
| 834 | - updateThreestep(this.form).then(response => { | |
| 835 | - this.msgSuccess("ไฟฎๆนๆๅ"); | |
| 836 | - this.open = false; | |
| 837 | - this.getList(); | |
| 838 | - }); | |
| 749 | + if(this.queryParams.pageStatus==1){ | |
| 750 | + updateThreestep(this.form).then(response => { | |
| 751 | + this.msgSuccess("ๆไบคๆๅ"); | |
| 752 | + this.open = false; | |
| 753 | + this.open2 = false; | |
| 754 | + this.getList(); | |
| 755 | + }); | |
| 756 | + }else{ | |
| 757 | + this.form.companys = this.form.companys + ""; | |
| 758 | + this.form.companyTrucks = this.form.companyTrucks + ""; | |
| 759 | + | |
| 760 | + for (let i = 0; i < 13; i++) { | |
| 761 | + if (this.form["img" + i]) { | |
| 762 | + this.form["img" + i] = this.form["img" + i] + ""; | |
| 763 | + } | |
| 764 | + } | |
| 765 | + | |
| 766 | + addThreestep(this.form).then(response => { | |
| 767 | + this.msgSuccess("ไฟฎๆนๆๅ"); | |
| 768 | + this.open = false; | |
| 769 | + this.open2 = false; | |
| 770 | + this.getList(); | |
| 771 | + }); | |
| 772 | + } | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 839 | 776 | } else { |
| 840 | 777 | this.form.companys = this.form.companys + ""; |
| 841 | 778 | this.form.companyTrucks = this.form.companyTrucks + ""; |
| 842 | - console.log(this.form); | |
| 779 | + | |
| 843 | 780 | for (let i = 0; i < 13; i++) { |
| 844 | 781 | if (this.form["img" + i]) { |
| 845 | - let paths = ""; | |
| 846 | - for (var j = 0; j < this.form["img" + i].length; j++) { | |
| 847 | - paths += this.form["img" + i][j].split(":")[1] + ","; | |
| 848 | - } | |
| 849 | - this.form["img" + i] = paths.substring(0, paths.length - 1); | |
| 782 | + this.form["img" + i] = this.form["img" + i] + ""; | |
| 850 | 783 | } |
| 851 | 784 | } |
| 852 | - | |
| 853 | - | |
| 854 | 785 | addThreestep(this.form).then(response => { |
| 855 | 786 | this.msgSuccess("ๆฐๅขๆๅ"); |
| 856 | 787 | this.open = false; |
| 788 | + this.open2 = false; | |
| 857 | 789 | this.getList(); |
| 858 | 790 | }); |
| 859 | 791 | } | ... | ... |
trash-ui/src/views/business/threestep/threestepInfo.vue
| 1 | 1 | <template> |
| 2 | - <el-form ref="form" label-width="100px"> | |
| 2 | + <el-form ref="form" label-width="120px" v-loading="loading"> | |
| 3 | 3 | <el-row type="flex" justify="center"> |
| 4 | 4 | <el-col :span="12"> |
| 5 | 5 | <el-form-item label="้กน็ฎ็ฑปๅ"> |
| ... | ... | @@ -11,58 +11,46 @@ |
| 11 | 11 | </el-col> |
| 12 | 12 | <el-col :span="12"> |
| 13 | 13 | <el-form-item label="ๆๅฑๅบๅ" > |
| 14 | - <el-select v-model="infoData.place" disabled> | |
| 15 | - <el-option label="Aๅบ" value="Aๅบ" /> | |
| 16 | - <el-option label="Bๅบ" value="Bๅบ" /> | |
| 17 | - </el-select> | |
| 14 | + <el-input v-model="infoData.place" disabled /> | |
| 18 | 15 | </el-form-item> |
| 19 | 16 | </el-col> |
| 20 | 17 | </el-row> |
| 21 | 18 | <el-row type="flex" justify="center"> |
| 22 | 19 | <el-col :span="12"> |
| 23 | 20 | <el-form-item :label="labelName"> |
| 24 | - <el-select v-model="infoData.name" disabled> | |
| 25 | - <el-option label="Aๅบ" value="Aๅบ" /> | |
| 26 | - <el-option label="Bๅบ" value="Bๅบ" /> | |
| 27 | - </el-select> | |
| 21 | + <el-input v-model="infoData.name" disabled> | |
| 22 | + </el-input> | |
| 28 | 23 | </el-form-item> |
| 29 | 24 | </el-col> |
| 30 | 25 | <el-col :span="12"> |
| 31 | 26 | <el-form-item :label="labelName2" prop="place"> |
| 32 | - <el-select v-model="infoData.objectId" disabled> | |
| 33 | - <el-option label="Aๅบ" value="Aๅบ" /> | |
| 34 | - <el-option label="Bๅบ" value="Aๅบ" /> | |
| 35 | - </el-select> | |
| 27 | + <el-input v-model="infoData.earthsitesName" disabled> | |
| 28 | + </el-input> | |
| 36 | 29 | </el-form-item> |
| 37 | 30 | </el-col> |
| 38 | 31 | </el-row> |
| 39 | 32 | <el-row type="flex" justify="center"> |
| 40 | 33 | <el-col> |
| 41 | 34 | <el-form-item label="ๆถ็บณๅๅ"> |
| 42 | - <span>{{infoData.contract}}</span> | |
| 35 | + <el-input v-model="infoData.contract" :maxlength="20" show-word-limit clearable disabled /> | |
| 43 | 36 | </el-form-item> |
| 44 | 37 | |
| 45 | 38 | </el-col> |
| 46 | 39 | <el-col> |
| 47 | 40 | <el-form-item label="่ชๆฅๆถ้ด"> |
| 48 | - <span>{{ parseTime(infoData.selfCheckTime, '{y}-{m}-{d}') }}</span> | |
| 41 | + <el-input v-model="infoData.selfCheckTime" :maxlength="20" show-word-limit clearable disabled /> | |
| 49 | 42 | </el-form-item> |
| 50 | 43 | </el-col> |
| 51 | 44 | </el-row> |
| 52 | 45 | <el-row type="flex" justify="center" v-show="infoData.type == 0"> |
| 53 | 46 | <el-col :span="12"> |
| 54 | 47 | <el-form-item label="่ฟ่พไผไธ" prop="companys"> |
| 55 | - <el-select v-model="infoData.companys" disabled> | |
| 56 | - <el-option label="Aๅบ" value="0" /> | |
| 57 | - <el-option label="Bๅบ" value="1" /> | |
| 58 | - </el-select> | |
| 48 | + <el-input type="textarea" v-model="infoData.companys" disabled /> | |
| 59 | 49 | </el-form-item> |
| 60 | 50 | </el-col> |
| 61 | 51 | <el-col :span="12"> |
| 62 | 52 | <el-form-item label="่ฟ่พ่ฝฆ่พ" prop="companyTrucks"> |
| 63 | - <el-select v-model="infoData.companyTrucks" disabled> | |
| 64 | - <el-option label="Aๅบ" value="0" /> | |
| 65 | - <el-option label="Bๅบ" value="1" /> | |
| 53 | + <el-input type="textarea" v-model="infoData.companyTrucks" disabled /> | |
| 66 | 54 | </el-select> |
| 67 | 55 | </el-form-item> |
| 68 | 56 | </el-col> |
| ... | ... | @@ -86,8 +74,8 @@ |
| 86 | 74 | ่ฟๆฐดๆงฝ็ ง็ |
| 87 | 75 | </el-col> |
| 88 | 76 | <el-col :span="20"> |
| 89 | - <el-row v-for="img in infoData.img0.split(',')" style="margin-bottom:10px;"> | |
| 90 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 77 | + <el-row v-for="img,index in infoData.img0.split(',')" style="margin-bottom:10px;"> | |
| 78 | + <a @click="downloadFile(img);" style="color: blue;">่ฟๆฐดๆงฝ็ ง็ - {{index+1}}</a> | |
| 91 | 79 | </el-row> |
| 92 | 80 | </el-col> |
| 93 | 81 | </el-row> |
| ... | ... | @@ -96,8 +84,8 @@ |
| 96 | 84 | ๆด่ฝฆๅนณๅฐ็ ง็ |
| 97 | 85 | </el-col> |
| 98 | 86 | <el-col :span="20"> |
| 99 | - <el-row v-for="img in infoData.img1.split(',')" style="margin-bottom:10px;"> | |
| 100 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 87 | + <el-row v-for="img,index in infoData.img1.split(',')" style="margin-bottom:10px;"> | |
| 88 | + <a @click="downloadFile(img);" style="color: blue;">ๆด่ฝฆๅนณๅฐ็ ง็ - {{index+1}}</a> | |
| 101 | 89 | </el-row> |
| 102 | 90 | </el-col> |
| 103 | 91 | </el-row> |
| ... | ... | @@ -106,8 +94,8 @@ |
| 106 | 94 | ๅบๅ ฅๅฃ็ ง็ |
| 107 | 95 | </el-col> |
| 108 | 96 | <el-col :span="20"> |
| 109 | - <el-row v-for="img in infoData.img2.split(',')" style="margin-bottom:10px;"> | |
| 110 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 97 | + <el-row v-for="img,index in infoData.img2.split(',')" style="margin-bottom:10px;"> | |
| 98 | + <a @click="downloadFile(img);" style="color: blue;">ๅบๅ ฅๅฃ็ ง็ - {{index+1}}</a> | |
| 111 | 99 | </el-row> |
| 112 | 100 | </el-col> |
| 113 | 101 | </el-row> |
| ... | ... | @@ -116,8 +104,8 @@ |
| 116 | 104 | ๆฒๆทๆฑ ็ ง็ |
| 117 | 105 | </el-col> |
| 118 | 106 | <el-col :span="20"> |
| 119 | - <el-row v-for="img in infoData.img3.split(',')" style="margin-bottom:10px;"> | |
| 120 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 107 | + <el-row v-for="img,index in infoData.img3.split(',')" style="margin-bottom:10px;"> | |
| 108 | + <a @click="downloadFile(img);" style="color: blue;">ๆฒๆทๆฑ ็ ง็ - {{index+1}}</a> | |
| 121 | 109 | </el-row> |
| 122 | 110 | </el-col> |
| 123 | 111 | </el-row> |
| ... | ... | @@ -126,8 +114,8 @@ |
| 126 | 114 | ็กฌ่ดจ่ทฏ้ข็ ง็ |
| 127 | 115 | </el-col> |
| 128 | 116 | <el-col :span="20"> |
| 129 | - <el-row v-for="img in infoData.img4.split(',')" style="margin-bottom:10px;"> | |
| 130 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 117 | + <el-row v-for="img,index in infoData.img4.split(',')" style="margin-bottom:10px;"> | |
| 118 | + <a @click="downloadFile(img);" style="color: blue;">็กฌ่ดจ่ทฏ้ข็ ง็ - {{index+1}}</a> | |
| 131 | 119 | </el-row> |
| 132 | 120 | </el-col> |
| 133 | 121 | </el-row> |
| ... | ... | @@ -136,8 +124,8 @@ |
| 136 | 124 | ๆๅๅคด่ง้ขๆชๅพ1 |
| 137 | 125 | </el-col> |
| 138 | 126 | <el-col :span="20"> |
| 139 | - <el-row v-for="img in infoData.img5.split(',')" style="margin-bottom:10px;"> | |
| 140 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 127 | + <el-row v-for="img,index in infoData.img5.split(',')" style="margin-bottom:10px;"> | |
| 128 | + <a @click="downloadFile(img);" style="color: blue;">ๆๅๅคด่ง้ขๆชๅพ1 - {{index+1}}</a> | |
| 141 | 129 | </el-row> |
| 142 | 130 | </el-col> |
| 143 | 131 | </el-row> |
| ... | ... | @@ -146,8 +134,8 @@ |
| 146 | 134 | ๆๅๅคด่ง้ขๆชๅพ2 |
| 147 | 135 | </el-col> |
| 148 | 136 | <el-col :span="20"> |
| 149 | - <el-row v-for="img in infoData.img6.split(',')" style="margin-bottom:10px;"> | |
| 150 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 137 | + <el-row v-for="img,index in infoData.img6.split(',')" style="margin-bottom:10px;"> | |
| 138 | + <a @click="downloadFile(img);" style="color: blue;">ๆๅๅคด่ง้ขๆชๅพ2 - {{index+1}}</a> | |
| 151 | 139 | </el-row> |
| 152 | 140 | </el-col> |
| 153 | 141 | </el-row> |
| ... | ... | @@ -156,8 +144,8 @@ |
| 156 | 144 | ๆๅๅคด่ง้ขๆชๅพ3 |
| 157 | 145 | </el-col> |
| 158 | 146 | <el-col :span="20"> |
| 159 | - <el-row v-for="img in infoData.img7.split(',')" style="margin-bottom:10px;"> | |
| 160 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 147 | + <el-row v-for="img,index in infoData.img7.split(',')" style="margin-bottom:10px;"> | |
| 148 | + <a @click="downloadFile(img);" style="color: blue;">ๆๅๅคด่ง้ขๆชๅพ3 - {{index+1}}</a> | |
| 161 | 149 | </el-row> |
| 162 | 150 | </el-col> |
| 163 | 151 | </el-row> |
| ... | ... | @@ -166,8 +154,8 @@ |
| 166 | 154 | ๅ ถไป1 |
| 167 | 155 | </el-col> |
| 168 | 156 | <el-col :span="20"> |
| 169 | - <el-row v-for="img in infoData.img8.split(',')" style="margin-bottom:10px;"> | |
| 170 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 157 | + <el-row v-for="img,index in infoData.img8.split(',')" style="margin-bottom:10px;"> | |
| 158 | + <a @click="downloadFile(img);" style="color: blue;">ๅ ถไป1 - {{index+1}}</a> | |
| 171 | 159 | </el-row> |
| 172 | 160 | </el-col> |
| 173 | 161 | </el-row> |
| ... | ... | @@ -176,8 +164,8 @@ |
| 176 | 164 | ๅ ถไป2 |
| 177 | 165 | </el-col> |
| 178 | 166 | <el-col :span="20"> |
| 179 | - <el-row v-for="img in infoData.img9.split(',')" style="margin-bottom:10px;"> | |
| 180 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 167 | + <el-row v-for="img,index in infoData.img9.split(',')" style="margin-bottom:10px;"> | |
| 168 | + <a @click="downloadFile(img);" style="color: blue;">ๅ ถไป2 - {{index+1}}</a> | |
| 181 | 169 | </el-row> |
| 182 | 170 | </el-col> |
| 183 | 171 | </el-row> |
| ... | ... | @@ -186,8 +174,8 @@ |
| 186 | 174 | ๅ ถไป3 |
| 187 | 175 | </el-col> |
| 188 | 176 | <el-col :span="20"> |
| 189 | - <el-row v-for="img in infoData.img10.split(',')" style="margin-bottom:10px;"> | |
| 190 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 177 | + <el-row v-for="img,index in infoData.img10.split(',')" style="margin-bottom:10px;"> | |
| 178 | + <a @click="downloadFile(img);" style="color: blue;">ๅ ถไป3 - {{index+1}}</a> | |
| 191 | 179 | </el-row> |
| 192 | 180 | </el-col> |
| 193 | 181 | </el-row> |
| ... | ... | @@ -196,8 +184,8 @@ |
| 196 | 184 | ๅ ถไป4 |
| 197 | 185 | </el-col> |
| 198 | 186 | <el-col :span="20"> |
| 199 | - <el-row v-for="img in infoData.img11.split(',')" style="margin-bottom:10px;"> | |
| 200 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 187 | + <el-row v-for="img,index in infoData.img11.split(',')" style="margin-bottom:10px;"> | |
| 188 | + <a @click="downloadFile(img);" style="color: blue;">ๅ ถไป4 - {{index+1}}</a> | |
| 201 | 189 | </el-row> |
| 202 | 190 | </el-col> |
| 203 | 191 | </el-row> |
| ... | ... | @@ -206,11 +194,227 @@ |
| 206 | 194 | ๅ ถไป5 |
| 207 | 195 | </el-col> |
| 208 | 196 | <el-col :span="20"> |
| 209 | - <el-row v-for="img in infoData.img12.split(',')" style="margin-bottom:10px;"> | |
| 210 | - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 197 | + <el-row v-for="img,index in infoData.img12.split(',')" style="margin-bottom:10px;"> | |
| 198 | + <a @click="downloadFile(img);" style="color: blue;">ๅ ถไป5 - {{index+1}}</a> | |
| 199 | + </el-row> | |
| 200 | + </el-col> | |
| 201 | + </el-row> | |
| 202 | + | |
| 203 | + <el-row type="flex" justify="center" v-if="infoData.checkTime"> | |
| 204 | + <el-col> | |
| 205 | + <el-form-item label="ๅทกๆฅๆถ้ด"> | |
| 206 | + | |
| 207 | + <el-input v-model="infoData.checkTime" :maxlength="20" show-word-limit clearable disabled /> | |
| 208 | + </el-form-item> | |
| 209 | + </el-col> | |
| 210 | + <el-col> | |
| 211 | + <el-form-item label="ๆธฃ็ฎก่ด่ดฃไบบ"> | |
| 212 | + <el-input v-model="infoData.earthPipPerson" :maxlength="20" show-word-limit clearable disabled /> | |
| 213 | + </el-form-item> | |
| 214 | + </el-col> | |
| 215 | + </el-row> | |
| 216 | + | |
| 217 | + <el-row type="flex" justify="center" v-if="infoData.checkTime"> | |
| 218 | + <el-col> | |
| 219 | + <el-form-item label="ๆงๆณ่ด่ดฃไบบ"> | |
| 220 | + <el-input v-model="infoData.enforcePerson" :maxlength="20" show-word-limit clearable disabled /> | |
| 221 | + </el-form-item> | |
| 222 | + </el-col> | |
| 223 | + <el-col> | |
| 224 | + <el-form-item label=""> | |
| 225 | + </el-form-item> | |
| 226 | + </el-col> | |
| 227 | + </el-row> | |
| 228 | + <el-row type="flex" justify="center" v-if="infoData.subReason"> | |
| 229 | + <el-col> | |
| 230 | + <el-form-item label="ๅทกๆฅ่กฅๅ ่ฏดๆ:"> | |
| 231 | + <el-input type="textarea" v-model="infoData.subReason" disabled></el-input> | |
| 232 | + </el-form-item> | |
| 233 | + </el-col> | |
| 234 | + </el-row> | |
| 235 | + | |
| 236 | + <el-row v-if="infoData.sub_img0" > | |
| 237 | + <el-col :span="4"> | |
| 238 | + ๅฑฅ่ๆ ๅต็ ง็ | |
| 239 | + </el-col> | |
| 240 | + <el-col :span="20"> | |
| 241 | + <el-row v-for="sub_img,index in infoData.sub_img0.split(',')" style="margin-bottom:10px;"> | |
| 242 | + <a @click="downloadFile(sub_img);" style="color: blue;">ๅฑฅ่ๆ ๅต็ ง็ - {{index+1}}</a> | |
| 211 | 243 | </el-row> |
| 212 | 244 | </el-col> |
| 213 | 245 | </el-row> |
| 246 | + <el-row v-if="infoData.sub_img1" > | |
| 247 | + <el-col :span="4"> | |
| 248 | + ๆฐดๆชๆฐดๅด็ ง็ | |
| 249 | + </el-col> | |
| 250 | + <el-col :span="20"> | |
| 251 | + <el-row v-for="sub_img,index in infoData.sub_img1.split(',')" style="margin-bottom:10px;"> | |
| 252 | + <a @click="downloadFile(sub_img);" style="color: blue;">ๆฐดๆชๆฐดๅด็ ง็ - {{index+1}}</a> | |
| 253 | + </el-row> | |
| 254 | + </el-col> | |
| 255 | + </el-row> | |
| 256 | + <el-row v-if="infoData.sub_img2" > | |
| 257 | + <el-col :span="4"> | |
| 258 | + ็ งๆ็ ง็ | |
| 259 | + </el-col> | |
| 260 | + <el-col :span="20"> | |
| 261 | + <el-row v-for="sub_img,index in infoData.sub_img2.split(',')" style="margin-bottom:10px;"> | |
| 262 | + <a @click="downloadFile(sub_img);" style="color: blue;">็ งๆ็ ง็ - {{index+1}}</a> | |
| 263 | + </el-row> | |
| 264 | + </el-col> | |
| 265 | + </el-row> | |
| 266 | + <el-row v-if="infoData.sub_img3" > | |
| 267 | + <el-col :span="4"> | |
| 268 | + ่ง้ข็ๆง็ ง็ | |
| 269 | + </el-col> | |
| 270 | + <el-col :span="20"> | |
| 271 | + <el-row v-for="sub_img,index in infoData.sub_img3.split(',')" style="margin-bottom:10px;"> | |
| 272 | + <a @click="downloadFile(sub_img);" style="color: blue;">่ง้ข็ๆง็ ง็ - {{index+1}}</a> | |
| 273 | + </el-row> | |
| 274 | + </el-col> | |
| 275 | + </el-row> | |
| 276 | + <el-row v-if="infoData.sub_img4" > | |
| 277 | + <el-col :span="4"> | |
| 278 | + ๆด่ฝฆๆบ็ ง็ | |
| 279 | + </el-col> | |
| 280 | + <el-col :span="20"> | |
| 281 | + <el-row v-for="sub_img,index in infoData.sub_img4.split(',')" style="margin-bottom:10px;"> | |
| 282 | + <a @click="downloadFile(sub_img);" style="color: blue;">ๆด่ฝฆๆบ็ ง็ - {{index+1}}</a> | |
| 283 | + </el-row> | |
| 284 | + </el-col> | |
| 285 | + </el-row> | |
| 286 | + <el-row v-if="infoData.sub_img5" > | |
| 287 | + <el-col :span="4"> | |
| 288 | + ๆๅๅคด่ง้ขๆชๅพ1 | |
| 289 | + </el-col> | |
| 290 | + <el-col :span="20"> | |
| 291 | + <el-row v-for="sub_img,index in infoData.sub_img5.split(',')" style="margin-bottom:10px;"> | |
| 292 | + <a @click="downloadFile(sub_img);" style="color: blue;">ๆๅๅคด่ง้ขๆชๅพ1 - {{index+1}}</a> | |
| 293 | + </el-row> | |
| 294 | + </el-col> | |
| 295 | + </el-row> | |
| 296 | + <el-row v-if="infoData.sub_img6" > | |
| 297 | + <el-col :span="4"> | |
| 298 | + ๆๅๅคด่ง้ขๆชๅพ2 | |
| 299 | + </el-col> | |
| 300 | + <el-col :span="20"> | |
| 301 | + <el-row v-for="sub_img,index in infoData.sub_img6.split(',')" style="margin-bottom:10px;"> | |
| 302 | + <a @click="downloadFile(sub_img);" style="color: blue;">ๆๅๅคด่ง้ขๆชๅพ2 - {{index+1}}</a> | |
| 303 | + </el-row> | |
| 304 | + </el-col> | |
| 305 | + </el-row> | |
| 306 | + <el-row v-if="infoData.sub_img7" > | |
| 307 | + <el-col :span="4"> | |
| 308 | + ๆๅๅคด่ง้ขๆชๅพ3 | |
| 309 | + </el-col> | |
| 310 | + <el-col :span="20"> | |
| 311 | + <el-row v-for="sub_img,index in infoData.sub_img7.split(',')" style="margin-bottom:10px;"> | |
| 312 | + <a @click="downloadFile(sub_img);" style="color: blue;">ๆๅๅคด่ง้ขๆชๅพ3 - {{index+1}}</a> | |
| 313 | + </el-row> | |
| 314 | + </el-col> | |
| 315 | + </el-row> | |
| 316 | + <el-row v-if="infoData.sub_img8" > | |
| 317 | + <el-col :span="4"> | |
| 318 | + ๅ ถไป1 | |
| 319 | + </el-col> | |
| 320 | + <el-col :span="20"> | |
| 321 | + <el-row v-for="sub_img,index in infoData.sub_img8.split(',')" style="margin-bottom:10px;"> | |
| 322 | + <a @click="downloadFile(sub_img);" style="color: blue;">ๅ ถไป1 - {{index+1}}</a> | |
| 323 | + </el-row> | |
| 324 | + </el-col> | |
| 325 | + </el-row> | |
| 326 | + <el-row v-if="infoData.sub_img9" > | |
| 327 | + <el-col :span="4"> | |
| 328 | + ๅ ถไป2 | |
| 329 | + </el-col> | |
| 330 | + <el-col :span="20"> | |
| 331 | + <el-row v-for="sub_img,index in infoData.sub_img9.split(',')" style="margin-bottom:10px;"> | |
| 332 | + <a @click="downloadFile(sub_img);" style="color: blue;">ๅ ถไป2 - {{index+1}}</a> | |
| 333 | + </el-row> | |
| 334 | + </el-col> | |
| 335 | + </el-row> | |
| 336 | + <el-row v-if="infoData.sub_img10" > | |
| 337 | + <el-col :span="4"> | |
| 338 | + ๅ ถไป3 | |
| 339 | + </el-col> | |
| 340 | + <el-col :span="20"> | |
| 341 | + <el-row v-for="sub_img,index in infoData.sub_img10.split(',')" style="margin-bottom:10px;"> | |
| 342 | + <a @click="downloadFile(sub_img);" style="color: blue;">ๅ ถไป3 - {{index+1}}</a> | |
| 343 | + </el-row> | |
| 344 | + </el-col> | |
| 345 | + </el-row> | |
| 346 | + <el-row v-if="infoData.sub_img11" > | |
| 347 | + <el-col :span="4"> | |
| 348 | + ๅ ถไป4 | |
| 349 | + </el-col> | |
| 350 | + <el-col :span="20"> | |
| 351 | + <el-row v-for="sub_img,index in infoData.sub_img11.split(',')" style="margin-bottom:10px;"> | |
| 352 | + <a @click="downloadFile(sub_img);" style="color: blue;">ๅ ถไป4 - {{index+1}}</a> | |
| 353 | + </el-row> | |
| 354 | + </el-col> | |
| 355 | + </el-row> | |
| 356 | + <el-row v-if="infoData.sub_img12" > | |
| 357 | + <el-col :span="4"> | |
| 358 | + ๅ ถไป5 | |
| 359 | + </el-col> | |
| 360 | + <el-col :span="20"> | |
| 361 | + <el-row v-for="sub_img,index in infoData.sub_img12.split(',')" style="margin-bottom:10px;"> | |
| 362 | + <a @click="downloadFile(sub_img);" style="color: blue;">ๅ ถไป5 - {{index+1}}</a> | |
| 363 | + </el-row> | |
| 364 | + </el-col> | |
| 365 | + </el-row> | |
| 366 | + | |
| 367 | + | |
| 368 | + <el-row type="flex" justify="center" v-if="infoData.checkEndTime"> | |
| 369 | + <el-col> | |
| 370 | + <el-form-item label="ๆฝๆฅๆถ้ด"> | |
| 371 | + <el-input v-model="infoData.checkEndTime" :maxlength="20" show-word-limit clearable disabled /> | |
| 372 | + </el-form-item> | |
| 373 | + </el-col> | |
| 374 | + <el-col> | |
| 375 | + <el-form-item label=""> | |
| 376 | + </el-form-item> | |
| 377 | + </el-col> | |
| 378 | + </el-row> | |
| 379 | + | |
| 380 | + <el-row type="flex" justify="center" v-if="infoData.subSubReason"> | |
| 381 | + <el-col> | |
| 382 | + <el-form-item label="ๆฝๆฅ่กฅๅ ่ฏดๆ:"> | |
| 383 | + <el-input type="textarea" v-model="infoData.subSubReason" disabled></el-input> | |
| 384 | + </el-form-item> | |
| 385 | + </el-col> | |
| 386 | + </el-row> | |
| 387 | + | |
| 388 | + <el-row v-if="infoData.attchItem1" > | |
| 389 | + <el-col :span="4"> | |
| 390 | + ้ไปถ1 | |
| 391 | + </el-col> | |
| 392 | + <el-col :span="20"> | |
| 393 | + <el-row v-for="sub_img,index in infoData.attchItem1.split(',')" style="margin-bottom:10px;"> | |
| 394 | + <a @click="downloadFile(sub_img);" style="color: blue;">้ไปถ1 - {{index+1}}</a> | |
| 395 | + </el-row> | |
| 396 | + </el-col> | |
| 397 | + </el-row> | |
| 398 | + <el-row v-if="infoData.attchItem2" > | |
| 399 | + <el-col :span="4"> | |
| 400 | + ้ไปถ2 | |
| 401 | + </el-col> | |
| 402 | + <el-col :span="20"> | |
| 403 | + <el-row v-for="sub_img,index in infoData.attchItem2.split(',')" style="margin-bottom:10px;"> | |
| 404 | + <a @click="downloadFile(sub_img);" style="color: blue;">้ไปถ2 - {{index+1}}</a> | |
| 405 | + </el-row> | |
| 406 | + </el-col> | |
| 407 | + </el-row> | |
| 408 | + <el-row v-if="infoData.attchItem3" > | |
| 409 | + <el-col :span="4"> | |
| 410 | + ้ไปถ3 | |
| 411 | + </el-col> | |
| 412 | + <el-col :span="20"> | |
| 413 | + <el-row v-for="sub_img,index in infoData.attchItem3.split(',')" style="margin-bottom:10px;"> | |
| 414 | + <a @click="downloadFile(sub_img);" style="color: blue;">้ไปถ3 - {{index+1}}</a> | |
| 415 | + </el-row> | |
| 416 | + </el-col> | |
| 417 | + </el-row> | |
| 214 | 418 | </el-form> |
| 215 | 419 | </template> |
| 216 | 420 | |
| ... | ... | @@ -220,6 +424,11 @@ |
| 220 | 424 | import {getToken} from "@/utils/auth"; |
| 221 | 425 | |
| 222 | 426 | |
| 427 | + import { | |
| 428 | + getArea, | |
| 429 | + } from "@/api/dict"; | |
| 430 | + | |
| 431 | + | |
| 223 | 432 | export default { |
| 224 | 433 | name: "ThreestepInfo", |
| 225 | 434 | props: { |
| ... | ... | @@ -229,36 +438,55 @@ |
| 229 | 438 | }, |
| 230 | 439 | data() { |
| 231 | 440 | return{ |
| 232 | - infoData:{}, | |
| 441 | + areas:[], | |
| 442 | + labelName : "ๅทฅๅฐๅ็งฐ", | |
| 443 | + labelName2: "็ปๅฎๆถ็บณๅบ", | |
| 444 | + infoData:{type:0}, | |
| 445 | + loading:null, | |
| 233 | 446 | } |
| 234 | 447 | }, |
| 235 | 448 | created() { |
| 236 | - this.getInfo() | |
| 449 | + console.log("create!!"); | |
| 450 | + this.loading = true; | |
| 451 | + this.getInfo(); | |
| 452 | + getArea().then(res => { | |
| 453 | + this.areas = res.result; | |
| 454 | + for(let i =0;i<this.areas.length;i++){ | |
| 455 | + if(Number(this.infoData.place) == this.areas[i].code){ | |
| 456 | + this.infoData.place = this.areas[i].name; | |
| 457 | + } | |
| 458 | + } | |
| 459 | + }); | |
| 237 | 460 | }, |
| 238 | 461 | methods:{ |
| 462 | + downloadFile(path) { | |
| 463 | + window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(path); | |
| 464 | + }, | |
| 465 | + | |
| 239 | 466 | getInfo() { |
| 240 | - const id = this.businessKey.split(":")[1]; | |
| 467 | + let id; | |
| 468 | + if(this.businessKey.split(":").length == 2){ | |
| 469 | + id = this.businessKey.split(":")[1]; | |
| 470 | + }else{ | |
| 471 | + id = this.businessKey; | |
| 472 | + } | |
| 473 | + | |
| 241 | 474 | getThreestep(id).then(response => { |
| 242 | 475 | this.infoData = response.data; |
| 243 | 476 | |
| 244 | 477 | this.selectType(this.infoData.type); |
| 245 | 478 | this.infoData.type = this.infoData.type + ""; |
| 246 | 479 | |
| 480 | + this.loading = false; | |
| 247 | 481 | |
| 248 | - if (this.infoData.companys) { | |
| 249 | - let arr = this.infoData.companys.split(','); | |
| 250 | - this.infoData.companys = []; | |
| 251 | - | |
| 252 | - this.infoData.companys.push(arr) | |
| 482 | + for(let i =0;i<this.areas.length;i++){ | |
| 483 | + if(Number(this.infoData.place) == this.areas[i].code){ | |
| 484 | + this.infoData.place = this.areas[i].name; | |
| 485 | + } | |
| 253 | 486 | } |
| 254 | - if (this.infoData.companyTrucks) { | |
| 255 | 487 | |
| 256 | - let arr = this.infoData.companyTrucks.split(','); | |
| 257 | 488 | |
| 258 | - this.infoData.companyTrucks = []; | |
| 259 | 489 | |
| 260 | - this.infoData.companyTrucks.push(arr) | |
| 261 | - } | |
| 262 | 490 | }); |
| 263 | 491 | }, |
| 264 | 492 | selectType(value) { | ... | ... |
trash-ui/src/views/daily/daily/index.vue renamed to trash-ui/src/views/business/truckActivate/index.vue
| 1 | 1 | <template> |
| 2 | 2 | <div class="app-container"> |
| 3 | - <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"> | |
| 4 | - <el-form-item label="ๆ ้ข" prop="headline"> | |
| 3 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> | |
| 4 | + <el-form-item label="ๆๅฑไผไธ" prop="company"> | |
| 5 | 5 | <el-input |
| 6 | - v-model="queryParams.headline" | |
| 7 | - placeholder="่ฏท่พๅ ฅๆ ้ข" | |
| 6 | + v-model="queryParams.company" | |
| 7 | + placeholder="่ฏท่พๅ ฅๆๅฑไผไธ" | |
| 8 | 8 | clearable |
| 9 | 9 | size="small" |
| 10 | 10 | @keyup.enter.native="handleQuery" |
| 11 | 11 | /> |
| 12 | 12 | </el-form-item> |
| 13 | + <el-form-item label="่ฝฆ็ๅท | |
| 14 | +" prop="licensePlate"> | |
| 15 | + <el-input | |
| 16 | + v-model="queryParams.licensePlate" | |
| 17 | + placeholder="่ฏท่พๅ ฅ่ฝฆ็ๅท | |
| 18 | +" | |
| 19 | + clearable | |
| 20 | + size="small" | |
| 21 | + @keyup.enter.native="handleQuery" | |
| 22 | + /> | |
| 23 | + </el-form-item> | |
| 24 | + <el-form-item label="ๆฟๆดปๆถ้ด" prop="activateTime"> | |
| 25 | + <el-date-picker clearable size="small" style="width: 200px" | |
| 26 | + v-model="queryParams.activateTime" | |
| 27 | + type="date" | |
| 28 | + value-format="yyyy-MM-dd" | |
| 29 | + placeholder="้ๆฉๆฟๆดปๆถ้ด"> | |
| 30 | + </el-date-picker> | |
| 31 | + </el-form-item> | |
| 13 | 32 | <el-form-item> |
| 14 | - <el-button type="cyan" size="mini" @click="handleQuery">ๆ็ดข</el-button> | |
| 33 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">ๆ็ดข</el-button> | |
| 34 | + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">้็ฝฎ</el-button> | |
| 15 | 35 | </el-form-item> |
| 16 | 36 | </el-form> |
| 17 | 37 | |
| ... | ... | @@ -19,60 +39,58 @@ |
| 19 | 39 | <el-col :span="1.5"> |
| 20 | 40 | <el-button |
| 21 | 41 | type="primary" |
| 42 | + icon="el-icon-plus" | |
| 22 | 43 | size="mini" |
| 23 | 44 | @click="handleAdd" |
| 24 | - v-hasPermi="['report:daily:add']" | |
| 25 | - >ๆฐๅข</el-button> | |
| 26 | - </el-col> | |
| 27 | - <el-col :span="1.5"> | |
| 28 | - <el-button | |
| 29 | - type="success" | |
| 30 | - size="mini" | |
| 31 | - :disabled="single" | |
| 32 | - @click="handleUpdate" | |
| 33 | - v-hasPermi="['report:daily:edit']" | |
| 34 | - >ไฟฎๆน</el-button> | |
| 35 | - </el-col> | |
| 36 | - <el-col :span="1.5"> | |
| 37 | - <el-button | |
| 38 | - type="danger" | |
| 39 | - size="mini" | |
| 40 | - :disabled="multiple" | |
| 41 | - @click="handleDelete" | |
| 42 | - v-hasPermi="['report:daily:remove']" | |
| 43 | - >ๅ ้ค</el-button> | |
| 45 | + v-hasPermi="['business:truckActivate:add']" | |
| 46 | + >ๆๅจๆฟๆดป</el-button> | |
| 44 | 47 | </el-col> |
| 45 | 48 | <el-col :span="1.5"> |
| 46 | 49 | <el-button |
| 47 | 50 | type="warning" |
| 51 | + icon="el-icon-download" | |
| 48 | 52 | size="mini" |
| 49 | 53 | @click="handleExport" |
| 50 | - v-hasPermi="['report:daily:export']" | |
| 54 | + v-hasPermi="['business:truckActivate:export']" | |
| 51 | 55 | >ๅฏผๅบ</el-button> |
| 52 | 56 | </el-col> |
| 53 | - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | |
| 54 | 57 | </el-row> |
| 55 | 58 | |
| 56 | - <el-table v-loading="loading" :data="dailyList" @selection-change="handleSelectionChange"> | |
| 57 | - <el-table-column type="selection" width="55" align="center" /> | |
| 58 | - <el-table-column label="ๆ ้ข" align="center" prop="headline" /> | |
| 59 | - <el-table-column label="ๅกซๅไบบ" align="center" prop="writer" /> | |
| 60 | - <el-table-column label="ๅกซๅๆถ้ด" align="center" prop="writeTime" width="180"> | |
| 59 | + <el-table v-loading="loading" :data="truckActivateList" @selection-change="handleSelectionChange"> | |
| 60 | + <el-table-column label="ๅบๅท" align="center" prop="id" /> | |
| 61 | + <el-table-column label="ๆๅฑไผไธ" align="center" prop="company" /> | |
| 62 | + <el-table-column label="่ฝฆ็ๅท" align="center" prop="licensePlate" /> | |
| 63 | + <el-table-column label="ๆๅฑๅทฅๅฐ" align="center" prop="construction" /> | |
| 64 | + <el-table-column label="ๆถ็บณๅบ" align="center" prop="earthsite" /> | |
| 65 | + <el-table-column label="ๆฟๆดปๆถ้ด" align="center" prop="activateTime" width="180"> | |
| 61 | 66 | <template slot-scope="scope"> |
| 62 | - <span>{{ parseTime(scope.row.writeTime, '{y}-{m}-{d}') }}</span> | |
| 67 | + <span>{{ parseTime(scope.row.activateTime, '{y}-{m}-{d}') }}</span> | |
| 63 | 68 | </template> |
| 64 | 69 | </el-table-column> |
| 65 | - <el-table-column label="ๆไฝ" align="center" class-name="small-padding fixed-width"> | |
| 70 | + <el-table-column label="ๆฟๆดป็ถๆ" prop="objectId"> | |
| 71 | + <template slot-scope="scope"> | |
| 72 | + <span>{{ scope.row.activateTime==null ? "ๆชๆฟๆดป" : "ๆฟๆดป" }}</span> | |
| 73 | + </template> | |
| 74 | + </el-table-column> | |
| 75 | + | |
| 76 | + <!-- <el-table-column label="ๆไฝ" align="center" class-name="small-padding fixed-width"> | |
| 66 | 77 | <template slot-scope="scope"> |
| 67 | 78 | <el-button |
| 68 | 79 | size="mini" |
| 69 | 80 | type="text" |
| 70 | - @click="handleById(scope.row)" | |
| 71 | - v-hasPermi="['report:daily:query']"> | |
| 72 | - ๆฅ็ | |
| 73 | - </el-button> | |
| 81 | + icon="el-icon-edit" | |
| 82 | + @click="handleUpdate(scope.row)" | |
| 83 | + v-hasPermi="['business:truckActivate:edit']" | |
| 84 | + >ไฟฎๆน</el-button> | |
| 85 | + <el-button | |
| 86 | + size="mini" | |
| 87 | + type="text" | |
| 88 | + icon="el-icon-delete" | |
| 89 | + @click="handleDelete(scope.row)" | |
| 90 | + v-hasPermi="['business:truckActivate:remove']" | |
| 91 | + >ๅ ้ค</el-button> | |
| 74 | 92 | </template> |
| 75 | - </el-table-column> | |
| 93 | + </el-table-column> --> | |
| 76 | 94 | </el-table> |
| 77 | 95 | |
| 78 | 96 | <pagination |
| ... | ... | @@ -83,25 +101,22 @@ |
| 83 | 101 | @pagination="getList" |
| 84 | 102 | /> |
| 85 | 103 | |
| 104 | + <!-- ๆทปๅ ๆไฟฎๆน่ฝฆ่พๆฟๆดปๅฏน่ฏๆก --> | |
| 86 | 105 | <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| 87 | - <el-form ref="form" :model="form" :rules="rules" label-width="120px"> | |
| 88 | - <el-form-item label="ๆ ้ข" prop="headline"> | |
| 89 | - <el-input v-model="form.headline" placeholder="่ฏท่พๅ ฅๆ ้ข" /> | |
| 90 | - </el-form-item> | |
| 91 | - <el-form-item label="ๅกซๅไบบ" prop="writer"> | |
| 92 | - <el-input v-model="form.writer" placeholder="่ฏท่พๅ ฅๅกซๅไบบ" /> | |
| 106 | + <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | |
| 107 | + <el-form-item label="ๆๅฑไผไธ" prop="company"> | |
| 108 | + <el-select v-model="form.company" filterable multiple clearable reserve-keyword> | |
| 109 | + <el-option v-for="item in companyList" :label="item.name" :value="item.name" :key="item.id" /> | |
| 110 | + </el-select> | |
| 93 | 111 | </el-form-item> |
| 94 | - <el-form-item label="ๅกซๅๆถ้ด" prop="writeTime"> | |
| 95 | - <el-date-picker clearable size="small" style="width: 200px" | |
| 96 | - v-model="form.writeTime" | |
| 97 | - type="date" | |
| 98 | - value-format="yyyy-MM-dd" | |
| 99 | - placeholder="้ๆฉๅกซๅๆถ้ด"> | |
| 100 | - </el-date-picker> | |
| 112 | + <el-form-item label="่ฝฆ็ๅท" prop="licensePlate"> | |
| 113 | + <el-input v-model="form.licensePlate" placeholder="่ฏท่พๅ ฅ่ฝฆ็ๅท" /> | |
| 101 | 114 | </el-form-item> |
| 102 | - <el-form-item label="ๅ ๅฎน"> | |
| 103 | - <editor v-model="form.content" :min-height="192"/> | |
| 115 | + | |
| 116 | + <el-form-item label="ๆๅฑๅทฅๅฐ" prop="construction"> | |
| 117 | + <el-input v-model="form.construction" placeholder="่ฏท่พๅ ฅๆๅฑๅทฅๅฐ" disabled/> | |
| 104 | 118 | </el-form-item> |
| 119 | + | |
| 105 | 120 | </el-form> |
| 106 | 121 | <div slot="footer" class="dialog-footer"> |
| 107 | 122 | <el-button type="primary" @click="submitForm">็กฎ ๅฎ</el-button> |
| ... | ... | @@ -112,12 +127,15 @@ |
| 112 | 127 | </template> |
| 113 | 128 | |
| 114 | 129 | <script> |
| 115 | -import { listDaily, getDaily, delDaily, addDaily, updateDaily, exportDaily } from "@/api/daily/daily"; | |
| 116 | -import Editor from '@/components/Editor'; | |
| 130 | +import { listTruckActivate, getTruckActivate, delTruckActivate, addTruckActivate, updateTruckActivate, exportTruckActivate } from "@/api/business/truckActivate"; | |
| 131 | + | |
| 132 | + import { | |
| 133 | + truckList, | |
| 134 | + companyList, | |
| 135 | + } from "@/api/dict"; | |
| 117 | 136 | |
| 118 | 137 | export default { |
| 119 | - name: "Daily", | |
| 120 | - components: { Editor }, | |
| 138 | + name: "TruckActivate", | |
| 121 | 139 | data() { |
| 122 | 140 | return { |
| 123 | 141 | // ้ฎ็ฝฉๅฑ |
| ... | ... | @@ -132,17 +150,26 @@ export default { |
| 132 | 150 | showSearch: true, |
| 133 | 151 | // ๆปๆกๆฐ |
| 134 | 152 | total: 0, |
| 135 | - // ๆฅๆฅ่กจๆ ผๆฐๆฎ | |
| 136 | - dailyList: [], | |
| 153 | + // ่ฝฆ่พๆฟๆดป่กจๆ ผๆฐๆฎ | |
| 154 | + truckActivateList: [], | |
| 137 | 155 | // ๅผนๅบๅฑๆ ้ข |
| 138 | 156 | title: "", |
| 139 | 157 | // ๆฏๅฆๆพ็คบๅผนๅบๅฑ |
| 140 | 158 | open: false, |
| 159 | + companyList:[], | |
| 141 | 160 | // ๆฅ่ฏขๅๆฐ |
| 142 | 161 | queryParams: { |
| 143 | 162 | pageNum: 1, |
| 144 | 163 | pageSize: 10, |
| 145 | - headline: null, | |
| 164 | + company: null, | |
| 165 | + licensePlate: null, | |
| 166 | + time: null, | |
| 167 | + construction: null, | |
| 168 | + status: null, | |
| 169 | + earthsite: null, | |
| 170 | + objectId: null, | |
| 171 | + createType: null, | |
| 172 | + activateTime: null, | |
| 146 | 173 | }, |
| 147 | 174 | // ่กจๅๅๆฐ |
| 148 | 175 | form: {}, |
| ... | ... | @@ -155,14 +182,25 @@ export default { |
| 155 | 182 | this.getList(); |
| 156 | 183 | }, |
| 157 | 184 | methods: { |
| 158 | - /** ๆฅ่ฏขๆฅๆฅๅ่กจ */ | |
| 185 | + /** ๆฅ่ฏข่ฝฆ่พๆฟๆดปๅ่กจ */ | |
| 159 | 186 | getList() { |
| 160 | 187 | this.loading = true; |
| 161 | - listDaily(this.queryParams).then(response => { | |
| 162 | - this.dailyList = response.rows; | |
| 188 | + listTruckActivate(this.queryParams).then(response => { | |
| 189 | + this.truckActivateList = response.rows; | |
| 163 | 190 | this.total = response.total; |
| 164 | 191 | this.loading = false; |
| 165 | 192 | }); |
| 193 | + | |
| 194 | + let query = { | |
| 195 | + 'page':1, | |
| 196 | + 'size':9999, | |
| 197 | + 'creditStatus':0 | |
| 198 | + } | |
| 199 | + companyList(query).then(response => { | |
| 200 | + this.companyList = response.result.list; | |
| 201 | + }); | |
| 202 | + | |
| 203 | + | |
| 166 | 204 | }, |
| 167 | 205 | // ๅๆถๆ้ฎ |
| 168 | 206 | cancel() { |
| ... | ... | @@ -173,13 +211,17 @@ export default { |
| 173 | 211 | reset() { |
| 174 | 212 | this.form = { |
| 175 | 213 | id: null, |
| 176 | - headline: null, | |
| 177 | - writer: null, | |
| 178 | - writeTime: null, | |
| 179 | - content: null, | |
| 180 | - begintime: null, | |
| 181 | - endtime: null, | |
| 182 | - contentType: null | |
| 214 | + company: null, | |
| 215 | + licensePlate: null, | |
| 216 | + time: null, | |
| 217 | + construction: null, | |
| 218 | + status: 0, | |
| 219 | + earthsite: null, | |
| 220 | + objectId: null, | |
| 221 | + createBy: null, | |
| 222 | + createType: null, | |
| 223 | + activateTime: null, | |
| 224 | + createTime: null | |
| 183 | 225 | }; |
| 184 | 226 | this.resetForm("form"); |
| 185 | 227 | }, |
| ... | ... | @@ -203,26 +245,16 @@ export default { |
| 203 | 245 | handleAdd() { |
| 204 | 246 | this.reset(); |
| 205 | 247 | this.open = true; |
| 206 | - this.title = "ๆทปๅ ๆฅๆฅ"; | |
| 248 | + this.title = "ๆทปๅ ่ฝฆ่พๆฟๆดป"; | |
| 207 | 249 | }, |
| 208 | 250 | /** ไฟฎๆนๆ้ฎๆไฝ */ |
| 209 | 251 | handleUpdate(row) { |
| 210 | 252 | this.reset(); |
| 211 | 253 | const id = row.id || this.ids |
| 212 | - getDaily(id).then(response => { | |
| 213 | - this.form = response.data; | |
| 214 | - this.open = true; | |
| 215 | - this.title = "ไฟฎๆนๆฅๆฅ"; | |
| 216 | - }); | |
| 217 | - }, | |
| 218 | - /** ๆฅ็่ฏฆๆ ๆ้ฎๆไฝ*/ | |
| 219 | - handleById(row){ | |
| 220 | - this.reset(); | |
| 221 | - const id = row.id ||this.ids | |
| 222 | - getDaily(id).then(response => { | |
| 254 | + getTruckActivate(id).then(response => { | |
| 223 | 255 | this.form = response.data; |
| 224 | 256 | this.open = true; |
| 225 | - this.title = "ๆฅ็่ฏฆๆ ไฟกๆฏ"; | |
| 257 | + this.title = "ไฟฎๆน่ฝฆ่พๆฟๆดป"; | |
| 226 | 258 | }); |
| 227 | 259 | }, |
| 228 | 260 | /** ๆไบคๆ้ฎ */ |
| ... | ... | @@ -230,13 +262,13 @@ export default { |
| 230 | 262 | this.$refs["form"].validate(valid => { |
| 231 | 263 | if (valid) { |
| 232 | 264 | if (this.form.id != null) { |
| 233 | - updateDaily(this.form).then(response => { | |
| 265 | + updateTruckActivate(this.form).then(response => { | |
| 234 | 266 | this.msgSuccess("ไฟฎๆนๆๅ"); |
| 235 | 267 | this.open = false; |
| 236 | 268 | this.getList(); |
| 237 | 269 | }); |
| 238 | 270 | } else { |
| 239 | - addDaily(this.form).then(response => { | |
| 271 | + addTruckActivate(this.form).then(response => { | |
| 240 | 272 | this.msgSuccess("ๆฐๅขๆๅ"); |
| 241 | 273 | this.open = false; |
| 242 | 274 | this.getList(); |
| ... | ... | @@ -248,29 +280,29 @@ export default { |
| 248 | 280 | /** ๅ ้คๆ้ฎๆไฝ */ |
| 249 | 281 | handleDelete(row) { |
| 250 | 282 | const ids = row.id || this.ids; |
| 251 | - this.$confirm('ๆฏๅฆ็กฎ่ฎคๅ ้คๆฅๆฅ็ผๅทไธบ"' + ids + '"็ๆฐๆฎ้กน?', "่ญฆๅ", { | |
| 252 | - confirmButtonText: "็กฎๅฎ", | |
| 253 | - cancelButtonText: "ๅๆถ", | |
| 254 | - type: "warning" | |
| 255 | - }).then(function() { | |
| 256 | - return delDaily(ids); | |
| 257 | - }).then(() => { | |
| 258 | - this.getList(); | |
| 259 | - this.msgSuccess("ๅ ้คๆๅ"); | |
| 260 | - }) | |
| 283 | + this.$confirm('ๆฏๅฆ็กฎ่ฎคๅ ้ค่ฝฆ่พๆฟๆดป็ผๅทไธบ"' + ids + '"็ๆฐๆฎ้กน?', "่ญฆๅ", { | |
| 284 | + confirmButtonText: "็กฎๅฎ", | |
| 285 | + cancelButtonText: "ๅๆถ", | |
| 286 | + type: "warning" | |
| 287 | + }).then(function() { | |
| 288 | + return delTruckActivate(ids); | |
| 289 | + }).then(() => { | |
| 290 | + this.getList(); | |
| 291 | + this.msgSuccess("ๅ ้คๆๅ"); | |
| 292 | + }) | |
| 261 | 293 | }, |
| 262 | 294 | /** ๅฏผๅบๆ้ฎๆไฝ */ |
| 263 | 295 | handleExport() { |
| 264 | 296 | const queryParams = this.queryParams; |
| 265 | - this.$confirm('ๆฏๅฆ็กฎ่ฎคๅฏผๅบๆๆๆฅๆฅๆฐๆฎ้กน?', "่ญฆๅ", { | |
| 266 | - confirmButtonText: "็กฎๅฎ", | |
| 267 | - cancelButtonText: "ๅๆถ", | |
| 268 | - type: "warning" | |
| 269 | - }).then(function() { | |
| 270 | - return exportDaily(queryParams); | |
| 271 | - }).then(response => { | |
| 272 | - this.download(response.msg); | |
| 273 | - }) | |
| 297 | + this.$confirm('ๆฏๅฆ็กฎ่ฎคๅฏผๅบๆๆ่ฝฆ่พๆฟๆดปๆฐๆฎ้กน?', "่ญฆๅ", { | |
| 298 | + confirmButtonText: "็กฎๅฎ", | |
| 299 | + cancelButtonText: "ๅๆถ", | |
| 300 | + type: "warning" | |
| 301 | + }).then(function() { | |
| 302 | + return exportTruckActivate(queryParams); | |
| 303 | + }).then(response => { | |
| 304 | + this.download(response.msg); | |
| 305 | + }) | |
| 274 | 306 | } |
| 275 | 307 | } |
| 276 | 308 | }; | ... | ... |
trash-ui/src/views/daily/Weeklys/index.vue deleted
100644 โ 0
trash-ui/src/views/daily/information_sharing/index.vue
| ... | ... | @@ -93,31 +93,47 @@ |
| 93 | 93 | /> |
| 94 | 94 | |
| 95 | 95 | <!-- ๆทปๅ ๆไฟฎๆนไฟกๆฏๅ ฑไบซๅฏน่ฏๆก --> |
| 96 | - <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body> | |
| 96 | + <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> | |
| 97 | 97 | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| 98 | 98 | <el-row type="flex" justify="center"> |
| 99 | 99 | <el-col> |
| 100 | 100 | <el-form-item label="ๆฐๆฎๆ ้ข" prop="dataHeader"> |
| 101 | - <el-input v-model="form.dataHeader" placeholder="่ฏท่พๅ ฅๆฐๆฎๆ ้ข" style="width: 200px"/> | |
| 102 | - </el-form-item> | |
| 103 | - </el-col> | |
| 104 | - <el-col> | |
| 105 | - <el-form-item label="่ฐๅ้จ้จ" prop="retrieveDepartment"> | |
| 106 | - <el-input v-model="form.retrieveDepartment" placeholder="่ฏท่พๅ ฅ่ฐๅ้จ้จ" style="width: 200px"/> | |
| 101 | + <el-input v-model="form.dataHeader" placeholder="่ฏท่พๅ ฅๆฐๆฎๆ ้ข" /> | |
| 107 | 102 | </el-form-item> |
| 108 | 103 | </el-col> |
| 109 | 104 | </el-row> |
| 105 | + <el-row> | |
| 106 | + <el-col :span="12"> | |
| 107 | + <el-form-item label="่ฐๅ้จ้จ" prop="retrieveDepartment"> | |
| 108 | + <el-input v-model="form.retrieveDepartment" placeholder="่ฏท่พๅ ฅ่ฐๅ้จ้จ" /> | |
| 109 | + </el-form-item> | |
| 110 | + </el-col> | |
| 111 | + <el-col :span="12"> | |
| 110 | 112 | <el-form-item label="่ฐๅๆถ้ด" prop="retrieveTime"> |
| 111 | - <el-date-picker clearable size="small" style="width: 200px" | |
| 113 | + <el-date-picker clearable size="small" | |
| 112 | 114 | v-model="form.retrieveTime" |
| 113 | 115 | type="date" |
| 114 | 116 | value-format="yyyy-MM-dd" |
| 115 | 117 | placeholder="้ๆฉ่ฐๅๆถ้ด"> |
| 116 | 118 | </el-date-picker> |
| 117 | 119 | </el-form-item> |
| 120 | + </el-col> | |
| 121 | + </el-row> | |
| 118 | 122 | <el-form-item label="่ฐๅๅ ๅฎน"> |
| 119 | 123 | <editor v-model="form.retrieveContent" :min-height="192"/> |
| 120 | 124 | </el-form-item> |
| 125 | + <a v-if="form.attachmentLink!='' " style="color: blue;margin-left: 10px;" @click="download">้ไปถไธ่ฝฝ</a> <a style="color: red;" @click="form.attachmentLink='';" v-if="form.attachmentLink!=''">ๅ ้ค</a> | |
| 126 | + <el-row> | |
| 127 | + <el-col :span="6"> | |
| 128 | + <el-form-item label="้ไปถ" v-if="form.attachmentLink==''"> | |
| 129 | + <el-upload :headers="upload.headers" :action="upload.url" :file-list="fileList" :show-file-list="false" | |
| 130 | + :on-success="uploadSuccess" > | |
| 131 | + <el-button size="small" type="primary">้ๆฉ้ไปถ</el-button> | |
| 132 | + <el-input v-model="form.attachmentLink" disabled type="hidden"/> | |
| 133 | + </el-upload> | |
| 134 | + </el-form-item> | |
| 135 | + </el-col> | |
| 136 | + </el-row> | |
| 121 | 137 | </el-form> |
| 122 | 138 | <div slot="footer" class="dialog-footer"> |
| 123 | 139 | <el-button type="primary" @click="submitForm">็กฎ ๅฎ</el-button> |
| ... | ... | @@ -131,6 +147,10 @@ |
| 131 | 147 | import { listInformation_sharing, getInformation_sharing, delInformation_sharing, addInformation_sharing, updateInformation_sharing, exportInformation_sharing } from "@/api/daily/information_sharing"; |
| 132 | 148 | import Editor from '@/components/Editor'; |
| 133 | 149 | import {getToollist} from "@/api/daily/toollist"; |
| 150 | + import { | |
| 151 | + getToken | |
| 152 | + } from "@/utils/auth"; | |
| 153 | + | |
| 134 | 154 | |
| 135 | 155 | export default { |
| 136 | 156 | name: "Information_sharing", |
| ... | ... | @@ -163,17 +183,38 @@ export default { |
| 163 | 183 | dataHeader: null, |
| 164 | 184 | retrieveDepartment: null, |
| 165 | 185 | }, |
| 186 | + upload: { | |
| 187 | + // ๆฏๅฆๆพ็คบๅผนๅบๅฑ๏ผ็จๆทๅฏผๅ ฅ๏ผ | |
| 188 | + open: false, | |
| 189 | + // ๅผนๅบๅฑๆ ้ข๏ผ็จๆทๅฏผๅ ฅ๏ผ | |
| 190 | + title: "", | |
| 191 | + // ๆฏๅฆ็ฆ็จไธไผ | |
| 192 | + isUploading: false, | |
| 193 | + // ่ฎพ็ฝฎไธไผ ็่ฏทๆฑๅคด้จ | |
| 194 | + headers: { | |
| 195 | + Authorization: "Bearer " + getToken() | |
| 196 | + }, | |
| 197 | + // ไธไผ ็ๅฐๅ | |
| 198 | + url: process.env.VUE_APP_BASE_API + "/business/threestep/upload", | |
| 199 | + }, | |
| 166 | 200 | // ่กจๅๅๆฐ |
| 167 | - form: {}, | |
| 201 | + form: { | |
| 202 | + attachmentLink:'', | |
| 203 | + | |
| 204 | + }, | |
| 168 | 205 | // ่กจๅๆ ก้ช |
| 169 | 206 | rules: { |
| 170 | - } | |
| 207 | + }, | |
| 208 | + fileList:[] | |
| 171 | 209 | }; |
| 172 | 210 | }, |
| 173 | 211 | created() { |
| 174 | 212 | this.getList(); |
| 175 | 213 | }, |
| 176 | 214 | methods: { |
| 215 | + download(){ | |
| 216 | + window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(this.form.attachmentLink) | |
| 217 | + }, | |
| 177 | 218 | /** ๆฅ่ฏขไฟกๆฏๅ ฑไบซๅ่กจ */ |
| 178 | 219 | getList() { |
| 179 | 220 | this.loading = true; |
| ... | ... | @@ -196,11 +237,19 @@ export default { |
| 196 | 237 | retrieveDepartment: null, |
| 197 | 238 | retrieveTime: null, |
| 198 | 239 | retrieveContent: null, |
| 199 | - attachmentLink: null, | |
| 240 | + attachmentLink: '', | |
| 200 | 241 | informationLink: null |
| 201 | 242 | }; |
| 202 | 243 | this.resetForm("form"); |
| 203 | 244 | }, |
| 245 | + uploadSuccess(res, file, fileList) { | |
| 246 | + this.fileList = []; | |
| 247 | + | |
| 248 | + this.fileList.push(file); | |
| 249 | + | |
| 250 | + this.form.attachmentLink = res; | |
| 251 | + }, | |
| 252 | + | |
| 204 | 253 | /** ๆ็ดขๆ้ฎๆไฝ */ |
| 205 | 254 | handleQuery() { |
| 206 | 255 | this.queryParams.pageNum = 1; |
| ... | ... | @@ -229,6 +278,9 @@ export default { |
| 229 | 278 | const id = row.id || this.ids |
| 230 | 279 | getInformation_sharing(id).then(response => { |
| 231 | 280 | this.form = response.data; |
| 281 | + if(this.form.attachmentLink == undefined){ | |
| 282 | + this.form.attachmentLink = ''; | |
| 283 | + } | |
| 232 | 284 | this.open = true; |
| 233 | 285 | this.title = "ไฟฎๆนไฟกๆฏๅ ฑไบซ"; |
| 234 | 286 | }); |
| ... | ... | @@ -239,6 +291,9 @@ export default { |
| 239 | 291 | const id = row.id ||this.ids |
| 240 | 292 | getInformation_sharing(id).then(response => { |
| 241 | 293 | this.form = response.data; |
| 294 | + if(this.form.attachmentLink == undefined){ | |
| 295 | + this.form.attachmentLink = ''; | |
| 296 | + } | |
| 242 | 297 | this.open = true; |
| 243 | 298 | this.title = "ๆฅ็่ฏฆๆ ไฟกๆฏ"; |
| 244 | 299 | }); | ... | ... |
trash-ui/src/views/daily/monthly/index.vue deleted
100644 โ 0
| 1 | -<template> | |
| 2 | - <div class="app-container"> | |
| 3 | - <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> | |
| 4 | - <el-form-item label="ๆ ้ข" prop="headline"> | |
| 5 | - <el-input | |
| 6 | - v-model="queryParams.headline" | |
| 7 | - placeholder="่ฏท่พๅ ฅๆ ้ข" | |
| 8 | - clearable | |
| 9 | - size="small" | |
| 10 | - @keyup.enter.native="handleQuery" | |
| 11 | - /> | |
| 12 | - </el-form-item> | |
| 13 | - <el-form-item> | |
| 14 | - <el-button type="cyan" size="mini" @click="handleQuery">ๆ็ดข</el-button> | |
| 15 | - </el-form-item> | |
| 16 | - </el-form> | |
| 17 | - | |
| 18 | - <el-row :gutter="10" class="mb8"> | |
| 19 | - <el-col :span="1.5"> | |
| 20 | - <el-button | |
| 21 | - type="primary" | |
| 22 | - size="mini" | |
| 23 | - @click="handleAdd" | |
| 24 | - v-hasPermi="['report:monthly:add']" | |
| 25 | - >ๆฐๅข</el-button> | |
| 26 | - </el-col> | |
| 27 | - <el-col :span="1.5"> | |
| 28 | - <el-button | |
| 29 | - type="success" | |
| 30 | - size="mini" | |
| 31 | - :disabled="single" | |
| 32 | - @click="handleUpdate" | |
| 33 | - v-hasPermi="['report:monthly:edit']" | |
| 34 | - >ไฟฎๆน</el-button> | |
| 35 | - </el-col> | |
| 36 | - <el-col :span="1.5"> | |
| 37 | - <el-button | |
| 38 | - type="danger" | |
| 39 | - size="mini" | |
| 40 | - :disabled="multiple" | |
| 41 | - @click="handleDelete" | |
| 42 | - v-hasPermi="['report:monthly:remove']" | |
| 43 | - >ๅ ้ค</el-button> | |
| 44 | - </el-col> | |
| 45 | - <el-col :span="1.5"> | |
| 46 | - <el-button | |
| 47 | - type="warning" | |
| 48 | - size="mini" | |
| 49 | - @click="handleExport" | |
| 50 | - v-hasPermi="['report:monthly:export']" | |
| 51 | - >ๅฏผๅบ</el-button> | |
| 52 | - </el-col> | |
| 53 | - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | |
| 54 | - </el-row> | |
| 55 | - | |
| 56 | - <el-table v-loading="loading" :data="monthlyList" @selection-change="handleSelectionChange"> | |
| 57 | - <el-table-column type="selection" width="55" align="center" /> | |
| 58 | - <el-table-column label="ๆ ้ข" align="center" prop="headline" /> | |
| 59 | - <el-table-column label="ๅกซๅไบบ" align="center" prop="writer" /> | |
| 60 | - <el-table-column label="ๅกซๅๆถ้ด" align="center" prop="writeTime" width="180"> | |
| 61 | - <template slot-scope="scope"> | |
| 62 | - <span>{{ parseTime(scope.row.writeTime, '{y}-{m}-{d}') }}</span> | |
| 63 | - </template> | |
| 64 | - </el-table-column> | |
| 65 | - <el-table-column label="ๆไฝ" align="center" class-name="small-padding fixed-width"> | |
| 66 | - <template slot-scope="scope"> | |
| 67 | - <el-button | |
| 68 | - size="mini" | |
| 69 | - type="text" | |
| 70 | - @click="handleById(scope.row)" | |
| 71 | - v-hasPermi="['report:monthly:query']"> | |
| 72 | - ๆฅ็ | |
| 73 | - </el-button> | |
| 74 | - </template> | |
| 75 | - </el-table-column> | |
| 76 | - </el-table> | |
| 77 | - | |
| 78 | - <pagination | |
| 79 | - v-show="total>0" | |
| 80 | - :total="total" | |
| 81 | - :page.sync="queryParams.pageNum" | |
| 82 | - :limit.sync="queryParams.pageSize" | |
| 83 | - @pagination="getList" | |
| 84 | - /> | |
| 85 | - | |
| 86 | - <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body> | |
| 87 | - <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | |
| 88 | - <el-row type="flex" justify="center"> | |
| 89 | - <el-col> | |
| 90 | - <el-form-item label="ๅจๆ" prop="begintime"> | |
| 91 | - <el-date-picker clearable size="small" style="width: 200px" | |
| 92 | - v-model="form.begintime" | |
| 93 | - type="date" | |
| 94 | - value-format="yyyy-MM-dd" | |
| 95 | - placeholder="้ๆฉๅผๅงๆถ้ด"> | |
| 96 | - </el-date-picker> | |
| 97 | - </el-form-item> | |
| 98 | - </el-col> | |
| 99 | - <el-col> | |
| 100 | - <el-form-item label="่ณ" prop="endtime" > | |
| 101 | - <el-date-picker clearable size="small" style="width: 200px" | |
| 102 | - v-model="form.endtime" | |
| 103 | - type="date" | |
| 104 | - value-format="yyyy-MM-dd" | |
| 105 | - placeholder="้ๆฉ็ปๆๆถ้ด"> | |
| 106 | - </el-date-picker> | |
| 107 | - </el-form-item> | |
| 108 | - </el-col> | |
| 109 | - </el-row> | |
| 110 | - <el-row type="flex" justify="center"> | |
| 111 | - <el-col> | |
| 112 | - <el-form-item label="ๆ ้ข" prop="headline"> | |
| 113 | - <el-input v-model="form.headline" placeholder="่ฏท่พๅ ฅๆ ้ข" style="width: 200px"/> | |
| 114 | - </el-form-item> | |
| 115 | - </el-col> | |
| 116 | - <el-col> | |
| 117 | - <el-form-item label="ๅกซๅไบบ" prop="writer"> | |
| 118 | - <el-input v-model="form.writer" placeholder="่ฏท่พๅ ฅๅกซๅไบบ" style="width: 200px"/> | |
| 119 | - </el-form-item> | |
| 120 | - </el-col> | |
| 121 | - </el-row> | |
| 122 | - <el-form-item label="ๅกซๅๆถ้ด" prop="writeTime"> | |
| 123 | - <el-date-picker clearable size="small" style="width: 200px" | |
| 124 | - v-model="form.writeTime" | |
| 125 | - type="date" | |
| 126 | - value-format="yyyy-MM-dd" | |
| 127 | - placeholder="้ๆฉๅกซๅๆถ้ด"> | |
| 128 | - </el-date-picker> | |
| 129 | - </el-form-item> | |
| 130 | - <el-form-item label="ๅ ๅฎน"> | |
| 131 | - <editor v-model="form.content" :min-height="192"/> | |
| 132 | - </el-form-item> | |
| 133 | - </el-form> | |
| 134 | - <div slot="footer" class="dialog-footer"> | |
| 135 | - <el-button type="primary" @click="submitForm">็กฎ ๅฎ</el-button> | |
| 136 | - <el-button @click="cancel">ๅ ๆถ</el-button> | |
| 137 | - </div> | |
| 138 | - </el-dialog> | |
| 139 | - </div> | |
| 140 | -</template> | |
| 141 | - | |
| 142 | -<script> | |
| 143 | -import { listMonthly, getMonthly, delMonthly, addMonthly, updateMonthly, exportMonthly } from "@/api/daily/monthly"; | |
| 144 | -import Editor from '@/components/Editor'; | |
| 145 | -export default { | |
| 146 | - name: "Monthly", | |
| 147 | - components: { Editor }, | |
| 148 | - data() { | |
| 149 | - return { | |
| 150 | - // ้ฎ็ฝฉๅฑ | |
| 151 | - loading: true, | |
| 152 | - // ้ไธญๆฐ็ป | |
| 153 | - ids: [], | |
| 154 | - // ้ๅไธช็ฆ็จ | |
| 155 | - single: true, | |
| 156 | - // ้ๅคไธช็ฆ็จ | |
| 157 | - multiple: true, | |
| 158 | - // ๆพ็คบๆ็ดขๆกไปถ | |
| 159 | - showSearch: true, | |
| 160 | - // ๆปๆกๆฐ | |
| 161 | - total: 0, | |
| 162 | - // ๆๆฅ่กจๆ ผๆฐๆฎ | |
| 163 | - monthlyList: [], | |
| 164 | - // ๅผนๅบๅฑๆ ้ข | |
| 165 | - title: "", | |
| 166 | - // ๆฏๅฆๆพ็คบๅผนๅบๅฑ | |
| 167 | - open: false, | |
| 168 | - // ๆฅ่ฏขๅๆฐ | |
| 169 | - queryParams: { | |
| 170 | - pageNum: 1, | |
| 171 | - pageSize: 10, | |
| 172 | - headline: null, | |
| 173 | - }, | |
| 174 | - // ่กจๅๅๆฐ | |
| 175 | - form: {}, | |
| 176 | - // ่กจๅๆ ก้ช | |
| 177 | - rules: { | |
| 178 | - } | |
| 179 | - }; | |
| 180 | - }, | |
| 181 | - created() { | |
| 182 | - this.getList(); | |
| 183 | - }, | |
| 184 | - methods: { | |
| 185 | - /** ๆฅ่ฏขๆๆฅๅ่กจ */ | |
| 186 | - getList() { | |
| 187 | - this.loading = true; | |
| 188 | - listMonthly(this.queryParams).then(response => { | |
| 189 | - this.monthlyList = response.rows; | |
| 190 | - this.total = response.total; | |
| 191 | - this.loading = false; | |
| 192 | - }); | |
| 193 | - }, | |
| 194 | - // ๅๆถๆ้ฎ | |
| 195 | - cancel() { | |
| 196 | - this.open = false; | |
| 197 | - this.reset(); | |
| 198 | - }, | |
| 199 | - // ่กจๅ้็ฝฎ | |
| 200 | - reset() { | |
| 201 | - this.form = { | |
| 202 | - id: null, | |
| 203 | - headline: null, | |
| 204 | - writer: null, | |
| 205 | - writeTime: null, | |
| 206 | - content: null, | |
| 207 | - begintime: null, | |
| 208 | - endtime: null, | |
| 209 | - contentType: null | |
| 210 | - }; | |
| 211 | - this.resetForm("form"); | |
| 212 | - }, | |
| 213 | - /** ๆ็ดขๆ้ฎๆไฝ */ | |
| 214 | - handleQuery() { | |
| 215 | - this.queryParams.pageNum = 1; | |
| 216 | - this.getList(); | |
| 217 | - }, | |
| 218 | - /** ้็ฝฎๆ้ฎๆไฝ */ | |
| 219 | - resetQuery() { | |
| 220 | - this.resetForm("queryForm"); | |
| 221 | - this.handleQuery(); | |
| 222 | - }, | |
| 223 | - // ๅค้ๆก้ไธญๆฐๆฎ | |
| 224 | - handleSelectionChange(selection) { | |
| 225 | - this.ids = selection.map(item => item.id) | |
| 226 | - this.single = selection.length!==1 | |
| 227 | - this.multiple = !selection.length | |
| 228 | - }, | |
| 229 | - /** ๆฐๅขๆ้ฎๆไฝ */ | |
| 230 | - handleAdd() { | |
| 231 | - this.reset(); | |
| 232 | - this.open = true; | |
| 233 | - this.title = "ๆทปๅ ๆๆฅ"; | |
| 234 | - }, | |
| 235 | - /** ไฟฎๆนๆ้ฎๆไฝ */ | |
| 236 | - handleUpdate(row) { | |
| 237 | - this.reset(); | |
| 238 | - const id = row.id || this.ids | |
| 239 | - getMonthly(id).then(response => { | |
| 240 | - this.form = response.data; | |
| 241 | - this.open = true; | |
| 242 | - this.title = "ไฟฎๆนๆๆฅ"; | |
| 243 | - }); | |
| 244 | - }, | |
| 245 | - /** ๆฅ็่ฏฆๆ ๆ้ฎๆไฝ*/ | |
| 246 | - handleById(row){ | |
| 247 | - this.reset(); | |
| 248 | - const id = row.id ||this.ids | |
| 249 | - getMonthly(id).then(response => { | |
| 250 | - this.form = response.data; | |
| 251 | - this.open = true; | |
| 252 | - this.title = "ๆฅ็่ฏฆๆ ไฟกๆฏ"; | |
| 253 | - }); | |
| 254 | - }, | |
| 255 | - /** ๆไบคๆ้ฎ */ | |
| 256 | - submitForm() { | |
| 257 | - this.$refs["form"].validate(valid => { | |
| 258 | - if (valid) { | |
| 259 | - if (this.form.id != null) { | |
| 260 | - updateMonthly(this.form).then(response => { | |
| 261 | - this.msgSuccess("ไฟฎๆนๆๅ"); | |
| 262 | - this.open = false; | |
| 263 | - this.getList(); | |
| 264 | - }); | |
| 265 | - } else { | |
| 266 | - addMonthly(this.form).then(response => { | |
| 267 | - this.msgSuccess("ๆฐๅขๆๅ"); | |
| 268 | - this.open = false; | |
| 269 | - this.getList(); | |
| 270 | - }); | |
| 271 | - } | |
| 272 | - } | |
| 273 | - }); | |
| 274 | - }, | |
| 275 | - /** ๅ ้คๆ้ฎๆไฝ */ | |
| 276 | - handleDelete(row) { | |
| 277 | - const ids = row.id || this.ids; | |
| 278 | - this.$confirm('ๆฏๅฆ็กฎ่ฎคๅ ้คๆๆฅ็ผๅทไธบ"' + ids + '"็ๆฐๆฎ้กน?', "่ญฆๅ", { | |
| 279 | - confirmButtonText: "็กฎๅฎ", | |
| 280 | - cancelButtonText: "ๅๆถ", | |
| 281 | - type: "warning" | |
| 282 | - }).then(function() { | |
| 283 | - return delMonthly(ids); | |
| 284 | - }).then(() => { | |
| 285 | - this.getList(); | |
| 286 | - this.msgSuccess("ๅ ้คๆๅ"); | |
| 287 | - }) | |
| 288 | - }, | |
| 289 | - /** ๅฏผๅบๆ้ฎๆไฝ */ | |
| 290 | - handleExport() { | |
| 291 | - const queryParams = this.queryParams; | |
| 292 | - this.$confirm('ๆฏๅฆ็กฎ่ฎคๅฏผๅบๆๆๆๆฅๆฐๆฎ้กน?', "่ญฆๅ", { | |
| 293 | - confirmButtonText: "็กฎๅฎ", | |
| 294 | - cancelButtonText: "ๅๆถ", | |
| 295 | - type: "warning" | |
| 296 | - }).then(function() { | |
| 297 | - return exportMonthly(queryParams); | |
| 298 | - }).then(response => { | |
| 299 | - this.download(response.msg); | |
| 300 | - }) | |
| 301 | - } | |
| 302 | - } | |
| 303 | -}; | |
| 304 | -</script> |
trash-ui/src/views/daily/report/day.vue
0 โ 100644
trash-ui/src/views/daily/report/index.vue
| 1 | 1 | <template> |
| 2 | 2 | <div class="app-container"> |
| 3 | 3 | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| 4 | - <el-form-item label="ๆ ้ข" prop="weeklyTitle"> | |
| 4 | + <el-form-item label="ๆ ้ข" prop="title"> | |
| 5 | 5 | <el-input |
| 6 | - v-model="queryParams.weeklyTitle" | |
| 6 | + v-model="queryParams.title" | |
| 7 | 7 | placeholder="่ฏท่พๅ ฅๆ ้ข" |
| 8 | 8 | clearable |
| 9 | 9 | size="small" |
| ... | ... | @@ -56,7 +56,7 @@ |
| 56 | 56 | <el-table v-loading="loading" :data="reportList" border @selection-change="handleSelectionChange"> |
| 57 | 57 | <el-table-column type="selection" width="55" align="center" /> |
| 58 | 58 | <!-- <el-table-column label="ไธป้ฎid" align="center" prop="id" />--> |
| 59 | - <el-table-column label="ๆ ้ข" align="center" prop="weeklyTitle" /> | |
| 59 | + <el-table-column label="ๆ ้ข" align="center" prop="title" /> | |
| 60 | 60 | <el-table-column label="ๅกซๅไบบ" align="center" prop="writer" /> |
| 61 | 61 | <el-table-column label="ๅกซๅๆถ้ด" align="center" prop="writeTime" width="180"> |
| 62 | 62 | <template slot-scope="scope"> |
| ... | ... | @@ -85,31 +85,55 @@ |
| 85 | 85 | /> |
| 86 | 86 | |
| 87 | 87 | <!-- ๆทปๅ ๆไฟฎๆนๅทฅไฝๆฅๆฅๅฏน่ฏๆก --> |
| 88 | - <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body> | |
| 88 | + <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> | |
| 89 | 89 | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| 90 | 90 | <el-row type="flex" justify="center"> |
| 91 | 91 | <el-col> |
| 92 | - <el-form-item label="ๆ ้ข" prop="weeklyTitle"> | |
| 93 | - <el-input v-model="form.weeklyTitle" placeholder="่ฏท่พๅ ฅๆ ้ข" style="width: 200px"/> | |
| 92 | + <el-form-item label="ๅจๆ" prop="startTime"> | |
| 93 | + <el-input v-model="form.startTime" placeholder="ๅจๆ" style="width: 300px"/> | |
| 94 | 94 | </el-form-item> |
| 95 | 95 | </el-col> |
| 96 | 96 | <el-col> |
| 97 | - <el-form-item label="ๅกซๅไบบ" prop="writer"> | |
| 98 | - <el-input v-model="form.writer" placeholder="่ฏท่พๅ ฅๅกซๅไบบ" style="width: 200px"/> | |
| 97 | + <el-form-item label="่ณ" prop="endTime"> | |
| 98 | + <el-input v-model="form.endTime" placeholder="" style="width: 300px"/> | |
| 99 | 99 | </el-form-item> |
| 100 | 100 | </el-col> |
| 101 | 101 | </el-row> |
| 102 | + <el-row type="flex" justify="center"> | |
| 103 | + <el-col> | |
| 102 | 104 | <el-form-item label="ๅกซๅๆถ้ด" prop="writeTime"> |
| 103 | - <el-date-picker clearable size="small" style="width: 200px" | |
| 105 | + <el-date-picker clearable size="small" style="width: 300px" | |
| 104 | 106 | v-model="form.writeTime" |
| 105 | 107 | type="date" |
| 106 | 108 | value-format="yyyy-MM-dd" |
| 107 | 109 | placeholder="้ๆฉๅกซๅๆถ้ด"> |
| 108 | 110 | </el-date-picker> |
| 109 | 111 | </el-form-item> |
| 110 | - <el-form-item label="ๆฅ่กจๅ ๅฎน"> | |
| 111 | - <editor v-model="form.reportContent" :min-height="192"/> | |
| 112 | - </el-form-item> | |
| 112 | + </el-col> | |
| 113 | + <el-col> | |
| 114 | + <el-form-item label="ๅกซๅไบบ" prop="writer"> | |
| 115 | + <el-input v-model="form.writer" placeholder="่ฏท่พๅ ฅๅกซๅไบบ" style="width: 300px"/> | |
| 116 | + </el-form-item> | |
| 117 | + </el-col> | |
| 118 | + </el-row> | |
| 119 | + <el-form-item label="ๆ ้ข" prop="title"> | |
| 120 | + <el-input v-model="form.title" placeholder="" /> | |
| 121 | + </el-form-item> | |
| 122 | + <el-form-item label="ๆฅ่กจๅ ๅฎน"> | |
| 123 | + <editor v-model="form.reportContent" :min-height="192"/> | |
| 124 | + </el-form-item> | |
| 125 | + <a v-if="form.attachmentLink!='' " style="color: blue;margin-left: 10px;" @click="download">้ไปถไธ่ฝฝ</a> <a style="color: red;" @click="form.attachmentLink='';" v-if="form.attachmentLink!=''">ๅ ้ค</a> | |
| 126 | + <el-row> | |
| 127 | + <el-col :span="6"> | |
| 128 | + <el-form-item label="้ไปถ" v-if="form.attachmentLink==''"> | |
| 129 | + <el-upload :headers="upload.headers" :action="upload.url" :file-list="fileList" :show-file-list="false" | |
| 130 | + :on-success="uploadSuccess" > | |
| 131 | + <el-button size="small" type="primary">้ๆฉ้ไปถ</el-button> | |
| 132 | + <el-input v-model="form.attachmentLink" disabled type="hidden"/> | |
| 133 | + </el-upload> | |
| 134 | + </el-form-item> | |
| 135 | + </el-col> | |
| 136 | + </el-row> | |
| 113 | 137 | </el-form> |
| 114 | 138 | <div slot="footer" class="dialog-footer"> |
| 115 | 139 | <el-button type="primary" @click="submitForm">็กฎ ๅฎ</el-button> |
| ... | ... | @@ -123,9 +147,17 @@ |
| 123 | 147 | import { listReport, getReport, delReport, addReport, updateReport, exportReport } from "@/api/daily/report"; |
| 124 | 148 | import Editor from '@/components/Editor'; |
| 125 | 149 | import {getInformation_sharing} from "@/api/daily/information_sharing"; |
| 150 | + import { | |
| 151 | + getToken | |
| 152 | + } from "@/utils/auth"; | |
| 126 | 153 | |
| 127 | 154 | export default { |
| 128 | 155 | name: "Report", |
| 156 | + props: { | |
| 157 | + type: { | |
| 158 | + type: Number | |
| 159 | + } | |
| 160 | + }, | |
| 129 | 161 | components: { Editor }, |
| 130 | 162 | data() { |
| 131 | 163 | return { |
| ... | ... | @@ -152,13 +184,32 @@ export default { |
| 152 | 184 | queryParams: { |
| 153 | 185 | pageNum: 1, |
| 154 | 186 | pageSize: 10, |
| 155 | - weeklyTitle: null, | |
| 187 | + title: null, | |
| 188 | + type:0, | |
| 156 | 189 | }, |
| 190 | + upload: { | |
| 191 | + // ๆฏๅฆๆพ็คบๅผนๅบๅฑ๏ผ็จๆทๅฏผๅ ฅ๏ผ | |
| 192 | + open: false, | |
| 193 | + // ๅผนๅบๅฑๆ ้ข๏ผ็จๆทๅฏผๅ ฅ๏ผ | |
| 194 | + title: "", | |
| 195 | + // ๆฏๅฆ็ฆ็จไธไผ | |
| 196 | + isUploading: false, | |
| 197 | + // ่ฎพ็ฝฎไธไผ ็่ฏทๆฑๅคด้จ | |
| 198 | + headers: { | |
| 199 | + Authorization: "Bearer " + getToken() | |
| 200 | + }, | |
| 201 | + // ไธไผ ็ๅฐๅ | |
| 202 | + url: process.env.VUE_APP_BASE_API + "/business/threestep/upload", | |
| 203 | + }, | |
| 204 | + titleType:"ๅทฅไฝๆฅ่กจ", | |
| 157 | 205 | // ่กจๅๅๆฐ |
| 158 | - form: {}, | |
| 206 | + form: { | |
| 207 | + attachmentLink:'', | |
| 208 | + }, | |
| 209 | + fileList:[], | |
| 159 | 210 | // ่กจๅๆ ก้ช |
| 160 | 211 | rules: { |
| 161 | - weeklyTitle: [ | |
| 212 | + title: [ | |
| 162 | 213 | { required: true, message: "ๆ ้ขไธ่ฝไธบ็ฉบ", trigger: "blur" } |
| 163 | 214 | ], |
| 164 | 215 | writer: [ |
| ... | ... | @@ -174,10 +225,28 @@ export default { |
| 174 | 225 | }; |
| 175 | 226 | }, |
| 176 | 227 | created() { |
| 228 | + this.queryParams.type = this.type; | |
| 229 | + | |
| 230 | + if(this.queryParams.type == 1){ | |
| 231 | + | |
| 232 | + this.titleType = "ๆฅๆฅ"; | |
| 233 | + | |
| 234 | + }else if(this.queryParams.type == 2){ | |
| 235 | + | |
| 236 | + this.titleType = "ๅจๆฅ"; | |
| 237 | + | |
| 238 | + }else if(this.queryParams.type == 3){ | |
| 239 | + | |
| 240 | + this.titleType = "ๆๆฅ"; | |
| 241 | + | |
| 242 | + } | |
| 177 | 243 | this.getList(); |
| 178 | 244 | }, |
| 179 | 245 | methods: { |
| 180 | - /** ๆฅ่ฏขๅทฅไฝๆฅๆฅๅ่กจ */ | |
| 246 | + | |
| 247 | + download(){ | |
| 248 | + window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(this.form.attachmentLink) | |
| 249 | + }, | |
| 181 | 250 | getList() { |
| 182 | 251 | this.loading = true; |
| 183 | 252 | listReport(this.queryParams).then(response => { |
| ... | ... | @@ -186,6 +255,13 @@ export default { |
| 186 | 255 | this.loading = false; |
| 187 | 256 | }); |
| 188 | 257 | }, |
| 258 | + uploadSuccess(res, file, fileList) { | |
| 259 | + this.fileList = []; | |
| 260 | + | |
| 261 | + this.fileList.push(file); | |
| 262 | + | |
| 263 | + this.form.attachmentLink = res; | |
| 264 | + }, | |
| 189 | 265 | // ๅๆถๆ้ฎ |
| 190 | 266 | cancel() { |
| 191 | 267 | this.open = false; |
| ... | ... | @@ -195,10 +271,11 @@ export default { |
| 195 | 271 | reset() { |
| 196 | 272 | this.form = { |
| 197 | 273 | id: null, |
| 198 | - weeklyTitle: null, | |
| 274 | + title: null, | |
| 199 | 275 | writer: null, |
| 200 | 276 | writeTime: null, |
| 201 | - reportContent: null | |
| 277 | + reportContent: null, | |
| 278 | + attachmentLink:'', | |
| 202 | 279 | }; |
| 203 | 280 | this.resetForm("form"); |
| 204 | 281 | }, |
| ... | ... | @@ -222,7 +299,8 @@ export default { |
| 222 | 299 | handleAdd() { |
| 223 | 300 | this.reset(); |
| 224 | 301 | this.open = true; |
| 225 | - this.title = "ๆทปๅ ๅทฅไฝๆฅๆฅ"; | |
| 302 | + this.title = "ๆทปๅ " + this.titleType; | |
| 303 | + console.log(this.form.attachmentLink); | |
| 226 | 304 | }, |
| 227 | 305 | /** ไฟฎๆนๆ้ฎๆไฝ */ |
| 228 | 306 | handleUpdate(row) { |
| ... | ... | @@ -230,8 +308,11 @@ export default { |
| 230 | 308 | const id = row.id || this.ids |
| 231 | 309 | getReport(id).then(response => { |
| 232 | 310 | this.form = response.data; |
| 311 | + if(this.form.attachmentLink == undefined){ | |
| 312 | + this.form.attachmentLink = ''; | |
| 313 | + } | |
| 233 | 314 | this.open = true; |
| 234 | - this.title = "ไฟฎๆนๅทฅไฝๆฅๆฅ"; | |
| 315 | + this.title = "ไฟฎๆน" + this.titleType; | |
| 235 | 316 | }); |
| 236 | 317 | }, |
| 237 | 318 | /** ๆฅ็่ฏฆๆ ๆ้ฎๆไฝ*/ |
| ... | ... | @@ -240,6 +321,9 @@ export default { |
| 240 | 321 | const id = row.id ||this.ids |
| 241 | 322 | getReport(id).then(response => { |
| 242 | 323 | this.form = response.data; |
| 324 | + if(this.form.attachmentLink == undefined){ | |
| 325 | + this.form.attachmentLink = ''; | |
| 326 | + } | |
| 243 | 327 | this.open = true; |
| 244 | 328 | this.title = "ๆฅ็่ฏฆๆ ไฟกๆฏ"; |
| 245 | 329 | }); |
| ... | ... | @@ -248,6 +332,7 @@ export default { |
| 248 | 332 | submitForm() { |
| 249 | 333 | this.$refs["form"].validate(valid => { |
| 250 | 334 | if (valid) { |
| 335 | + this.form.type = this.queryParams.type; | |
| 251 | 336 | if (this.form.id != null) { |
| 252 | 337 | updateReport(this.form).then(response => { |
| 253 | 338 | this.msgSuccess("ไฟฎๆนๆๅ"); |
| ... | ... | @@ -267,7 +352,7 @@ export default { |
| 267 | 352 | /** ๅ ้คๆ้ฎๆไฝ */ |
| 268 | 353 | handleDelete(row) { |
| 269 | 354 | const ids = row.id || this.ids; |
| 270 | - this.$confirm('ๆฏๅฆ็กฎ่ฎคๅ ้คๅทฅไฝๆฅๆฅ็ผๅทไธบ"' + ids + '"็ๆฐๆฎ้กน?', "่ญฆๅ", { | |
| 355 | + this.$confirm('ๆฏๅฆ็กฎ่ฎคๅ ้ค' + this.titleType + '็ผๅทไธบ"' + ids + '"็ๆฐๆฎ้กน?', "่ญฆๅ", { | |
| 271 | 356 | confirmButtonText: "็กฎๅฎ", |
| 272 | 357 | cancelButtonText: "ๅๆถ", |
| 273 | 358 | type: "warning" |
| ... | ... | @@ -281,7 +366,7 @@ export default { |
| 281 | 366 | /** ๅฏผๅบๆ้ฎๆไฝ */ |
| 282 | 367 | handleExport() { |
| 283 | 368 | const queryParams = this.queryParams; |
| 284 | - this.$confirm('ๆฏๅฆ็กฎ่ฎคๅฏผๅบๆๆๅทฅไฝๆฅๆฅๆฐๆฎ้กน?', "่ญฆๅ", { | |
| 369 | + this.$confirm('ๆฏๅฆ็กฎ่ฎคๅฏผๅบๆๆ' + this.titleType + 'ๆฐๆฎ้กน?', "่ญฆๅ", { | |
| 285 | 370 | confirmButtonText: "็กฎๅฎ", |
| 286 | 371 | cancelButtonText: "ๅๆถ", |
| 287 | 372 | type: "warning" | ... | ... |
trash-ui/src/views/daily/report/month.vue
0 โ 100644
trash-ui/src/views/daily/report/week.vue
0 โ 100644
trash-ui/src/views/daily/situation/index.vue
| ... | ... | @@ -94,19 +94,7 @@ |
| 94 | 94 | |
| 95 | 95 | <!-- ๆทปๅ ๆไฟฎๆนๆฏๆฅๆฎๆฅๆ ๅตๅฏน่ฏๆก --> |
| 96 | 96 | <el-dialog :title="title" :visible.sync="open" append-to-body> |
| 97 | - <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | |
| 98 | - <el-row type="flex" justify="center"> | |
| 99 | - <el-col> | |
| 100 | - <el-form-item label="ๆ ้ข" prop="title"> | |
| 101 | - <el-input v-model="form.title" placeholder="่ฏท่พๅ ฅๆ ้ข" style="width: 200px"/> | |
| 102 | - </el-form-item> | |
| 103 | - </el-col> | |
| 104 | - <el-col> | |
| 105 | - <el-form-item label="ๆไฝไบบ" prop="operator"> | |
| 106 | - <el-input v-model="form.operator" placeholder="่ฏท่พๅ ฅๆไฝไบบ" style="width: 200px"/> | |
| 107 | - </el-form-item> | |
| 108 | - </el-col> | |
| 109 | - </el-row> | |
| 97 | + <el-form ref="form" :model="form" :rules="rules" label-width="120px"> | |
| 110 | 98 | <el-row type="flex" justify="center"> |
| 111 | 99 | <el-col> |
| 112 | 100 | <el-form-item label="ๆฅๆ" prop="date"> |
| ... | ... | @@ -114,22 +102,37 @@ |
| 114 | 102 | v-model="form.date" |
| 115 | 103 | type="date" |
| 116 | 104 | value-format="yyyy-MM-dd" |
| 117 | - placeholder="้ๆฉๆฅๆ"> | |
| 105 | + placeholder="้ๆฉๆฅๆ" | |
| 106 | + @change="selectDate"> | |
| 118 | 107 | </el-date-picker> |
| 119 | 108 | </el-form-item> |
| 120 | 109 | </el-col> |
| 121 | 110 | <el-col> |
| 122 | - <el-form-item label="ๅคฉๆฐ" prop="weather"> | |
| 123 | - <el-input v-model="form.weather" placeholder="่ฏท่พๅ ฅๅคฉๆฐ" style="width: 200px"/> | |
| 111 | + <el-form-item label="ๆๆ" > | |
| 112 | + <el-input v-model="dayOfWeek" placeholder="" style="width: 200px" disabled/> | |
| 124 | 113 | </el-form-item> |
| 125 | 114 | </el-col> |
| 126 | 115 | </el-row> |
| 116 | + <el-row type="flex" justify="center"> | |
| 117 | + <el-col> | |
| 118 | + <el-form-item label="ๅคฉๆฐ" prop="weather"> | |
| 119 | + <el-input v-model="form.weather" placeholder="่ฏท่พๅ ฅๅคฉๆฐ" style="width: 200px"/> | |
| 120 | + </el-form-item> | |
| 121 | + </el-col> | |
| 122 | + <el-col> | |
| 123 | + <el-form-item label="ๆไฝไบบ" prop="operator"> | |
| 124 | + <el-input v-model="form.operator" placeholder="่ฏท่พๅ ฅๆไฝไบบ" style="width: 200px"/> | |
| 125 | + </el-form-item> | |
| 126 | + </el-col> | |
| 127 | + </el-row> | |
| 128 | + | |
| 129 | + <el-form-item label="่ฝฆ่พๆฐ"> | |
| 130 | + <el-input v-model="form.numberOfVehicles" type="number" style="width: 200px"/> | |
| 131 | + </el-form-item> | |
| 132 | + | |
| 127 | 133 | <el-form-item label="ๅ จๅธๅทฅๅฐ,ๆถ็บณๅบๅผๅๆ ๅต" > |
| 128 | 134 | <editor v-model="form.consumptionSiteSituation" :min-height="192"/> |
| 129 | 135 | </el-form-item> |
| 130 | - <el-form-item label="่ฝฆ่พๆฐ"> | |
| 131 | - <editor v-model="form.numberOfVehicles" :min-height="192"/> | |
| 132 | - </el-form-item> | |
| 133 | 136 | </el-form> |
| 134 | 137 | <div slot="footer" class="dialog-footer"> |
| 135 | 138 | <el-button type="primary" @click="submitForm">็กฎ ๅฎ</el-button> |
| ... | ... | @@ -166,6 +169,7 @@ export default { |
| 166 | 169 | situationList: [], |
| 167 | 170 | // ๅผนๅบๅฑๆ ้ข |
| 168 | 171 | title: "", |
| 172 | + dayOfWeek:null, | |
| 169 | 173 | // ๆฏๅฆๆพ็คบๅผนๅบๅฑ |
| 170 | 174 | open: false, |
| 171 | 175 | // ๆฅ่ฏขๅๆฐ |
| ... | ... | @@ -190,6 +194,18 @@ export default { |
| 190 | 194 | this.getList(); |
| 191 | 195 | }, |
| 192 | 196 | methods: { |
| 197 | + selectDate(date){ | |
| 198 | + | |
| 199 | + let day = new Date(date).getDay(); | |
| 200 | + | |
| 201 | + if(day == 0){ | |
| 202 | + day = 7; | |
| 203 | + } | |
| 204 | + | |
| 205 | + this.dayOfWeek = day; | |
| 206 | + | |
| 207 | + }, | |
| 208 | + | |
| 193 | 209 | /** ๆฅ่ฏขๆฏๆฅๆฎๆฅๆ ๅตๅ่กจ */ |
| 194 | 210 | getList() { |
| 195 | 211 | this.loading = true; |
| ... | ... | @@ -247,6 +263,16 @@ export default { |
| 247 | 263 | const id = row.id || this.ids |
| 248 | 264 | getSituation(id).then(response => { |
| 249 | 265 | this.form = response.data; |
| 266 | + | |
| 267 | + let day = new Date(this.form.date).getDay(); | |
| 268 | + | |
| 269 | + if(day == 0){ | |
| 270 | + day = 7; | |
| 271 | + } | |
| 272 | + | |
| 273 | + this.dayOfWeek = day; | |
| 274 | + | |
| 275 | + | |
| 250 | 276 | this.open = true; |
| 251 | 277 | this.title = "ไฟฎๆนๆฏๆฅๆฎๆฅๆ ๅต"; |
| 252 | 278 | }); |
| ... | ... | @@ -257,14 +283,26 @@ export default { |
| 257 | 283 | const id = row.id ||this.ids |
| 258 | 284 | getSituation(id).then(response => { |
| 259 | 285 | this.form = response.data; |
| 286 | + | |
| 287 | + let day = new Date(this.form.date).getDay(); | |
| 288 | + | |
| 289 | + if(day == 0){ | |
| 290 | + day = 7; | |
| 291 | + } | |
| 292 | + | |
| 293 | + this.dayOfWeek = day; | |
| 294 | + | |
| 260 | 295 | this.open = true; |
| 261 | 296 | this.title = "ๆฅ็่ฏฆๆ ไฟกๆฏ"; |
| 262 | 297 | }); |
| 263 | 298 | }, |
| 264 | 299 | /** ๆไบคๆ้ฎ */ |
| 265 | 300 | submitForm() { |
| 301 | + | |
| 302 | + | |
| 266 | 303 | this.$refs["form"].validate(valid => { |
| 267 | 304 | if (valid) { |
| 305 | + this.form.title = this.form.date + "ๅนณๅฐๅทฅไฝๆธ ๅ"; | |
| 268 | 306 | if (this.form.id != null) { |
| 269 | 307 | updateSituation(this.form).then(response => { |
| 270 | 308 | this.msgSuccess("ไฟฎๆนๆๅ"); | ... | ... |
trash-ui/src/views/daily/weekly/index.vue deleted
100644 โ 0
| 1 | -<template> | |
| 2 | - <div class="app-container"> | |
| 3 | - <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> | |
| 4 | - <el-form-item label="ๆ ้ข" prop="headline"> | |
| 5 | - <el-input | |
| 6 | - v-model="queryParams.headline" | |
| 7 | - placeholder="่ฏท่พๅ ฅๆ ้ข" | |
| 8 | - clearable | |
| 9 | - size="small" | |
| 10 | - @keyup.enter.native="handleQuery" | |
| 11 | - /> | |
| 12 | - </el-form-item> | |
| 13 | - <el-form-item> | |
| 14 | - <el-button type="cyan" size="mini" @click="handleQuery">ๆ็ดข</el-button> | |
| 15 | - </el-form-item> | |
| 16 | - </el-form> | |
| 17 | - | |
| 18 | - <el-row :gutter="10" class="mb8"> | |
| 19 | - <el-col :span="1.5"> | |
| 20 | - <el-button | |
| 21 | - type="primary" | |
| 22 | - size="mini" | |
| 23 | - @click="handleAdd" | |
| 24 | - v-hasPermi="['report:weekly:add']" | |
| 25 | - >ๆฐๅข</el-button> | |
| 26 | - </el-col> | |
| 27 | - <el-col :span="1.5"> | |
| 28 | - <el-button | |
| 29 | - type="success" | |
| 30 | - size="mini" | |
| 31 | - :disabled="single" | |
| 32 | - @click="handleUpdate" | |
| 33 | - v-hasPermi="['report:weekly:edit']" | |
| 34 | - >ไฟฎๆน</el-button> | |
| 35 | - </el-col> | |
| 36 | - <el-col :span="1.5"> | |
| 37 | - <el-button | |
| 38 | - type="danger" | |
| 39 | - size="mini" | |
| 40 | - :disabled="multiple" | |
| 41 | - @click="handleDelete" | |
| 42 | - v-hasPermi="['report:weekly:remove']" | |
| 43 | - >ๅ ้ค</el-button> | |
| 44 | - </el-col> | |
| 45 | - <el-col :span="1.5"> | |
| 46 | - <el-button | |
| 47 | - type="warning" | |
| 48 | - size="mini" | |
| 49 | - @click="handleExport" | |
| 50 | - v-hasPermi="['report:weekly:export']" | |
| 51 | - >ๅฏผๅบ</el-button> | |
| 52 | - </el-col> | |
| 53 | - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | |
| 54 | - </el-row> | |
| 55 | - | |
| 56 | - <el-table v-loading="loading" :data="weeklyList" @selection-change="handleSelectionChange"> | |
| 57 | - <el-table-column type="selection" width="55" align="center" /> | |
| 58 | - <el-table-column label="ๆ ้ข" align="center" prop="headline" /> | |
| 59 | - <el-table-column label="ๅกซๅไบบ" align="center" prop="writer" /> | |
| 60 | - <el-table-column label="ๅกซๅๆถ้ด" align="center" prop="writeTime" width="180"> | |
| 61 | - <template slot-scope="scope"> | |
| 62 | - <span>{{ parseTime(scope.row.writeTime, '{y}-{m}-{d}') }}</span> | |
| 63 | - </template> | |
| 64 | - </el-table-column> | |
| 65 | - <el-table-column label="ๆไฝ" align="center" class-name="small-padding fixed-width"> | |
| 66 | - <template slot-scope="scope"> | |
| 67 | - <el-button | |
| 68 | - size="mini" | |
| 69 | - type="text" | |
| 70 | - @click="handleById(scope.row)" | |
| 71 | - v-hasPermi="['report:weekly:query']"> | |
| 72 | - ๆฅ็ | |
| 73 | - </el-button> | |
| 74 | - </template> | |
| 75 | - </el-table-column> | |
| 76 | - </el-table> | |
| 77 | - | |
| 78 | - <pagination | |
| 79 | - v-show="total>0" | |
| 80 | - :total="total" | |
| 81 | - :page.sync="queryParams.pageNum" | |
| 82 | - :limit.sync="queryParams.pageSize" | |
| 83 | - @pagination="getList" | |
| 84 | - /> | |
| 85 | - | |
| 86 | - <!-- ๆทปๅ ๆไฟฎๆนๅจๆฅๅฏน่ฏๆก --> | |
| 87 | - <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body> | |
| 88 | - <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | |
| 89 | - <el-row type="flex" justify="center"> | |
| 90 | - <el-col> | |
| 91 | - <el-form-item label="ๅจๆ" prop="begintime"> | |
| 92 | - <el-date-picker clearable size="small" style="width: 200px" | |
| 93 | - v-model="form.begintime" | |
| 94 | - type="date" | |
| 95 | - value-format="yyyy-MM-dd" | |
| 96 | - placeholder="้ๆฉๅผๅงๆถ้ด"> | |
| 97 | - </el-date-picker> | |
| 98 | - </el-form-item> | |
| 99 | - </el-col> | |
| 100 | - <el-col> | |
| 101 | - <el-form-item label="่ณ" prop="endtime" > | |
| 102 | - <el-date-picker clearable size="small" style="width: 200px" | |
| 103 | - v-model="form.endtime" | |
| 104 | - type="date" | |
| 105 | - value-format="yyyy-MM-dd" | |
| 106 | - placeholder="้ๆฉ็ปๆๆถ้ด"> | |
| 107 | - </el-date-picker> | |
| 108 | - </el-form-item> | |
| 109 | - </el-col> | |
| 110 | - </el-row> | |
| 111 | - <el-row type="flex" justify="center"> | |
| 112 | - <el-col> | |
| 113 | - <el-form-item label="ๆ ้ข" prop="headline"> | |
| 114 | - <el-input v-model="form.headline" placeholder="่ฏท่พๅ ฅๆ ้ข" style="width: 200px"/> | |
| 115 | - </el-form-item> | |
| 116 | - </el-col> | |
| 117 | - <el-col> | |
| 118 | - <el-form-item label="ๅกซๅไบบ" prop="writer"> | |
| 119 | - <el-input v-model="form.writer" placeholder="่ฏท่พๅ ฅๅกซๅไบบ" style="width: 200px"/> | |
| 120 | - </el-form-item> | |
| 121 | - </el-col> | |
| 122 | - </el-row> | |
| 123 | - <el-form-item label="ๅกซๅๆถ้ด" prop="writeTime"> | |
| 124 | - <el-date-picker clearable size="small" style="width: 200px" | |
| 125 | - v-model="form.writeTime" | |
| 126 | - type="date" | |
| 127 | - value-format="yyyy-MM-dd" | |
| 128 | - placeholder="้ๆฉๅกซๅๆถ้ด"> | |
| 129 | - </el-date-picker> | |
| 130 | - </el-form-item> | |
| 131 | - <el-form-item label="ๅ ๅฎน"> | |
| 132 | - <editor v-model="form.content" :min-height="192"/> | |
| 133 | - </el-form-item> | |
| 134 | - </el-form> | |
| 135 | - <div slot="footer" class="dialog-footer"> | |
| 136 | - <el-button type="primary" @click="submitForm">็กฎ ๅฎ</el-button> | |
| 137 | - <el-button @click="cancel">ๅ ๆถ</el-button> | |
| 138 | - </div> | |
| 139 | - </el-dialog> | |
| 140 | - </div> | |
| 141 | -</template> | |
| 142 | - | |
| 143 | -<script> | |
| 144 | -import { listWeekly, getWeekly, delWeekly, addWeekly, updateWeekly, exportWeekly } from "@/api/daily/weekly"; | |
| 145 | -import Editor from '@/components/Editor'; | |
| 146 | - | |
| 147 | -export default { | |
| 148 | - name: "Weekly", | |
| 149 | - components: { Editor }, | |
| 150 | - data() { | |
| 151 | - return { | |
| 152 | - // ้ฎ็ฝฉๅฑ | |
| 153 | - loading: true, | |
| 154 | - // ้ไธญๆฐ็ป | |
| 155 | - ids: [], | |
| 156 | - // ้ๅไธช็ฆ็จ | |
| 157 | - single: true, | |
| 158 | - // ้ๅคไธช็ฆ็จ | |
| 159 | - multiple: true, | |
| 160 | - // ๆพ็คบๆ็ดขๆกไปถ | |
| 161 | - showSearch: true, | |
| 162 | - // ๆปๆกๆฐ | |
| 163 | - total: 0, | |
| 164 | - // ๅจๆฅ่กจๆ ผๆฐๆฎ | |
| 165 | - weeklyList: [], | |
| 166 | - // ๅผนๅบๅฑๆ ้ข | |
| 167 | - title: "", | |
| 168 | - // ๆฏๅฆๆพ็คบๅผนๅบๅฑ | |
| 169 | - open: false, | |
| 170 | - // ๆฅ่ฏขๅๆฐ | |
| 171 | - queryParams: { | |
| 172 | - pageNum: 1, | |
| 173 | - pageSize: 10, | |
| 174 | - headline: null, | |
| 175 | - }, | |
| 176 | - // ่กจๅๅๆฐ | |
| 177 | - form: {}, | |
| 178 | - // ่กจๅๆ ก้ช | |
| 179 | - rules: { | |
| 180 | - } | |
| 181 | - }; | |
| 182 | - }, | |
| 183 | - created() { | |
| 184 | - this.getList(); | |
| 185 | - }, | |
| 186 | - methods: { | |
| 187 | - /** ๆฅ่ฏขๅจๆฅๅ่กจ */ | |
| 188 | - getList() { | |
| 189 | - this.loading = true; | |
| 190 | - listWeekly(this.queryParams).then(response => { | |
| 191 | - this.weeklyList = response.rows; | |
| 192 | - this.total = response.total; | |
| 193 | - this.loading = false; | |
| 194 | - }); | |
| 195 | - }, | |
| 196 | - // ๅๆถๆ้ฎ | |
| 197 | - cancel() { | |
| 198 | - this.open = false; | |
| 199 | - this.reset(); | |
| 200 | - }, | |
| 201 | - // ่กจๅ้็ฝฎ | |
| 202 | - reset() { | |
| 203 | - this.form = { | |
| 204 | - id: null, | |
| 205 | - headline: null, | |
| 206 | - writer: null, | |
| 207 | - writeTime: null, | |
| 208 | - content: null, | |
| 209 | - begintime: null, | |
| 210 | - endtime: null, | |
| 211 | - contentType: null | |
| 212 | - }; | |
| 213 | - this.resetForm("form"); | |
| 214 | - }, | |
| 215 | - /** ๆ็ดขๆ้ฎๆไฝ */ | |
| 216 | - handleQuery() { | |
| 217 | - this.queryParams.pageNum = 1; | |
| 218 | - this.getList(); | |
| 219 | - }, | |
| 220 | - /** ้็ฝฎๆ้ฎๆไฝ */ | |
| 221 | - resetQuery() { | |
| 222 | - this.resetForm("queryForm"); | |
| 223 | - this.handleQuery(); | |
| 224 | - }, | |
| 225 | - // ๅค้ๆก้ไธญๆฐๆฎ | |
| 226 | - handleSelectionChange(selection) { | |
| 227 | - this.ids = selection.map(item => item.id) | |
| 228 | - this.single = selection.length!==1 | |
| 229 | - this.multiple = !selection.length | |
| 230 | - }, | |
| 231 | - /** ๆฐๅขๆ้ฎๆไฝ */ | |
| 232 | - handleAdd() { | |
| 233 | - this.reset(); | |
| 234 | - this.open = true; | |
| 235 | - this.title = "ๆทปๅ ๅจๆฅ"; | |
| 236 | - }, | |
| 237 | - /** ไฟฎๆนๆ้ฎๆไฝ */ | |
| 238 | - handleUpdate(row) { | |
| 239 | - this.reset(); | |
| 240 | - const id = row.id || this.ids | |
| 241 | - getWeekly(id).then(response => { | |
| 242 | - this.form = response.data; | |
| 243 | - this.open = true; | |
| 244 | - this.title = "ไฟฎๆนๅจๆฅ"; | |
| 245 | - }); | |
| 246 | - }, | |
| 247 | - /** ๆฅ็่ฏฆๆ ๆ้ฎๆไฝ*/ | |
| 248 | - handleById(row){ | |
| 249 | - this.reset(); | |
| 250 | - const id = row.id ||this.ids | |
| 251 | - getWeekly(id).then(response => { | |
| 252 | - this.form = response.data; | |
| 253 | - this.open = true; | |
| 254 | - this.title = "ๆฅ็่ฏฆๆ ไฟกๆฏ"; | |
| 255 | - }); | |
| 256 | - }, | |
| 257 | - /** ๆไบคๆ้ฎ */ | |
| 258 | - submitForm() { | |
| 259 | - this.$refs["form"].validate(valid => { | |
| 260 | - if (valid) { | |
| 261 | - if (this.form.id != null) { | |
| 262 | - updateWeekly(this.form).then(response => { | |
| 263 | - this.msgSuccess("ไฟฎๆนๆๅ"); | |
| 264 | - this.open = false; | |
| 265 | - this.getList(); | |
| 266 | - }); | |
| 267 | - } else { | |
| 268 | - addWeekly(this.form).then(response => { | |
| 269 | - this.msgSuccess("ๆฐๅขๆๅ"); | |
| 270 | - this.open = false; | |
| 271 | - this.getList(); | |
| 272 | - }); | |
| 273 | - } | |
| 274 | - } | |
| 275 | - }); | |
| 276 | - }, | |
| 277 | - /** ๅ ้คๆ้ฎๆไฝ */ | |
| 278 | - handleDelete(row) { | |
| 279 | - const ids = row.id || this.ids; | |
| 280 | - this.$confirm('ๆฏๅฆ็กฎ่ฎคๅ ้คๅจๆฅ็ผๅทไธบ"' + ids + '"็ๆฐๆฎ้กน?', "่ญฆๅ", { | |
| 281 | - confirmButtonText: "็กฎๅฎ", | |
| 282 | - cancelButtonText: "ๅๆถ", | |
| 283 | - type: "warning" | |
| 284 | - }).then(function() { | |
| 285 | - return delWeekly(ids); | |
| 286 | - }).then(() => { | |
| 287 | - this.getList(); | |
| 288 | - this.msgSuccess("ๅ ้คๆๅ"); | |
| 289 | - }) | |
| 290 | - }, | |
| 291 | - /** ๅฏผๅบๆ้ฎๆไฝ */ | |
| 292 | - handleExport() { | |
| 293 | - const queryParams = this.queryParams; | |
| 294 | - this.$confirm('ๆฏๅฆ็กฎ่ฎคๅฏผๅบๆๆๅจๆฅๆฐๆฎ้กน?', "่ญฆๅ", { | |
| 295 | - confirmButtonText: "็กฎๅฎ", | |
| 296 | - cancelButtonText: "ๅๆถ", | |
| 297 | - type: "warning" | |
| 298 | - }).then(function() { | |
| 299 | - return exportWeekly(queryParams); | |
| 300 | - }).then(response => { | |
| 301 | - this.download(response.msg); | |
| 302 | - }) | |
| 303 | - } | |
| 304 | - } | |
| 305 | -}; | |
| 306 | -</script> |
trash-ui/vue.config.js
| ... | ... | @@ -34,7 +34,7 @@ module.exports = { |
| 34 | 34 | proxy: { |
| 35 | 35 | // detail: https://cli.vuejs.org/config/#devserver-proxy |
| 36 | 36 | [process.env.VUE_APP_BASE_API]: { |
| 37 | - target: `http://localhost:8080`, | |
| 37 | + target: `http://localhost:8080/workflow`, | |
| 38 | 38 | changeOrigin: true, |
| 39 | 39 | pathRewrite: { |
| 40 | 40 | ['^' + process.env.VUE_APP_BASE_API]: '' | ... | ... |
trash-workFlow/src/main/java/com/trash/business/controller/CompanyCreditController.java
| ... | ... | @@ -29,7 +29,7 @@ import com.trash.common.core.page.TableDataInfo; |
| 29 | 29 | * @date 2023-04-25 |
| 30 | 30 | */ |
| 31 | 31 | @RestController |
| 32 | -@RequestMapping("/Company/credit") | |
| 32 | +@RequestMapping("/business/companyCredit") | |
| 33 | 33 | public class CompanyCreditController extends BaseController |
| 34 | 34 | { |
| 35 | 35 | @Autowired |
| ... | ... | @@ -57,11 +57,21 @@ public class CompanyCreditController extends BaseController |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | @GetMapping("/names") |
| 60 | - public List<String> getNames(CompanyCredit companyCredit) | |
| 60 | + public List<String> getNames(CompanyCredit credit) | |
| 61 | 61 | { |
| 62 | - return companyCreditService.getNames(companyCredit); | |
| 62 | + if(credit.getStatus() == 1){ | |
| 63 | + credit.setStatus(null); | |
| 64 | + } | |
| 65 | + return companyCreditService.getNames(credit); | |
| 66 | + } | |
| 67 | + @GetMapping("/places") | |
| 68 | + public List<String> getPlaces(CompanyCredit credit) | |
| 69 | + { | |
| 70 | + if(credit.getStatus() == 1){ | |
| 71 | + credit.setStatus(null); | |
| 72 | + } | |
| 73 | + return companyCreditService.getPlaces(credit); | |
| 63 | 74 | } |
| 64 | - | |
| 65 | 75 | /** |
| 66 | 76 | * ๅฏผๅบไผไธๅคฑไฟกๅ่กจ |
| 67 | 77 | */ | ... | ... |
trash-workFlow/src/main/java/com/trash/business/controller/ConstructionCreditController.java
| ... | ... | @@ -29,7 +29,7 @@ import com.trash.common.utils.poi.ExcelUtil; |
| 29 | 29 | * @date 2023-04-21 |
| 30 | 30 | */ |
| 31 | 31 | @RestController |
| 32 | -@RequestMapping("/business/ConstructionCredit") | |
| 32 | +@RequestMapping("/business/constructionCredit") | |
| 33 | 33 | public class ConstructionCreditController extends BaseController |
| 34 | 34 | { |
| 35 | 35 | @Autowired |
| ... | ... | @@ -65,7 +65,13 @@ public class ConstructionCreditController extends BaseController |
| 65 | 65 | @GetMapping("/export") |
| 66 | 66 | public AjaxResult export(ConstructionCredit constructionCredit) |
| 67 | 67 | { |
| 68 | - List<ConstructionCredit> list = constructionCreditService.selectConstructionCreditList(constructionCredit); | |
| 68 | + List<ConstructionCredit> list; | |
| 69 | + if(constructionCredit.getStatus() == 1){ | |
| 70 | + list = constructionCreditService.selectConstructionCreditHistory(constructionCredit); | |
| 71 | + }else{ | |
| 72 | + list = constructionCreditService.selectConstructionCreditList(constructionCredit); | |
| 73 | + } | |
| 74 | + | |
| 69 | 75 | ExcelUtil<ConstructionCredit> util = new ExcelUtil<ConstructionCredit>(ConstructionCredit.class); |
| 70 | 76 | return util.exportExcel(list, "credit"); |
| 71 | 77 | } |
| ... | ... | @@ -105,16 +111,25 @@ public class ConstructionCreditController extends BaseController |
| 105 | 111 | @GetMapping("/names") |
| 106 | 112 | public List<String> getNames(ConstructionCredit constructionCredit) |
| 107 | 113 | { |
| 114 | + if(constructionCredit.getStatus() == 1){ | |
| 115 | + constructionCredit.setStatus(null); | |
| 116 | + } | |
| 108 | 117 | return constructionCreditService.getNames(constructionCredit); |
| 109 | 118 | } |
| 110 | 119 | @GetMapping("/types") |
| 111 | 120 | public List<String> getTypes(ConstructionCredit constructionCredit) |
| 112 | 121 | { |
| 122 | + if(constructionCredit.getStatus() == 1){ | |
| 123 | + constructionCredit.setStatus(null); | |
| 124 | + } | |
| 113 | 125 | return constructionCreditService.getTypes(constructionCredit); |
| 114 | 126 | } |
| 115 | 127 | @GetMapping("/places") |
| 116 | 128 | public List<String> getPlaces(ConstructionCredit constructionCredit) |
| 117 | 129 | { |
| 130 | + if(constructionCredit.getStatus() == 1){ | |
| 131 | + constructionCredit.setStatus(null); | |
| 132 | + } | |
| 118 | 133 | return constructionCreditService.getPlaces(constructionCredit); |
| 119 | 134 | } |
| 120 | 135 | ... | ... |
trash-workFlow/src/main/java/com/trash/business/controller/DriverCreditController.java
| ... | ... | @@ -29,7 +29,7 @@ import com.trash.common.core.page.TableDataInfo; |
| 29 | 29 | * @date 2023-04-26 |
| 30 | 30 | */ |
| 31 | 31 | @RestController |
| 32 | -@RequestMapping("/driver/credit") | |
| 32 | +@RequestMapping("/business/driverCredit") | |
| 33 | 33 | public class DriverCreditController extends BaseController |
| 34 | 34 | { |
| 35 | 35 | @Autowired |
| ... | ... | @@ -52,14 +52,18 @@ public class DriverCreditController extends BaseController |
| 52 | 52 | public TableDataInfo historyCredit(DriverCredit driverCredit) |
| 53 | 53 | { |
| 54 | 54 | startPage(); |
| 55 | - List<DriverCredit> list = driverCreditService.selectDriverCreditList(driverCredit); | |
| 55 | + List<DriverCredit> list = driverCreditService.selectDriverCreditHistory(driverCredit); | |
| 56 | 56 | return getDataTable(list); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | @GetMapping("/names") |
| 60 | - public List<String> getNames(DriverCredit driverCredit) | |
| 60 | + public List<String> getNames(DriverCredit credit) | |
| 61 | 61 | { |
| 62 | - return driverCreditService.getNames(driverCredit); | |
| 62 | + | |
| 63 | + if(credit.getStatus() == 1){ | |
| 64 | + credit.setStatus(null); | |
| 65 | + } | |
| 66 | + return driverCreditService.getNames(credit); | |
| 63 | 67 | } |
| 64 | 68 | |
| 65 | 69 | /** | ... | ... |
trash-workFlow/src/main/java/com/trash/business/controller/EarthsitesCreditController.java
| ... | ... | @@ -29,7 +29,7 @@ import com.trash.common.core.page.TableDataInfo; |
| 29 | 29 | * @date 2023-04-26 |
| 30 | 30 | */ |
| 31 | 31 | @RestController |
| 32 | -@RequestMapping("/EarthSites/credit") | |
| 32 | +@RequestMapping("/business/earthSitesCredit") | |
| 33 | 33 | public class EarthsitesCreditController extends BaseController |
| 34 | 34 | { |
| 35 | 35 | @Autowired |
| ... | ... | @@ -55,8 +55,12 @@ public class EarthsitesCreditController extends BaseController |
| 55 | 55 | @Log(title = "ๆถ็บณๅบๅคฑไฟก", businessType = BusinessType.EXPORT) |
| 56 | 56 | @GetMapping("/export") |
| 57 | 57 | public AjaxResult export(EarthsitesCredit earthsitesCredit) |
| 58 | - { | |
| 59 | - List<EarthsitesCredit> list = earthsitesCreditService.selectEarthsitesCreditList(earthsitesCredit); | |
| 58 | + { | |
| 59 | + List<EarthsitesCredit> list = null; | |
| 60 | + if(earthsitesCredit.getStatus() == 1){ | |
| 61 | + list = earthsitesCreditService.selectEarthsitesCreditHistory(earthsitesCredit); | |
| 62 | + }else | |
| 63 | + list = earthsitesCreditService.selectEarthsitesCreditList(earthsitesCredit); | |
| 60 | 64 | ExcelUtil<EarthsitesCredit> util = new ExcelUtil<EarthsitesCredit>(EarthsitesCredit.class); |
| 61 | 65 | return util.exportExcel(list, "credit"); |
| 62 | 66 | } |
| ... | ... | @@ -109,13 +113,33 @@ public class EarthsitesCreditController extends BaseController |
| 109 | 113 | public TableDataInfo historyCredit(EarthsitesCredit earthsitesCredit) |
| 110 | 114 | { |
| 111 | 115 | startPage(); |
| 112 | - List<EarthsitesCredit> list = earthsitesCreditService.selectEarthsitesCreditList(earthsitesCredit); | |
| 116 | + List<EarthsitesCredit> list = earthsitesCreditService.selectEarthsitesCreditHistory(earthsitesCredit); | |
| 113 | 117 | return getDataTable(list); |
| 114 | 118 | } |
| 115 | 119 | |
| 116 | 120 | @GetMapping("/names") |
| 117 | 121 | public List<String> getNames(EarthsitesCredit earthsitesCredit) |
| 118 | 122 | { |
| 123 | + if(earthsitesCredit.getStatus() == 1){ | |
| 124 | + earthsitesCredit.setStatus(null); | |
| 125 | + } | |
| 119 | 126 | return earthsitesCreditService.getNames(earthsitesCredit); |
| 120 | 127 | } |
| 128 | + | |
| 129 | + @GetMapping("/types") | |
| 130 | + public List<String> getTypes(EarthsitesCredit earthsitesCredit) | |
| 131 | + { | |
| 132 | + if(earthsitesCredit.getStatus() == 1){ | |
| 133 | + earthsitesCredit.setStatus(null); | |
| 134 | + } | |
| 135 | + return earthsitesCreditService.getTypes(earthsitesCredit); | |
| 136 | + } | |
| 137 | + @GetMapping("/places") | |
| 138 | + public List<String> getPlaces(EarthsitesCredit earthsitesCredit) | |
| 139 | + { | |
| 140 | + if(earthsitesCredit.getStatus() == 1){ | |
| 141 | + earthsitesCredit.setStatus(null); | |
| 142 | + } | |
| 143 | + return earthsitesCreditService.getPlaces(earthsitesCredit); | |
| 144 | + } | |
| 121 | 145 | } |
| 122 | 146 | \ No newline at end of file | ... | ... |
trash-daily/src/main/java/com/trash/monthly/controller/MonthlyReportController.java renamed to trash-workFlow/src/main/java/com/trash/business/controller/SupervisionSpecialController.java
| 1 | -package com.trash.monthly.controller; | |
| 1 | +package com.trash.business.controller; | |
| 2 | 2 | |
| 3 | +import java.util.List; | |
| 4 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 5 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 6 | +import org.springframework.web.bind.annotation.GetMapping; | |
| 7 | +import org.springframework.web.bind.annotation.PostMapping; | |
| 8 | +import org.springframework.web.bind.annotation.PutMapping; | |
| 9 | +import org.springframework.web.bind.annotation.DeleteMapping; | |
| 10 | +import org.springframework.web.bind.annotation.PathVariable; | |
| 11 | +import org.springframework.web.bind.annotation.RequestBody; | |
| 12 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 13 | +import org.springframework.web.bind.annotation.RestController; | |
| 3 | 14 | import com.trash.common.annotation.Log; |
| 4 | 15 | import com.trash.common.core.controller.BaseController; |
| 5 | 16 | import com.trash.common.core.domain.AjaxResult; |
| 6 | -import com.trash.common.core.page.TableDataInfo; | |
| 7 | 17 | import com.trash.common.enums.BusinessType; |
| 18 | +import com.trash.business.domain.SupervisionSpecial; | |
| 19 | +import com.trash.business.service.ISupervisionSpecialService; | |
| 8 | 20 | import com.trash.common.utils.poi.ExcelUtil; |
| 9 | -import com.trash.daily.domain.PeriodicReport; | |
| 10 | -import com.trash.monthly.service.IMonthlyReportService; | |
| 11 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 12 | -import org.springframework.security.access.prepost.PreAuthorize; | |
| 13 | -import org.springframework.web.bind.annotation.*; | |
| 14 | - | |
| 15 | -import java.util.List; | |
| 21 | +import com.trash.common.core.page.TableDataInfo; | |
| 16 | 22 | |
| 17 | 23 | /** |
| 18 | - * ๆๆฅController | |
| 19 | - * | |
| 24 | + * ไธ้กน็ฃๆฅController | |
| 25 | + * | |
| 20 | 26 | * @author trash |
| 21 | - * @date 2023-04-23 | |
| 27 | + * @date 2023-05-03 | |
| 22 | 28 | */ |
| 23 | 29 | @RestController |
| 24 | -@RequestMapping("/report/monthly") | |
| 25 | -public class MonthlyReportController extends BaseController | |
| 30 | +@RequestMapping("/business/supervisionSpecial") | |
| 31 | +public class SupervisionSpecialController extends BaseController | |
| 26 | 32 | { |
| 27 | 33 | @Autowired |
| 28 | - private IMonthlyReportService monthlyReportService; | |
| 34 | + private ISupervisionSpecialService supervisionSpecialService; | |
| 29 | 35 | |
| 30 | 36 | /** |
| 31 | - * ๆฅ่ฏขๆๆฅๅ่กจ | |
| 37 | + * ๆฅ่ฏขไธ้กน็ฃๆฅๅ่กจ | |
| 32 | 38 | */ |
| 33 | - @PreAuthorize("@ss.hasPermi('report:monthly:list')") | |
| 39 | + @PreAuthorize("@ss.hasPermi('business:supervisionSpecial:list')") | |
| 34 | 40 | @GetMapping("/list") |
| 35 | - public TableDataInfo list(PeriodicReport periodicReport) | |
| 41 | + public TableDataInfo list(SupervisionSpecial supervisionSpecial) | |
| 36 | 42 | { |
| 37 | 43 | startPage(); |
| 38 | - List<PeriodicReport> list = monthlyReportService.selectMonthlyReportList(periodicReport); | |
| 44 | + List<SupervisionSpecial> list = supervisionSpecialService.selectSupervisionSpecialList(supervisionSpecial); | |
| 39 | 45 | return getDataTable(list); |
| 40 | 46 | } |
| 41 | 47 | |
| 42 | 48 | /** |
| 43 | - * ๅฏผๅบๆๆฅๅ่กจ | |
| 49 | + * ๅฏผๅบไธ้กน็ฃๆฅๅ่กจ | |
| 44 | 50 | */ |
| 45 | - @PreAuthorize("@ss.hasPermi('report:monthly:export')") | |
| 46 | - @Log(title = "ๆๆฅ", businessType = BusinessType.EXPORT) | |
| 51 | + @PreAuthorize("@ss.hasPermi('business:supervisionSpecial:export')") | |
| 52 | + @Log(title = "ไธ้กน็ฃๆฅ", businessType = BusinessType.EXPORT) | |
| 47 | 53 | @GetMapping("/export") |
| 48 | - public AjaxResult export(PeriodicReport periodicReport) | |
| 54 | + public AjaxResult export(SupervisionSpecial supervisionSpecial) | |
| 49 | 55 | { |
| 50 | - List<PeriodicReport> list = monthlyReportService.selectMonthlyReportList(periodicReport); | |
| 51 | - ExcelUtil<PeriodicReport> util = new ExcelUtil<PeriodicReport>(PeriodicReport.class); | |
| 52 | - return util.exportExcel(list, "monthly"); | |
| 56 | + List<SupervisionSpecial> list = supervisionSpecialService.selectSupervisionSpecialList(supervisionSpecial); | |
| 57 | + ExcelUtil<SupervisionSpecial> util = new ExcelUtil<SupervisionSpecial>(SupervisionSpecial.class); | |
| 58 | + return util.exportExcel(list, "supervisionSpecial"); | |
| 53 | 59 | } |
| 54 | 60 | |
| 55 | 61 | /** |
| 56 | - * ่ทๅๆๆฅ่ฏฆ็ปไฟกๆฏ | |
| 62 | + * ่ทๅไธ้กน็ฃๆฅ่ฏฆ็ปไฟกๆฏ | |
| 57 | 63 | */ |
| 58 | - @PreAuthorize("@ss.hasPermi('report:monthly:query')") | |
| 64 | + @PreAuthorize("@ss.hasPermi('business:supervisionSpecial:query')") | |
| 59 | 65 | @GetMapping(value = "/{id}") |
| 60 | - public AjaxResult getInfo(@PathVariable("id") Long id) | |
| 66 | + public AjaxResult getInfo(@PathVariable("id") String id) | |
| 61 | 67 | { |
| 62 | - return AjaxResult.success(monthlyReportService.selectMonthlyReportById(id)); | |
| 68 | + return AjaxResult.success(supervisionSpecialService.selectSupervisionSpecialById(id)); | |
| 63 | 69 | } |
| 64 | 70 | |
| 65 | 71 | /** |
| 66 | - * ๆฐๅขๆๆฅ | |
| 72 | + * ๆฐๅขไธ้กน็ฃๆฅ | |
| 67 | 73 | */ |
| 68 | - @PreAuthorize("@ss.hasPermi('report:monthly:add')") | |
| 69 | - @Log(title = "ๆๆฅ", businessType = BusinessType.INSERT) | |
| 74 | + @PreAuthorize("@ss.hasPermi('business:supervisionSpecial:add')") | |
| 75 | + @Log(title = "ไธ้กน็ฃๆฅ", businessType = BusinessType.INSERT) | |
| 70 | 76 | @PostMapping |
| 71 | - public AjaxResult add(@RequestBody PeriodicReport periodicReport) | |
| 77 | + public AjaxResult add(@RequestBody SupervisionSpecial supervisionSpecial) | |
| 72 | 78 | { |
| 73 | - return toAjax(monthlyReportService.insertMonthlyReport(periodicReport)); | |
| 79 | + return toAjax(supervisionSpecialService.insertSupervisionSpecial(supervisionSpecial)); | |
| 74 | 80 | } |
| 75 | 81 | |
| 76 | 82 | /** |
| 77 | - * ไฟฎๆนๆๆฅ | |
| 83 | + * ไฟฎๆนไธ้กน็ฃๆฅ | |
| 78 | 84 | */ |
| 79 | - @PreAuthorize("@ss.hasPermi('report:monthly:edit')") | |
| 80 | - @Log(title = "ๆๆฅ", businessType = BusinessType.UPDATE) | |
| 85 | + @PreAuthorize("@ss.hasPermi('business:supervisionSpecial:edit')") | |
| 86 | + @Log(title = "ไธ้กน็ฃๆฅ", businessType = BusinessType.UPDATE) | |
| 81 | 87 | @PutMapping |
| 82 | - public AjaxResult edit(@RequestBody PeriodicReport periodicReport) | |
| 88 | + public AjaxResult edit(@RequestBody SupervisionSpecial supervisionSpecial) | |
| 83 | 89 | { |
| 84 | - return toAjax(monthlyReportService.updateMonthlyReport(periodicReport)); | |
| 90 | + return toAjax(supervisionSpecialService.updateSupervisionSpecial(supervisionSpecial)); | |
| 85 | 91 | } |
| 86 | 92 | |
| 87 | 93 | /** |
| 88 | - * ๅ ้คๆๆฅ | |
| 94 | + * ๅ ้คไธ้กน็ฃๆฅ | |
| 89 | 95 | */ |
| 90 | - @PreAuthorize("@ss.hasPermi('report:monthly:remove')") | |
| 91 | - @Log(title = "ๆๆฅ", businessType = BusinessType.DELETE) | |
| 92 | - @DeleteMapping("/{ids}") | |
| 93 | - public AjaxResult remove(@PathVariable Long[] ids) | |
| 96 | + @PreAuthorize("@ss.hasPermi('business:supervisionSpecial:remove')") | |
| 97 | + @Log(title = "ไธ้กน็ฃๆฅ", businessType = BusinessType.DELETE) | |
| 98 | + @DeleteMapping("/{ids}") | |
| 99 | + public AjaxResult remove(@PathVariable String[] ids) | |
| 94 | 100 | { |
| 95 | - return toAjax(monthlyReportService.deleteMonthlyReportByIds(ids)); | |
| 101 | + return toAjax(supervisionSpecialService.deleteSupervisionSpecialByIds(ids)); | |
| 96 | 102 | } |
| 97 | -} | |
| 98 | 103 | \ No newline at end of file |
| 104 | +} | ... | ... |
trash-workFlow/src/main/java/com/trash/business/controller/SupervisionThreestepController.java
| ... | ... | @@ -2,6 +2,7 @@ package com.trash.business.controller; |
| 2 | 2 | |
| 3 | 3 | import java.io.IOException; |
| 4 | 4 | import java.util.List; |
| 5 | +import java.util.Map; | |
| 5 | 6 | |
| 6 | 7 | import javax.servlet.http.HttpServletRequest; |
| 7 | 8 | import javax.servlet.http.HttpServletResponse; |
| ... | ... | @@ -57,6 +58,18 @@ public class SupervisionThreestepController extends BaseController |
| 57 | 58 | } |
| 58 | 59 | |
| 59 | 60 | /** |
| 61 | + * ๆฅ่ฏขไธๆฅๆบๅถๅ่กจ | |
| 62 | + */ | |
| 63 | + @PreAuthorize("@ss.hasPermi('business:threestep:list')") | |
| 64 | + @GetMapping("/dayWorkList") | |
| 65 | + public TableDataInfo dayWorkList(SupervisionThreestep supervisionThreestep) | |
| 66 | + { | |
| 67 | + startPage(); | |
| 68 | + List<Map> list = supervisionThreestepService.selectDayWorkList(supervisionThreestep); | |
| 69 | + return getDataTable(list); | |
| 70 | + } | |
| 71 | + | |
| 72 | + /** | |
| 60 | 73 | * ๅฏผๅบไธๆฅๆบๅถๅ่กจ |
| 61 | 74 | */ |
| 62 | 75 | @PreAuthorize("@ss.hasPermi('business:threestep:export')") |
| ... | ... | @@ -86,7 +99,14 @@ public class SupervisionThreestepController extends BaseController |
| 86 | 99 | @PostMapping |
| 87 | 100 | public AjaxResult add(@RequestBody SupervisionThreestep supervisionThreestep) |
| 88 | 101 | { |
| 89 | - return toAjax(supervisionThreestepService.insertSupervisionThreestep(supervisionThreestep)); | |
| 102 | + | |
| 103 | + int i = supervisionThreestepService.insertSupervisionThreestep(supervisionThreestep); | |
| 104 | + | |
| 105 | + if(i==-1){ | |
| 106 | + return AjaxResult.error("ๆ ๆณ้ๅคๆฅๅทฅ"); | |
| 107 | + } | |
| 108 | + | |
| 109 | + return toAjax(i); | |
| 90 | 110 | } |
| 91 | 111 | |
| 92 | 112 | /** |
| ... | ... | @@ -99,6 +119,14 @@ public class SupervisionThreestepController extends BaseController |
| 99 | 119 | { |
| 100 | 120 | return toAjax(supervisionThreestepService.updateSupervisionThreestep(supervisionThreestep)); |
| 101 | 121 | } |
| 122 | + | |
| 123 | + @PreAuthorize("@ss.hasPermi('business:threestep:edit')") | |
| 124 | + @Log(title = "ไธๆฅๆบๅถ", businessType = BusinessType.UPDATE) | |
| 125 | + @PostMapping(value="/active") | |
| 126 | + public AjaxResult active(@RequestBody SupervisionThreestep supervisionThreestep) | |
| 127 | + { | |
| 128 | + return toAjax(supervisionThreestepService.activeSupervisionThreestep(supervisionThreestep)); | |
| 129 | + } | |
| 102 | 130 | |
| 103 | 131 | /** |
| 104 | 132 | * ๅ ้คไธๆฅๆบๅถ | ... | ... |
trash-daily/src/main/java/com/trash/daily/controller/DailyController.java renamed to trash-workFlow/src/main/java/com/trash/business/controller/TruckActivateController.java
| 1 | -package com.trash.daily.controller; | |
| 1 | +package com.trash.business.controller; | |
| 2 | 2 | |
| 3 | +import java.util.List; | |
| 4 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 5 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 6 | +import org.springframework.web.bind.annotation.GetMapping; | |
| 7 | +import org.springframework.web.bind.annotation.PostMapping; | |
| 8 | +import org.springframework.web.bind.annotation.PutMapping; | |
| 9 | +import org.springframework.web.bind.annotation.DeleteMapping; | |
| 10 | +import org.springframework.web.bind.annotation.PathVariable; | |
| 11 | +import org.springframework.web.bind.annotation.RequestBody; | |
| 12 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 13 | +import org.springframework.web.bind.annotation.RestController; | |
| 3 | 14 | import com.trash.common.annotation.Log; |
| 4 | 15 | import com.trash.common.core.controller.BaseController; |
| 5 | 16 | import com.trash.common.core.domain.AjaxResult; |
| 6 | -import com.trash.common.core.page.TableDataInfo; | |
| 7 | 17 | import com.trash.common.enums.BusinessType; |
| 18 | +import com.trash.business.domain.TruckActivate; | |
| 19 | +import com.trash.business.service.ITruckActivateService; | |
| 8 | 20 | import com.trash.common.utils.poi.ExcelUtil; |
| 9 | -import com.trash.daily.domain.PeriodicReport; | |
| 10 | -import com.trash.daily.service.IDailyService; | |
| 11 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 12 | -import org.springframework.security.access.prepost.PreAuthorize; | |
| 13 | -import org.springframework.web.bind.annotation.*; | |
| 14 | - | |
| 15 | -import java.util.List; | |
| 21 | +import com.trash.common.core.page.TableDataInfo; | |
| 16 | 22 | |
| 17 | 23 | /** |
| 18 | - * ๆฅๆฅController | |
| 24 | + * ่ฝฆ่พๆฟๆดปController | |
| 19 | 25 | * |
| 20 | 26 | * @author trash |
| 21 | - * @date 2023-04-21 | |
| 27 | + * @date 2023-05-02 | |
| 22 | 28 | */ |
| 23 | 29 | @RestController |
| 24 | -@RequestMapping("/report/daily") | |
| 25 | -public class DailyController extends BaseController | |
| 30 | +@RequestMapping("/business/truckActivate") | |
| 31 | +public class TruckActivateController extends BaseController | |
| 26 | 32 | { |
| 27 | 33 | @Autowired |
| 28 | - private IDailyService dailyService; | |
| 34 | + private ITruckActivateService truckActivateService; | |
| 29 | 35 | |
| 30 | 36 | /** |
| 31 | - * ๆฅ่ฏขๆฅๆฅๅ่กจ | |
| 37 | + * ๆฅ่ฏข่ฝฆ่พๆฟๆดปๅ่กจ | |
| 32 | 38 | */ |
| 33 | - @PreAuthorize("@ss.hasPermi('report:daily:list')") | |
| 39 | + @PreAuthorize("@ss.hasPermi('business:truckActivate:list')") | |
| 34 | 40 | @GetMapping("/list") |
| 35 | - public TableDataInfo list(PeriodicReport daily) | |
| 41 | + public TableDataInfo list(TruckActivate truckActivate) | |
| 36 | 42 | { |
| 37 | 43 | startPage(); |
| 38 | - List<PeriodicReport> list = dailyService.selectDailyList(daily); | |
| 44 | + List<TruckActivate> list = truckActivateService.selectTruckActivateList(truckActivate); | |
| 39 | 45 | return getDataTable(list); |
| 40 | 46 | } |
| 41 | 47 | |
| 42 | 48 | /** |
| 43 | - * ๅฏผๅบๆฅๆฅๅ่กจ | |
| 49 | + * ๅฏผๅบ่ฝฆ่พๆฟๆดปๅ่กจ | |
| 44 | 50 | */ |
| 45 | - @PreAuthorize("@ss.hasPermi('report:daily:export')") | |
| 46 | - @Log(title = "ๆฅๆฅ", businessType = BusinessType.EXPORT) | |
| 51 | + @PreAuthorize("@ss.hasPermi('business:truckActivate:export')") | |
| 52 | + @Log(title = "่ฝฆ่พๆฟๆดป", businessType = BusinessType.EXPORT) | |
| 47 | 53 | @GetMapping("/export") |
| 48 | - public AjaxResult export(PeriodicReport daily) | |
| 54 | + public AjaxResult export(TruckActivate truckActivate) | |
| 49 | 55 | { |
| 50 | - List<PeriodicReport> list = dailyService.selectDailyList(daily); | |
| 51 | - ExcelUtil<PeriodicReport> util = new ExcelUtil<PeriodicReport>(PeriodicReport.class); | |
| 52 | - return util.exportExcel(list, "daily"); | |
| 56 | + List<TruckActivate> list = truckActivateService.selectTruckActivateList(truckActivate); | |
| 57 | + | |
| 58 | + for(TruckActivate t:list){ | |
| 59 | + if(t.getActivateTime() == null){ | |
| 60 | + t.setIsAct("ๆชๆฟๆดป"); | |
| 61 | + }else{ | |
| 62 | + t.setIsAct("ๅทฒๆฟๆดป"); | |
| 63 | + } | |
| 64 | + } | |
| 65 | + | |
| 66 | + ExcelUtil<TruckActivate> util = new ExcelUtil<TruckActivate>(TruckActivate.class); | |
| 67 | + return util.exportExcel(list, "truckActivate"); | |
| 53 | 68 | } |
| 54 | 69 | |
| 55 | 70 | /** |
| 56 | - * ่ทๅๆฅๆฅ่ฏฆ็ปไฟกๆฏ | |
| 71 | + * ่ทๅ่ฝฆ่พๆฟๆดป่ฏฆ็ปไฟกๆฏ | |
| 57 | 72 | */ |
| 58 | - @PreAuthorize("@ss.hasPermi('report:daily:query')") | |
| 73 | + @PreAuthorize("@ss.hasPermi('business:truckActivate:query')") | |
| 59 | 74 | @GetMapping(value = "/{id}") |
| 60 | 75 | public AjaxResult getInfo(@PathVariable("id") Long id) |
| 61 | 76 | { |
| 62 | - return AjaxResult.success(dailyService.selectDailyById(id)); | |
| 77 | + return AjaxResult.success(truckActivateService.selectTruckActivateById(id)); | |
| 63 | 78 | } |
| 64 | 79 | |
| 65 | 80 | /** |
| 66 | - * ๆฐๅขๆฅๆฅ | |
| 81 | + * ๆฐๅข่ฝฆ่พๆฟๆดป | |
| 67 | 82 | */ |
| 68 | - @PreAuthorize("@ss.hasPermi('report:daily:add')") | |
| 69 | - @Log(title = "ๆฅๆฅ", businessType = BusinessType.INSERT) | |
| 83 | + @PreAuthorize("@ss.hasPermi('business:truckActivate:add')") | |
| 84 | + @Log(title = "่ฝฆ่พๆฟๆดป", businessType = BusinessType.INSERT) | |
| 70 | 85 | @PostMapping |
| 71 | - public AjaxResult add(@RequestBody PeriodicReport daily) | |
| 86 | + public AjaxResult add(@RequestBody TruckActivate truckActivate) | |
| 72 | 87 | { |
| 73 | - return toAjax(dailyService.insertDaily(daily)); | |
| 88 | + return toAjax(truckActivateService.insertTruckActivate(truckActivate)); | |
| 74 | 89 | } |
| 75 | 90 | |
| 76 | 91 | /** |
| 77 | - * ไฟฎๆนๆฅๆฅ | |
| 92 | + * ไฟฎๆน่ฝฆ่พๆฟๆดป | |
| 78 | 93 | */ |
| 79 | - @PreAuthorize("@ss.hasPermi('report:daily:edit')") | |
| 80 | - @Log(title = "ๆฅๆฅ", businessType = BusinessType.UPDATE) | |
| 94 | + @PreAuthorize("@ss.hasPermi('business:truckActivate:edit')") | |
| 95 | + @Log(title = "่ฝฆ่พๆฟๆดป", businessType = BusinessType.UPDATE) | |
| 81 | 96 | @PutMapping |
| 82 | - public AjaxResult edit(@RequestBody PeriodicReport daily) | |
| 97 | + public AjaxResult edit(@RequestBody TruckActivate truckActivate) | |
| 83 | 98 | { |
| 84 | - return toAjax(dailyService.updateDaily(daily)); | |
| 99 | + return toAjax(truckActivateService.updateTruckActivate(truckActivate)); | |
| 85 | 100 | } |
| 86 | 101 | |
| 87 | 102 | /** |
| 88 | - * ๅ ้คๆฅๆฅ | |
| 103 | + * ๅ ้ค่ฝฆ่พๆฟๆดป | |
| 89 | 104 | */ |
| 90 | - @PreAuthorize("@ss.hasPermi('report:daily:remove')") | |
| 91 | - @Log(title = "ๆฅๆฅ", businessType = BusinessType.DELETE) | |
| 105 | + @PreAuthorize("@ss.hasPermi('business:truckActivate:remove')") | |
| 106 | + @Log(title = "่ฝฆ่พๆฟๆดป", businessType = BusinessType.DELETE) | |
| 92 | 107 | @DeleteMapping("/{ids}") |
| 93 | 108 | public AjaxResult remove(@PathVariable Long[] ids) |
| 94 | 109 | { |
| 95 | - return toAjax(dailyService.deleteDailyByIds(ids)); | |
| 110 | + return toAjax(truckActivateService.deleteTruckActivateByIds(ids)); | |
| 96 | 111 | } |
| 97 | 112 | } | ... | ... |
trash-workFlow/src/main/java/com/trash/business/controller/TruckCreditController.java
| ... | ... | @@ -29,7 +29,7 @@ import com.trash.common.core.page.TableDataInfo; |
| 29 | 29 | * @date 2023-04-25 |
| 30 | 30 | */ |
| 31 | 31 | @RestController |
| 32 | -@RequestMapping("/truck/credit") | |
| 32 | +@RequestMapping("/business/truckCredit") | |
| 33 | 33 | public class TruckCreditController extends BaseController |
| 34 | 34 | { |
| 35 | 35 | @Autowired |
| ... | ... | @@ -57,11 +57,22 @@ public class TruckCreditController extends BaseController |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | @GetMapping("/names") |
| 60 | - public List<String> getNames(TruckCredit truckCredit) | |
| 60 | + public List<String> getNames(TruckCredit credit) | |
| 61 | 61 | { |
| 62 | - return truckCreditService.getNames(truckCredit); | |
| 62 | + if(credit.getStatus() == 1){ | |
| 63 | + credit.setStatus(null); | |
| 64 | + } | |
| 65 | + return truckCreditService.getNames(credit); | |
| 66 | + } | |
| 67 | + | |
| 68 | + @GetMapping("/companys") | |
| 69 | + public List<String> getCompanys(TruckCredit credit) | |
| 70 | + { | |
| 71 | + if(credit.getStatus() == 1){ | |
| 72 | + credit.setStatus(null); | |
| 73 | + } | |
| 74 | + return truckCreditService.getCompanys(credit); | |
| 63 | 75 | } |
| 64 | - | |
| 65 | 76 | /** |
| 66 | 77 | * ๅฏผๅบ่ฝฆ่พๅคฑไฟกๅ่กจ |
| 67 | 78 | */ | ... | ... |
trash-workFlow/src/main/java/com/trash/business/domain/ConstructionCredit.java
| ... | ... | @@ -18,30 +18,28 @@ public class ConstructionCredit extends BaseEntity |
| 18 | 18 | private static final long serialVersionUID = 1L; |
| 19 | 19 | |
| 20 | 20 | private Long id; |
| 21 | - | |
| 22 | - @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") | |
| 21 | + | |
| 22 | + @Excel(name = "ๅทฅๅฐๅ็งฐ") | |
| 23 | 23 | private String name; |
| 24 | 24 | |
| 25 | - @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") | |
| 25 | + @Excel(name = "ๅทฅๅฐๅๅพ็ฑปๅ") | |
| 26 | 26 | private String type; |
| 27 | 27 | |
| 28 | 28 | @JsonFormat(pattern = "yyyy-MM-dd") |
| 29 | - @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") | |
| 29 | + @Excel(name = "ๆไฝๆฅๆ",dateFormat="yyyy-MM-dd") | |
| 30 | 30 | private Date time; |
| 31 | 31 | |
| 32 | - @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") | |
| 32 | + @Excel(name = "ๆๅฑๅบๅ") | |
| 33 | 33 | private String place; |
| 34 | 34 | |
| 35 | - @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") | |
| 35 | + @Excel(name = "ๆไฝๅๅ ") | |
| 36 | 36 | private String reason; |
| 37 | 37 | |
| 38 | - @Excel(name = "0ๅฝๅ 1ๅๅฒ") | |
| 39 | 38 | private Long status; |
| 40 | 39 | |
| 41 | - @Excel(name = "0ๆค้ 1ๅคฑไฟก") | |
| 40 | + @Excel(name = "็ถๆ" , readConverterExp = "0=ๆค้ๅคฑไฟก,1=ๅคฑไฟก") | |
| 42 | 41 | private Long lostCredit; |
| 43 | 42 | |
| 44 | - @Excel(name = "${comment}") | |
| 45 | 43 | private String objectId; |
| 46 | 44 | |
| 47 | 45 | |
| ... | ... | @@ -118,8 +116,6 @@ public class ConstructionCredit extends BaseEntity |
| 118 | 116 | return lostCredit; |
| 119 | 117 | } |
| 120 | 118 | |
| 121 | - | |
| 122 | - | |
| 123 | 119 | public String getObjectId() { |
| 124 | 120 | return objectId; |
| 125 | 121 | } | ... | ... |
trash-workFlow/src/main/java/com/trash/business/domain/DriverCredit.java
| ... | ... | @@ -21,7 +21,7 @@ public class DriverCredit extends BaseEntity |
| 21 | 21 | private Long id; |
| 22 | 22 | |
| 23 | 23 | /** ่ฟ่พไผไธ */ |
| 24 | - @Excel(name = "่ฟ่พไผไธ") | |
| 24 | + @Excel(name = "ๅงๅ") | |
| 25 | 25 | private String name; |
| 26 | 26 | |
| 27 | 27 | /** ่ฏไปถๅท็ */ |
| ... | ... | @@ -38,15 +38,13 @@ public class DriverCredit extends BaseEntity |
| 38 | 38 | private String reason; |
| 39 | 39 | |
| 40 | 40 | /** 0ๅฝๅ 1ๅๅฒ */ |
| 41 | - @Excel(name = "0ๅฝๅ 1ๅๅฒ") | |
| 42 | 41 | private Long status; |
| 43 | 42 | |
| 44 | 43 | /** 0ๆค้ 1ๅคฑไฟก */ |
| 45 | - @Excel(name = "0ๆค้ 1ๅคฑไฟก") | |
| 44 | + @Excel(name = "็ถๆ", readConverterExp = "0=ๆค้ๅคฑไฟก,1=ๅคฑไฟก") | |
| 46 | 45 | private Long lostCredit; |
| 47 | 46 | |
| 48 | 47 | /** ๅบ็กๆฐๆฎID */ |
| 49 | - @Excel(name = "ๅบ็กๆฐๆฎID") | |
| 50 | 48 | private String objectId; |
| 51 | 49 | |
| 52 | 50 | ... | ... |
trash-workFlow/src/main/java/com/trash/business/domain/EarthsitesCredit.java
| ... | ... | @@ -42,15 +42,13 @@ public class EarthsitesCredit extends BaseEntity |
| 42 | 42 | private String reason; |
| 43 | 43 | |
| 44 | 44 | /** 0ๅฝๅ 1ๅๅฒ */ |
| 45 | - @Excel(name = "0ๅฝๅ 1ๅๅฒ") | |
| 46 | 45 | private Long status; |
| 47 | 46 | |
| 48 | 47 | /** 0ๆค้ 1ๅคฑไฟก */ |
| 49 | - @Excel(name = "0ๆค้ 1ๅคฑไฟก") | |
| 48 | + @Excel(name = "็ถๆ" , readConverterExp = "0=ๆค้ๅคฑไฟก,1=ๅคฑไฟก") | |
| 50 | 49 | private Long lostCredit; |
| 51 | 50 | |
| 52 | 51 | /** ๅบ็กๆฐๆฎID */ |
| 53 | - @Excel(name = "ๅบ็กๆฐๆฎID") | |
| 54 | 52 | private String objectId; |
| 55 | 53 | |
| 56 | 54 | public void setId(Long id) | ... | ... |
trash-workFlow/src/main/java/com/trash/business/domain/SupervisionSpecial.java
0 โ 100644
| 1 | +package com.trash.business.domain; | |
| 2 | + | |
| 3 | +import java.util.Date; | |
| 4 | +import com.fasterxml.jackson.annotation.JsonFormat; | |
| 5 | +import org.apache.commons.lang3.builder.ToStringBuilder; | |
| 6 | +import org.apache.commons.lang3.builder.ToStringStyle; | |
| 7 | +import com.trash.common.annotation.Excel; | |
| 8 | +import com.trash.common.core.domain.BaseEntity; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * ไธ้กน็ฃๆฅๅฏน่ฑก supervision_special | |
| 12 | + * | |
| 13 | + * @author trash | |
| 14 | + * @date 2023-05-03 | |
| 15 | + */ | |
| 16 | +public class SupervisionSpecial extends BaseEntity | |
| 17 | +{ | |
| 18 | + private static final long serialVersionUID = 1L; | |
| 19 | + | |
| 20 | + /** ไธป้ฎID */ | |
| 21 | + private String id; | |
| 22 | + | |
| 23 | + /** ็ฑปๅ */ | |
| 24 | + @Excel(name = "็ฑปๅ") | |
| 25 | + private String type; | |
| 26 | + | |
| 27 | + /** ็ฃๆฅไบ้กน */ | |
| 28 | + @Excel(name = "็ฃๆฅไบ้กน") | |
| 29 | + private String title; | |
| 30 | + | |
| 31 | + /** ็ฃๆฅๅ ๅฎน */ | |
| 32 | + @Excel(name = "็ฃๆฅๅ ๅฎน") | |
| 33 | + private String content; | |
| 34 | + | |
| 35 | + /** ่ดฃไปป้จ้จไบบ็ญพๆถ */ | |
| 36 | + @Excel(name = "่ดฃไปป้จ้จไบบ็ญพๆถ") | |
| 37 | + private String signPerson; | |
| 38 | + | |
| 39 | + /** ็ญพๆถๆถ้ด */ | |
| 40 | + @JsonFormat(pattern = "yyyy-MM-dd") | |
| 41 | + @Excel(name = "็ญพๆถๆถ้ด", width = 30, dateFormat = "yyyy-MM-dd") | |
| 42 | + private Date signTime; | |
| 43 | + | |
| 44 | + /** ๅๅคๆ้ */ | |
| 45 | + @JsonFormat(pattern = "yyyy-MM-dd") | |
| 46 | + @Excel(name = "ๅๅคๆ้", width = 30, dateFormat = "yyyy-MM-dd") | |
| 47 | + private Date timeLimit; | |
| 48 | + | |
| 49 | + /** ็ถๆ */ | |
| 50 | + @Excel(name = "็ถๆ") | |
| 51 | + private String state; | |
| 52 | + | |
| 53 | + /** ๅๅค้จ้จ */ | |
| 54 | + @Excel(name = "ๅๅค้จ้จ") | |
| 55 | + private String resDepart; | |
| 56 | + | |
| 57 | + /** ๅๅคๆถ้ด */ | |
| 58 | + @JsonFormat(pattern = "yyyy-MM-dd") | |
| 59 | + @Excel(name = "ๅๅคๆถ้ด", width = 30, dateFormat = "yyyy-MM-dd") | |
| 60 | + private Date resTime; | |
| 61 | + | |
| 62 | + /** ๅๅค้จ้จ่ด่ดฃไบบ */ | |
| 63 | + @Excel(name = "ๅๅค้จ้จ่ด่ดฃไบบ") | |
| 64 | + private String resPerson; | |
| 65 | + | |
| 66 | + /** ๅๅคๅ ๅฎน */ | |
| 67 | + @Excel(name = "ๅๅคๅ ๅฎน") | |
| 68 | + private String resContent; | |
| 69 | + | |
| 70 | + /** ๆนๆณจ */ | |
| 71 | + @Excel(name = "ๆนๆณจ") | |
| 72 | + private String annotations; | |
| 73 | + | |
| 74 | + public void setId(String id) | |
| 75 | + { | |
| 76 | + this.id = id; | |
| 77 | + } | |
| 78 | + | |
| 79 | + public String getId() | |
| 80 | + { | |
| 81 | + return id; | |
| 82 | + } | |
| 83 | + public void setType(String type) | |
| 84 | + { | |
| 85 | + this.type = type; | |
| 86 | + } | |
| 87 | + | |
| 88 | + public String getType() | |
| 89 | + { | |
| 90 | + return type; | |
| 91 | + } | |
| 92 | + public void setTitle(String title) | |
| 93 | + { | |
| 94 | + this.title = title; | |
| 95 | + } | |
| 96 | + | |
| 97 | + public String getTitle() | |
| 98 | + { | |
| 99 | + return title; | |
| 100 | + } | |
| 101 | + public void setContent(String content) | |
| 102 | + { | |
| 103 | + this.content = content; | |
| 104 | + } | |
| 105 | + | |
| 106 | + public String getContent() | |
| 107 | + { | |
| 108 | + return content; | |
| 109 | + } | |
| 110 | + public void setSignPerson(String signPerson) | |
| 111 | + { | |
| 112 | + this.signPerson = signPerson; | |
| 113 | + } | |
| 114 | + | |
| 115 | + public String getSignPerson() | |
| 116 | + { | |
| 117 | + return signPerson; | |
| 118 | + } | |
| 119 | + public void setSignTime(Date signTime) | |
| 120 | + { | |
| 121 | + this.signTime = signTime; | |
| 122 | + } | |
| 123 | + | |
| 124 | + public Date getSignTime() | |
| 125 | + { | |
| 126 | + return signTime; | |
| 127 | + } | |
| 128 | + public void setTimeLimit(Date timeLimit) | |
| 129 | + { | |
| 130 | + this.timeLimit = timeLimit; | |
| 131 | + } | |
| 132 | + | |
| 133 | + public Date getTimeLimit() | |
| 134 | + { | |
| 135 | + return timeLimit; | |
| 136 | + } | |
| 137 | + public void setState(String state) | |
| 138 | + { | |
| 139 | + this.state = state; | |
| 140 | + } | |
| 141 | + | |
| 142 | + public String getState() | |
| 143 | + { | |
| 144 | + return state; | |
| 145 | + } | |
| 146 | + public void setResDepart(String resDepart) | |
| 147 | + { | |
| 148 | + this.resDepart = resDepart; | |
| 149 | + } | |
| 150 | + | |
| 151 | + public String getResDepart() | |
| 152 | + { | |
| 153 | + return resDepart; | |
| 154 | + } | |
| 155 | + public void setResTime(Date resTime) | |
| 156 | + { | |
| 157 | + this.resTime = resTime; | |
| 158 | + } | |
| 159 | + | |
| 160 | + public Date getResTime() | |
| 161 | + { | |
| 162 | + return resTime; | |
| 163 | + } | |
| 164 | + public void setResPerson(String resPerson) | |
| 165 | + { | |
| 166 | + this.resPerson = resPerson; | |
| 167 | + } | |
| 168 | + | |
| 169 | + public String getResPerson() | |
| 170 | + { | |
| 171 | + return resPerson; | |
| 172 | + } | |
| 173 | + public void setResContent(String resContent) | |
| 174 | + { | |
| 175 | + this.resContent = resContent; | |
| 176 | + } | |
| 177 | + | |
| 178 | + public String getResContent() | |
| 179 | + { | |
| 180 | + return resContent; | |
| 181 | + } | |
| 182 | + public void setAnnotations(String annotations) | |
| 183 | + { | |
| 184 | + this.annotations = annotations; | |
| 185 | + } | |
| 186 | + | |
| 187 | + public String getAnnotations() | |
| 188 | + { | |
| 189 | + return annotations; | |
| 190 | + } | |
| 191 | + | |
| 192 | + @Override | |
| 193 | + public String toString() { | |
| 194 | + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | |
| 195 | + .append("id", getId()) | |
| 196 | + .append("type", getType()) | |
| 197 | + .append("title", getTitle()) | |
| 198 | + .append("content", getContent()) | |
| 199 | + .append("signPerson", getSignPerson()) | |
| 200 | + .append("signTime", getSignTime()) | |
| 201 | + .append("timeLimit", getTimeLimit()) | |
| 202 | + .append("state", getState()) | |
| 203 | + .append("createBy", getCreateBy()) | |
| 204 | + .append("createTime", getCreateTime()) | |
| 205 | + .append("updateTime", getUpdateTime()) | |
| 206 | + .append("updateBy", getUpdateBy()) | |
| 207 | + .append("resDepart", getResDepart()) | |
| 208 | + .append("resTime", getResTime()) | |
| 209 | + .append("resPerson", getResPerson()) | |
| 210 | + .append("resContent", getResContent()) | |
| 211 | + .append("annotations", getAnnotations()) | |
| 212 | + .toString(); | |
| 213 | + } | |
| 214 | +} | ... | ... |
trash-workFlow/src/main/java/com/trash/business/domain/SupervisionThreestep.java
| ... | ... | @@ -47,8 +47,15 @@ public class SupervisionThreestep extends BaseEntity |
| 47 | 47 | |
| 48 | 48 | /** ๆฃๆฅๆถ้ด */ |
| 49 | 49 | @JsonFormat(pattern = "yyyy-MM-dd") |
| 50 | - @Excel(name = "ๆฃๆฅๆถ้ด", width = 30, dateFormat = "yyyy-MM-dd") | |
| 50 | + @Excel(name = "ๅทกๆฅๆถ้ด", width = 30, dateFormat = "yyyy-MM-dd") | |
| 51 | 51 | private Date checkTime; |
| 52 | + | |
| 53 | + | |
| 54 | + /** ๆฃๆฅๆถ้ด */ | |
| 55 | + @JsonFormat(pattern = "yyyy-MM-dd") | |
| 56 | + @Excel(name = "ๆฝๆฅๆถ้ด", width = 30, dateFormat = "yyyy-MM-dd") | |
| 57 | + private Date checkEndTime; | |
| 58 | + | |
| 52 | 59 | |
| 53 | 60 | /** ๆถ็บณๅบๅ็งฐ */ |
| 54 | 61 | @Excel(name = "ๆถ็บณๅบๅ็งฐ") |
| ... | ... | @@ -66,59 +73,264 @@ public class SupervisionThreestep extends BaseEntity |
| 66 | 73 | @Excel(name = "่ฟ่พ่ฝฆ่พ") |
| 67 | 74 | private String companyTrucks; |
| 68 | 75 | |
| 69 | - /** ่ฟๆฐดๆงฝ็ ง็ */ | |
| 70 | - @Excel(name = "่ฟๆฐดๆงฝ็ ง็") | |
| 71 | 76 | private String img0; |
| 72 | 77 | |
| 73 | - /** ๆด่ฝฆๅนณๅฐ็ ง็ */ | |
| 74 | - @Excel(name = "ๆด่ฝฆๅนณๅฐ็ ง็") | |
| 75 | 78 | private String img1; |
| 76 | 79 | |
| 77 | - /** ๅบๅ ฅๅฃ็ ง็ */ | |
| 78 | - @Excel(name = "ๅบๅ ฅๅฃ็ ง็") | |
| 79 | 80 | private String img2; |
| 80 | 81 | |
| 81 | - /** ๆฒๆทๆฑ ็ ง็ */ | |
| 82 | - @Excel(name = "ๆฒๆทๆฑ ็ ง็") | |
| 83 | 82 | private String img3; |
| 84 | 83 | |
| 85 | - /** ็กฌ่ดจ่ทฏ้ข็ ง็ */ | |
| 86 | - @Excel(name = "็กฌ่ดจ่ทฏ้ข็ ง็") | |
| 87 | 84 | private String img4; |
| 88 | 85 | |
| 89 | - /** ๆๅๅคด่ง้ขๆชๅพ1 */ | |
| 90 | - @Excel(name = "ๆๅๅคด่ง้ขๆชๅพ1") | |
| 91 | 86 | private String img5; |
| 92 | 87 | |
| 93 | - /** ๆๅๅคด่ง้ขๆชๅพ2 */ | |
| 94 | - @Excel(name = "ๆๅๅคด่ง้ขๆชๅพ2") | |
| 95 | 88 | private String img6; |
| 96 | 89 | |
| 97 | - /** ๆๅๅคด่ง้ขๆชๅพ3 */ | |
| 98 | - @Excel(name = "ๆๅๅคด่ง้ขๆชๅพ3") | |
| 99 | 90 | private String img7; |
| 100 | 91 | |
| 101 | - /** ๅ ถไป1 */ | |
| 102 | - @Excel(name = "ๅ ถไป1") | |
| 103 | 92 | private String img8; |
| 104 | 93 | |
| 105 | - /** ๅ ถไป2 */ | |
| 106 | - @Excel(name = "ๅ ถไป2") | |
| 107 | 94 | private String img9; |
| 108 | 95 | |
| 109 | - /** ๅ ถไป3 */ | |
| 110 | - @Excel(name = "ๅ ถไป3") | |
| 111 | 96 | private String img10; |
| 112 | 97 | |
| 113 | - /** ๅ ถไป4 */ | |
| 114 | - @Excel(name = "ๅ ถไป4") | |
| 115 | 98 | private String img11; |
| 116 | 99 | |
| 117 | - /** ๅ ถไป5 */ | |
| 118 | - @Excel(name = "ๅ ถไป5") | |
| 119 | 100 | private String img12; |
| 101 | + | |
| 102 | + private String sub_img0; | |
| 103 | + | |
| 104 | + private String sub_img1; | |
| 105 | + | |
| 106 | + private String sub_img2; | |
| 107 | + | |
| 108 | + private String sub_img3; | |
| 109 | + | |
| 110 | + private String sub_img4; | |
| 111 | + | |
| 112 | + private String sub_img5; | |
| 113 | + | |
| 114 | + private String sub_img6; | |
| 115 | + | |
| 116 | + private String sub_img7; | |
| 117 | + | |
| 118 | + private String sub_img8; | |
| 119 | + | |
| 120 | + private String sub_img9; | |
| 121 | + | |
| 122 | + private String sub_img10; | |
| 123 | + | |
| 124 | + private String sub_img11; | |
| 125 | + | |
| 126 | + private String sub_img12; | |
| 127 | + | |
| 128 | + private String subReason; | |
| 129 | + private String earthPipPerson; | |
| 130 | + private String enforcePerson; | |
| 131 | + private String subSubReason; | |
| 132 | + private String attchItem1; | |
| 133 | + private String attchItem2; | |
| 134 | + private String attchItem3; | |
| 135 | + | |
| 136 | + private Date workStartTime; | |
| 137 | + private Date workEndTime; | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + public Date getWorkStartTime() { | |
| 142 | + return workStartTime; | |
| 143 | + } | |
| 144 | + | |
| 145 | + public void setWorkStartTime(Date workStartTime) { | |
| 146 | + this.workStartTime = workStartTime; | |
| 147 | + } | |
| 148 | + | |
| 149 | + public Date getWorkEndTime() { | |
| 150 | + return workEndTime; | |
| 151 | + } | |
| 152 | + | |
| 153 | + public void setWorkEndTime(Date workEndTime) { | |
| 154 | + this.workEndTime = workEndTime; | |
| 155 | + } | |
| 156 | + | |
| 157 | + public Date getCheckEndTime() { | |
| 158 | + return checkEndTime; | |
| 159 | + } | |
| 160 | + | |
| 161 | + public void setCheckEndTime(Date checkEndTime) { | |
| 162 | + this.checkEndTime = checkEndTime; | |
| 163 | + } | |
| 164 | + | |
| 165 | + public String getSubReason() { | |
| 166 | + return subReason; | |
| 167 | + } | |
| 168 | + | |
| 169 | + public void setSubReason(String subReason) { | |
| 170 | + this.subReason = subReason; | |
| 171 | + } | |
| 172 | + | |
| 173 | + public String getEarthPipPerson() { | |
| 174 | + return earthPipPerson; | |
| 175 | + } | |
| 176 | + | |
| 177 | + public void setEarthPipPerson(String earthPipPerson) { | |
| 178 | + this.earthPipPerson = earthPipPerson; | |
| 179 | + } | |
| 180 | + | |
| 181 | + public String getEnforcePerson() { | |
| 182 | + return enforcePerson; | |
| 183 | + } | |
| 184 | + | |
| 185 | + public void setEnforcePerson(String enforcePerson) { | |
| 186 | + this.enforcePerson = enforcePerson; | |
| 187 | + } | |
| 188 | + | |
| 189 | + public String getSubSubReason() { | |
| 190 | + return subSubReason; | |
| 191 | + } | |
| 192 | + | |
| 193 | + public void setSubSubReason(String subSubReason) { | |
| 194 | + this.subSubReason = subSubReason; | |
| 195 | + } | |
| 196 | + | |
| 197 | + public String getAttchItem1() { | |
| 198 | + return attchItem1; | |
| 199 | + } | |
| 200 | + | |
| 201 | + public void setAttchItem1(String attchItem1) { | |
| 202 | + this.attchItem1 = attchItem1; | |
| 203 | + } | |
| 204 | + | |
| 205 | + public String getAttchItem2() { | |
| 206 | + return attchItem2; | |
| 207 | + } | |
| 208 | + | |
| 209 | + public void setAttchItem2(String attchItem2) { | |
| 210 | + this.attchItem2 = attchItem2; | |
| 211 | + } | |
| 212 | + | |
| 213 | + public String getAttchItem3() { | |
| 214 | + return attchItem3; | |
| 215 | + } | |
| 216 | + | |
| 217 | + public void setAttchItem3(String attchItem3) { | |
| 218 | + this.attchItem3 = attchItem3; | |
| 219 | + } | |
| 220 | + | |
| 221 | + public String getSub_img0() { | |
| 222 | + return sub_img0; | |
| 223 | + } | |
| 224 | + | |
| 225 | + public void setSub_img0(String sub_img0) { | |
| 226 | + this.sub_img0 = sub_img0; | |
| 227 | + } | |
| 228 | + | |
| 229 | + public String getSub_img1() { | |
| 230 | + return sub_img1; | |
| 231 | + } | |
| 232 | + | |
| 233 | + public void setSub_img1(String sub_img1) { | |
| 234 | + this.sub_img1 = sub_img1; | |
| 235 | + } | |
| 236 | + | |
| 237 | + public String getSub_img2() { | |
| 238 | + return sub_img2; | |
| 239 | + } | |
| 240 | + | |
| 241 | + public void setSub_img2(String sub_img2) { | |
| 242 | + this.sub_img2 = sub_img2; | |
| 243 | + } | |
| 244 | + | |
| 245 | + public String getSub_img3() { | |
| 246 | + return sub_img3; | |
| 247 | + } | |
| 248 | + | |
| 249 | + public void setSub_img3(String sub_img3) { | |
| 250 | + this.sub_img3 = sub_img3; | |
| 251 | + } | |
| 252 | + | |
| 253 | + public String getSub_img4() { | |
| 254 | + return sub_img4; | |
| 255 | + } | |
| 256 | + | |
| 257 | + public void setSub_img4(String sub_img4) { | |
| 258 | + this.sub_img4 = sub_img4; | |
| 259 | + } | |
| 260 | + | |
| 261 | + public String getSub_img5() { | |
| 262 | + return sub_img5; | |
| 263 | + } | |
| 264 | + | |
| 265 | + public void setSub_img5(String sub_img5) { | |
| 266 | + this.sub_img5 = sub_img5; | |
| 267 | + } | |
| 268 | + | |
| 269 | + public String getSub_img6() { | |
| 270 | + return sub_img6; | |
| 271 | + } | |
| 272 | + | |
| 273 | + public void setSub_img6(String sub_img6) { | |
| 274 | + this.sub_img6 = sub_img6; | |
| 275 | + } | |
| 276 | + | |
| 277 | + public String getSub_img7() { | |
| 278 | + return sub_img7; | |
| 279 | + } | |
| 280 | + | |
| 281 | + public void setSub_img7(String sub_img7) { | |
| 282 | + this.sub_img7 = sub_img7; | |
| 283 | + } | |
| 284 | + | |
| 285 | + public String getSub_img8() { | |
| 286 | + return sub_img8; | |
| 287 | + } | |
| 288 | + | |
| 289 | + public void setSub_img8(String sub_img8) { | |
| 290 | + this.sub_img8 = sub_img8; | |
| 291 | + } | |
| 292 | + | |
| 293 | + public String getSub_img9() { | |
| 294 | + return sub_img9; | |
| 295 | + } | |
| 296 | + | |
| 297 | + public void setSub_img9(String sub_img9) { | |
| 298 | + this.sub_img9 = sub_img9; | |
| 299 | + } | |
| 300 | + | |
| 301 | + public String getSub_img10() { | |
| 302 | + return sub_img10; | |
| 303 | + } | |
| 304 | + | |
| 305 | + public void setSub_img10(String sub_img10) { | |
| 306 | + this.sub_img10 = sub_img10; | |
| 307 | + } | |
| 308 | + | |
| 309 | + public String getSub_img11() { | |
| 310 | + return sub_img11; | |
| 311 | + } | |
| 312 | + | |
| 313 | + public void setSub_img11(String sub_img11) { | |
| 314 | + this.sub_img11 = sub_img11; | |
| 315 | + } | |
| 316 | + | |
| 317 | + public String getSub_img12() { | |
| 318 | + return sub_img12; | |
| 319 | + } | |
| 320 | + | |
| 321 | + public void setSub_img12(String sub_img12) { | |
| 322 | + this.sub_img12 = sub_img12; | |
| 323 | + } | |
| 324 | + | |
| 325 | + public Long getStatus() { | |
| 326 | + return status; | |
| 327 | + } | |
| 328 | + | |
| 329 | + public void setStatus(Long status) { | |
| 330 | + this.status = status; | |
| 331 | + } | |
| 120 | 332 | |
| 121 | - /** ็ฐๅบ่ด่ดฃไบบ */ | |
| 333 | + /** ็ฐๅบ่ด่ดฃไบบ */ | |
| 122 | 334 | @Excel(name = "็ฐๅบ่ด่ดฃไบบ") |
| 123 | 335 | private String person; |
| 124 | 336 | ... | ... |
trash-workFlow/src/main/java/com/trash/business/domain/TruckActivate.java
0 โ 100644
| 1 | +package com.trash.business.domain; | |
| 2 | + | |
| 3 | +import java.util.Date; | |
| 4 | +import com.fasterxml.jackson.annotation.JsonFormat; | |
| 5 | +import org.apache.commons.lang3.builder.ToStringBuilder; | |
| 6 | +import org.apache.commons.lang3.builder.ToStringStyle; | |
| 7 | +import com.trash.common.annotation.Excel; | |
| 8 | +import com.trash.common.core.domain.BaseEntity; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * ่ฝฆ่พๆฟๆดปๅฏน่ฑก truck_activate | |
| 12 | + * | |
| 13 | + * @author trash | |
| 14 | + * @date 2023-05-02 | |
| 15 | + */ | |
| 16 | +public class TruckActivate extends BaseEntity | |
| 17 | +{ | |
| 18 | + private static final long serialVersionUID = 1L; | |
| 19 | + | |
| 20 | + /** ๅบๅท */ | |
| 21 | + private Long id; | |
| 22 | + | |
| 23 | + /** ๆๅฑไผไธ */ | |
| 24 | + @Excel(name = "ๆๅฑไผไธ") | |
| 25 | + private String company; | |
| 26 | + | |
| 27 | + /** ่ฝฆ็ๅท | |
| 28 | + */ | |
| 29 | + @Excel(name = "่ฝฆ็ๅท") | |
| 30 | + private String licensePlate; | |
| 31 | + | |
| 32 | + /** ๅคฑไฟกๆถ้ด */ | |
| 33 | + @JsonFormat(pattern = "yyyy-MM-dd") | |
| 34 | + private Date time; | |
| 35 | + | |
| 36 | + /** ๆๅฑๅทฅๅฐ */ | |
| 37 | + @Excel(name = "ๆๅฑๅทฅๅฐ") | |
| 38 | + private String construction; | |
| 39 | + | |
| 40 | + /** ็ถๆ 0ๅฝๅ 1ๅๅฒ */ | |
| 41 | + private Long status; | |
| 42 | + | |
| 43 | + /** ๆถ็บณๅบ */ | |
| 44 | + @Excel(name = "ๆถ็บณๅบ") | |
| 45 | + private String earthsite; | |
| 46 | + | |
| 47 | + /** ๅบ็กๆฐๆฎID */ | |
| 48 | + private String objectId; | |
| 49 | + | |
| 50 | + /** ๆฏๅฆๆๅจๅฝๅ ฅ 0ๆๅจ 1่ชๅจ */ | |
| 51 | + private Integer createType; | |
| 52 | + | |
| 53 | + /** ๆฟๆดปๆถ้ด */ | |
| 54 | + @JsonFormat(pattern = "yyyy-MM-dd") | |
| 55 | + @Excel(name = "ๆฟๆดปๆถ้ด", width = 30, dateFormat = "yyyy-MM-dd") | |
| 56 | + private Date activateTime; | |
| 57 | + | |
| 58 | + @Excel(name = "็ถๆ") | |
| 59 | + private String isAct; | |
| 60 | + | |
| 61 | + public String getIsAct() { | |
| 62 | + return activateTime==null?"ๆชๆฟๆดป":"ๆฟๆดป"; | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void setIsAct(String isAct) { | |
| 66 | + this.isAct = isAct; | |
| 67 | + } | |
| 68 | + | |
| 69 | + public void setId(Long id) | |
| 70 | + { | |
| 71 | + this.id = id; | |
| 72 | + } | |
| 73 | + | |
| 74 | + public Long getId() | |
| 75 | + { | |
| 76 | + return id; | |
| 77 | + } | |
| 78 | + public void setCompany(String company) | |
| 79 | + { | |
| 80 | + this.company = company; | |
| 81 | + } | |
| 82 | + | |
| 83 | + public String getCompany() | |
| 84 | + { | |
| 85 | + return company; | |
| 86 | + } | |
| 87 | + public void setLicensePlate(String licensePlate) | |
| 88 | + { | |
| 89 | + this.licensePlate = licensePlate; | |
| 90 | + } | |
| 91 | + | |
| 92 | + public String getLicensePlate() | |
| 93 | + { | |
| 94 | + return licensePlate; | |
| 95 | + } | |
| 96 | + public void setTime(Date time) | |
| 97 | + { | |
| 98 | + this.time = time; | |
| 99 | + } | |
| 100 | + | |
| 101 | + public Date getTime() | |
| 102 | + { | |
| 103 | + return time; | |
| 104 | + } | |
| 105 | + public void setConstruction(String construction) | |
| 106 | + { | |
| 107 | + this.construction = construction; | |
| 108 | + } | |
| 109 | + | |
| 110 | + public String getConstruction() | |
| 111 | + { | |
| 112 | + return construction; | |
| 113 | + } | |
| 114 | + public void setStatus(Long status) | |
| 115 | + { | |
| 116 | + this.status = status; | |
| 117 | + } | |
| 118 | + | |
| 119 | + public Long getStatus() | |
| 120 | + { | |
| 121 | + return status; | |
| 122 | + } | |
| 123 | + public void setEarthsite(String earthsite) | |
| 124 | + { | |
| 125 | + this.earthsite = earthsite; | |
| 126 | + } | |
| 127 | + | |
| 128 | + public String getEarthsite() | |
| 129 | + { | |
| 130 | + return earthsite; | |
| 131 | + } | |
| 132 | + public void setObjectId(String objectId) | |
| 133 | + { | |
| 134 | + this.objectId = objectId; | |
| 135 | + } | |
| 136 | + | |
| 137 | + public String getObjectId() | |
| 138 | + { | |
| 139 | + return objectId; | |
| 140 | + } | |
| 141 | + public void setCreateType(Integer createType) | |
| 142 | + { | |
| 143 | + this.createType = createType; | |
| 144 | + } | |
| 145 | + | |
| 146 | + public Integer getCreateType() | |
| 147 | + { | |
| 148 | + return createType; | |
| 149 | + } | |
| 150 | + public void setActivateTime(Date activateTime) | |
| 151 | + { | |
| 152 | + this.activateTime = activateTime; | |
| 153 | + } | |
| 154 | + | |
| 155 | + public Date getActivateTime() | |
| 156 | + { | |
| 157 | + return activateTime; | |
| 158 | + } | |
| 159 | + | |
| 160 | + @Override | |
| 161 | + public String toString() { | |
| 162 | + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | |
| 163 | + .append("id", getId()) | |
| 164 | + .append("company", getCompany()) | |
| 165 | + .append("licensePlate", getLicensePlate()) | |
| 166 | + .append("time", getTime()) | |
| 167 | + .append("construction", getConstruction()) | |
| 168 | + .append("status", getStatus()) | |
| 169 | + .append("earthsite", getEarthsite()) | |
| 170 | + .append("objectId", getObjectId()) | |
| 171 | + .append("createBy", getCreateBy()) | |
| 172 | + .append("createType", getCreateType()) | |
| 173 | + .append("activateTime", getActivateTime()) | |
| 174 | + .append("createTime", getCreateTime()) | |
| 175 | + .toString(); | |
| 176 | + } | |
| 177 | +} | ... | ... |
trash-workFlow/src/main/java/com/trash/business/domain/TruckCredit.java
| ... | ... | @@ -22,7 +22,7 @@ public class TruckCredit extends BaseEntity |
| 22 | 22 | private Long id; |
| 23 | 23 | |
| 24 | 24 | /** ่ฟ่พไผไธ็ผๅท */ |
| 25 | - @Excel(name = "่ฟ่พไผไธ็ผๅท") | |
| 25 | + @Excel(name = "่ฟ่พไผไธ") | |
| 26 | 26 | private String companyId; |
| 27 | 27 | |
| 28 | 28 | /** ่ฝฆ็ๅท็ */ |
| ... | ... | @@ -34,11 +34,10 @@ public class TruckCredit extends BaseEntity |
| 34 | 34 | private String reason; |
| 35 | 35 | |
| 36 | 36 | /** 0ๅฝๅ 1ๅๅฒ */ |
| 37 | - @Excel(name = "0ๅฝๅ 1ๅๅฒ") | |
| 38 | 37 | private Long status; |
| 39 | 38 | |
| 40 | 39 | /** 0ๆค้ 1ๅคฑไฟก */ |
| 41 | - @Excel(name = "0ๆค้ 1ๅคฑไฟก") | |
| 40 | + @Excel(name = "็ถๆ", readConverterExp = "0=ๆค้ๅคฑไฟก,1=ๅคฑไฟก") | |
| 42 | 41 | private Long lostCredit; |
| 43 | 42 | |
| 44 | 43 | /** ๅบ็กๆฐๆฎID */ |
| ... | ... | @@ -46,7 +45,7 @@ public class TruckCredit extends BaseEntity |
| 46 | 45 | private String objectId; |
| 47 | 46 | |
| 48 | 47 | @JsonFormat(pattern = "yyyy-MM-dd") |
| 49 | - @Excel(name = "${ๅคฑไฟกๆถ้ด}", readConverterExp = "$column.readConverterExp()") | |
| 48 | + @Excel(name = "${ๅคฑไฟกๆถ้ด}", dateFormat = "yyyy-MM-dd") | |
| 50 | 49 | private Date time; |
| 51 | 50 | |
| 52 | 51 | ... | ... |
trash-workFlow/src/main/java/com/trash/business/mapper/CompanyCreditMapper.java
| ... | ... | @@ -57,4 +57,6 @@ public interface CompanyCreditMapper { |
| 57 | 57 | public List<String> getNames(CompanyCredit companyCredit); |
| 58 | 58 | |
| 59 | 59 | public List<CompanyCredit> selectCompanyCreditHistory(CompanyCredit companyCredit); |
| 60 | + | |
| 61 | + public List<String> getPlaces(CompanyCredit companyCredit); | |
| 60 | 62 | } | ... | ... |
trash-workFlow/src/main/java/com/trash/business/mapper/EarthsitesCreditMapper.java
| ... | ... | @@ -63,5 +63,9 @@ public interface EarthsitesCreditMapper |
| 63 | 63 | |
| 64 | 64 | public List<String> getNames(EarthsitesCredit earthsitesCredit); |
| 65 | 65 | |
| 66 | + public List<String> getTypes(EarthsitesCredit earthsitesCredit); | |
| 67 | + | |
| 68 | + public List<String> getPlaces(EarthsitesCredit earthsitesCredit); | |
| 69 | + | |
| 66 | 70 | public List<EarthsitesCredit> selectEarthsitesCreditHistory(EarthsitesCredit earthsitesCredit); |
| 67 | 71 | } |
| 68 | 72 | \ No newline at end of file | ... | ... |
trash-daily/src/main/java/com/trash/weekly/mapper/WeeklyMapper.java renamed to trash-workFlow/src/main/java/com/trash/business/mapper/SupervisionSpecialMapper.java
| 1 | -package com.trash.weekly.mapper; | |
| 2 | - | |
| 3 | -import com.trash.daily.domain.PeriodicReport; | |
| 1 | +package com.trash.business.mapper; | |
| 4 | 2 | |
| 5 | 3 | import java.util.List; |
| 4 | +import com.trash.business.domain.SupervisionSpecial; | |
| 6 | 5 | |
| 7 | 6 | /** |
| 8 | - * ๅจๆฅMapperๆฅๅฃ | |
| 7 | + * ไธ้กน็ฃๆฅMapperๆฅๅฃ | |
| 9 | 8 | * |
| 10 | 9 | * @author trash |
| 11 | - * @date 2023-04-21 | |
| 10 | + * @date 2023-05-03 | |
| 12 | 11 | */ |
| 13 | -public interface WeeklyMapper | |
| 12 | +public interface SupervisionSpecialMapper | |
| 14 | 13 | { |
| 15 | 14 | /** |
| 16 | - * ๆฅ่ฏขๅจๆฅ | |
| 15 | + * ๆฅ่ฏขไธ้กน็ฃๆฅ | |
| 17 | 16 | * |
| 18 | - * @param id ๅจๆฅID | |
| 19 | - * @return ๅจๆฅ | |
| 17 | + * @param id ไธ้กน็ฃๆฅID | |
| 18 | + * @return ไธ้กน็ฃๆฅ | |
| 20 | 19 | */ |
| 21 | - public PeriodicReport selectWeeklyById(Long id); | |
| 20 | + public SupervisionSpecial selectSupervisionSpecialById(String id); | |
| 22 | 21 | |
| 23 | 22 | /** |
| 24 | - * ๆฅ่ฏขๅจๆฅๅ่กจ | |
| 23 | + * ๆฅ่ฏขไธ้กน็ฃๆฅๅ่กจ | |
| 25 | 24 | * |
| 26 | - * @param weekly ๅจๆฅ | |
| 27 | - * @return ๅจๆฅ้ๅ | |
| 25 | + * @param supervisionSpecial ไธ้กน็ฃๆฅ | |
| 26 | + * @return ไธ้กน็ฃๆฅ้ๅ | |
| 28 | 27 | */ |
| 29 | - public List<PeriodicReport> selectWeeklyList(PeriodicReport weekly); | |
| 28 | + public List<SupervisionSpecial> selectSupervisionSpecialList(SupervisionSpecial supervisionSpecial); | |
| 30 | 29 | |
| 31 | 30 | /** |
| 32 | - * ๆฐๅขๅจๆฅ | |
| 31 | + * ๆฐๅขไธ้กน็ฃๆฅ | |
| 33 | 32 | * |
| 34 | - * @param weekly ๅจๆฅ | |
| 33 | + * @param supervisionSpecial ไธ้กน็ฃๆฅ | |
| 35 | 34 | * @return ็ปๆ |
| 36 | 35 | */ |
| 37 | - public int insertWeekly(PeriodicReport weekly); | |
| 36 | + public int insertSupervisionSpecial(SupervisionSpecial supervisionSpecial); | |
| 38 | 37 | |
| 39 | 38 | /** |
| 40 | - * ไฟฎๆนๅจๆฅ | |
| 39 | + * ไฟฎๆนไธ้กน็ฃๆฅ | |
| 41 | 40 | * |
| 42 | - * @param weekly ๅจๆฅ | |
| 41 | + * @param supervisionSpecial ไธ้กน็ฃๆฅ | |
| 43 | 42 | * @return ็ปๆ |
| 44 | 43 | */ |
| 45 | - public int updateWeekly(PeriodicReport weekly); | |
| 44 | + public int updateSupervisionSpecial(SupervisionSpecial supervisionSpecial); | |
| 46 | 45 | |
| 47 | 46 | /** |
| 48 | - * ๅ ้คๅจๆฅ | |
| 47 | + * ๅ ้คไธ้กน็ฃๆฅ | |
| 49 | 48 | * |
| 50 | - * @param id ๅจๆฅID | |
| 49 | + * @param id ไธ้กน็ฃๆฅID | |
| 51 | 50 | * @return ็ปๆ |
| 52 | 51 | */ |
| 53 | - public int deleteWeeklyById(Long id); | |
| 52 | + public int deleteSupervisionSpecialById(String id); | |
| 54 | 53 | |
| 55 | 54 | /** |
| 56 | - * ๆน้ๅ ้คๅจๆฅ | |
| 55 | + * ๆน้ๅ ้คไธ้กน็ฃๆฅ | |
| 57 | 56 | * |
| 58 | 57 | * @param ids ้่ฆๅ ้ค็ๆฐๆฎID |
| 59 | 58 | * @return ็ปๆ |
| 60 | 59 | */ |
| 61 | - public int deleteWeeklyByIds(Long[] ids); | |
| 60 | + public int deleteSupervisionSpecialByIds(String[] ids); | |
| 62 | 61 | } | ... | ... |
trash-workFlow/src/main/java/com/trash/business/mapper/SupervisionThreestepMapper.java
| 1 | 1 | package com.trash.business.mapper; |
| 2 | 2 | |
| 3 | 3 | import java.util.List; |
| 4 | +import java.util.Map; | |
| 5 | + | |
| 4 | 6 | import com.trash.business.domain.SupervisionThreestep; |
| 5 | 7 | |
| 6 | 8 | /** |
| ... | ... | @@ -58,4 +60,8 @@ public interface SupervisionThreestepMapper |
| 58 | 60 | * @return ็ปๆ |
| 59 | 61 | */ |
| 60 | 62 | public int deleteSupervisionThreestepByIds(Long[] ids); |
| 63 | + | |
| 64 | + public List<Map> selectDayWorkList(SupervisionThreestep supervisionThreestep); | |
| 65 | + | |
| 66 | + public SupervisionThreestep selectTodayData(SupervisionThreestep supervisionThreestep); | |
| 61 | 67 | } | ... | ... |
trash-workFlow/src/main/java/com/trash/business/mapper/TruckActivateMapper.java
0 โ 100644
| 1 | +package com.trash.business.mapper; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | +import com.trash.business.domain.TruckActivate; | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * ่ฝฆ่พๆฟๆดปMapperๆฅๅฃ | |
| 8 | + * | |
| 9 | + * @author trash | |
| 10 | + * @date 2023-05-02 | |
| 11 | + */ | |
| 12 | +public interface TruckActivateMapper | |
| 13 | +{ | |
| 14 | + /** | |
| 15 | + * ๆฅ่ฏข่ฝฆ่พๆฟๆดป | |
| 16 | + * | |
| 17 | + * @param id ่ฝฆ่พๆฟๆดปID | |
| 18 | + * @return ่ฝฆ่พๆฟๆดป | |
| 19 | + */ | |
| 20 | + public TruckActivate selectTruckActivateById(Long id); | |
| 21 | + | |
| 22 | + /** | |
| 23 | + * ๆฅ่ฏข่ฝฆ่พๆฟๆดปๅ่กจ | |
| 24 | + * | |
| 25 | + * @param truckActivate ่ฝฆ่พๆฟๆดป | |
| 26 | + * @return ่ฝฆ่พๆฟๆดป้ๅ | |
| 27 | + */ | |
| 28 | + public List<TruckActivate> selectTruckActivateList(TruckActivate truckActivate); | |
| 29 | + | |
| 30 | + /** | |
| 31 | + * ๆฐๅข่ฝฆ่พๆฟๆดป | |
| 32 | + * | |
| 33 | + * @param truckActivate ่ฝฆ่พๆฟๆดป | |
| 34 | + * @return ็ปๆ | |
| 35 | + */ | |
| 36 | + public int insertTruckActivate(TruckActivate truckActivate); | |
| 37 | + | |
| 38 | + /** | |
| 39 | + * ไฟฎๆน่ฝฆ่พๆฟๆดป | |
| 40 | + * | |
| 41 | + * @param truckActivate ่ฝฆ่พๆฟๆดป | |
| 42 | + * @return ็ปๆ | |
| 43 | + */ | |
| 44 | + public int updateTruckActivate(TruckActivate truckActivate); | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * ๅ ้ค่ฝฆ่พๆฟๆดป | |
| 48 | + * | |
| 49 | + * @param id ่ฝฆ่พๆฟๆดปID | |
| 50 | + * @return ็ปๆ | |
| 51 | + */ | |
| 52 | + public int deleteTruckActivateById(Long id); | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * ๆน้ๅ ้ค่ฝฆ่พๆฟๆดป | |
| 56 | + * | |
| 57 | + * @param ids ้่ฆๅ ้ค็ๆฐๆฎID | |
| 58 | + * @return ็ปๆ | |
| 59 | + */ | |
| 60 | + public int deleteTruckActivateByIds(Long[] ids); | |
| 61 | +} | ... | ... |
trash-workFlow/src/main/java/com/trash/business/mapper/TruckCreditMapper.java
| ... | ... | @@ -63,4 +63,6 @@ public interface TruckCreditMapper |
| 63 | 63 | public List<String> getNames(TruckCredit truckCredit); |
| 64 | 64 | |
| 65 | 65 | public List<TruckCredit> selectTruckCreditHistory(TruckCredit truckCredit); |
| 66 | + | |
| 67 | + public List<String> getCompanys(TruckCredit truckCredit); | |
| 66 | 68 | } |
| 67 | 69 | \ No newline at end of file | ... | ... |
trash-workFlow/src/main/java/com/trash/business/service/ICompanyCreditService.java
| ... | ... | @@ -57,4 +57,6 @@ public interface ICompanyCreditService { |
| 57 | 57 | public List<String> getNames(CompanyCredit companyCredit); |
| 58 | 58 | |
| 59 | 59 | public List<CompanyCredit> selectCompanyCreditHistory(CompanyCredit companyCredit); |
| 60 | + | |
| 61 | + public List<String> getPlaces(CompanyCredit credit); | |
| 60 | 62 | } | ... | ... |
trash-workFlow/src/main/java/com/trash/business/service/IEarthsitesCreditService.java
| ... | ... | @@ -62,6 +62,8 @@ public interface IEarthsitesCreditService |
| 62 | 62 | public int deleteEarthsitesCreditById(Long id); |
| 63 | 63 | |
| 64 | 64 | public List<String> getNames(EarthsitesCredit earthsitesCredit); |
| 65 | + public List<String> getTypes(EarthsitesCredit earthsitesCredit); | |
| 66 | + public List<String> getPlaces(EarthsitesCredit earthsitesCredit); | |
| 65 | 67 | |
| 66 | 68 | public List<EarthsitesCredit> selectEarthsitesCreditHistory(EarthsitesCredit earthsitesCredit); |
| 67 | 69 | } |
| 68 | 70 | \ No newline at end of file | ... | ... |
trash-daily/src/main/java/com/trash/weekly/service/IWeeklyService.java renamed to trash-workFlow/src/main/java/com/trash/business/service/ISupervisionSpecialService.java
| 1 | -package com.trash.weekly.service; | |
| 2 | - | |
| 3 | -import com.trash.daily.domain.PeriodicReport; | |
| 1 | +package com.trash.business.service; | |
| 4 | 2 | |
| 5 | 3 | import java.util.List; |
| 4 | +import com.trash.business.domain.SupervisionSpecial; | |
| 6 | 5 | |
| 7 | 6 | /** |
| 8 | - * ๅจๆฅServiceๆฅๅฃ | |
| 7 | + * ไธ้กน็ฃๆฅServiceๆฅๅฃ | |
| 9 | 8 | * |
| 10 | 9 | * @author trash |
| 11 | - * @date 2023-04-21 | |
| 10 | + * @date 2023-05-03 | |
| 12 | 11 | */ |
| 13 | -public interface IWeeklyService | |
| 12 | +public interface ISupervisionSpecialService | |
| 14 | 13 | { |
| 15 | 14 | /** |
| 16 | - * ๆฅ่ฏขๅจๆฅ | |
| 15 | + * ๆฅ่ฏขไธ้กน็ฃๆฅ | |
| 17 | 16 | * |
| 18 | - * @param id ๅจๆฅID | |
| 19 | - * @return ๅจๆฅ | |
| 17 | + * @param id ไธ้กน็ฃๆฅID | |
| 18 | + * @return ไธ้กน็ฃๆฅ | |
| 20 | 19 | */ |
| 21 | - public PeriodicReport selectWeeklyById(Long id); | |
| 20 | + public SupervisionSpecial selectSupervisionSpecialById(String id); | |
| 22 | 21 | |
| 23 | 22 | /** |
| 24 | - * ๆฅ่ฏขๅจๆฅๅ่กจ | |
| 23 | + * ๆฅ่ฏขไธ้กน็ฃๆฅๅ่กจ | |
| 25 | 24 | * |
| 26 | - * @param weekly ๅจๆฅ | |
| 27 | - * @return ๅจๆฅ้ๅ | |
| 25 | + * @param supervisionSpecial ไธ้กน็ฃๆฅ | |
| 26 | + * @return ไธ้กน็ฃๆฅ้ๅ | |
| 28 | 27 | */ |
| 29 | - public List<PeriodicReport> selectWeeklyList(PeriodicReport weekly); | |
| 28 | + public List<SupervisionSpecial> selectSupervisionSpecialList(SupervisionSpecial supervisionSpecial); | |
| 30 | 29 | |
| 31 | 30 | /** |
| 32 | - * ๆฐๅขๅจๆฅ | |
| 31 | + * ๆฐๅขไธ้กน็ฃๆฅ | |
| 33 | 32 | * |
| 34 | - * @param weekly ๅจๆฅ | |
| 33 | + * @param supervisionSpecial ไธ้กน็ฃๆฅ | |
| 35 | 34 | * @return ็ปๆ |
| 36 | 35 | */ |
| 37 | - public int insertWeekly(PeriodicReport weekly); | |
| 36 | + public int insertSupervisionSpecial(SupervisionSpecial supervisionSpecial); | |
| 38 | 37 | |
| 39 | 38 | /** |
| 40 | - * ไฟฎๆนๅจๆฅ | |
| 39 | + * ไฟฎๆนไธ้กน็ฃๆฅ | |
| 41 | 40 | * |
| 42 | - * @param weekly ๅจๆฅ | |
| 41 | + * @param supervisionSpecial ไธ้กน็ฃๆฅ | |
| 43 | 42 | * @return ็ปๆ |
| 44 | 43 | */ |
| 45 | - public int updateWeekly(PeriodicReport weekly); | |
| 44 | + public int updateSupervisionSpecial(SupervisionSpecial supervisionSpecial); | |
| 46 | 45 | |
| 47 | 46 | /** |
| 48 | - * ๆน้ๅ ้คๅจๆฅ | |
| 47 | + * ๆน้ๅ ้คไธ้กน็ฃๆฅ | |
| 49 | 48 | * |
| 50 | - * @param ids ้่ฆๅ ้ค็ๅจๆฅID | |
| 49 | + * @param ids ้่ฆๅ ้ค็ไธ้กน็ฃๆฅID | |
| 51 | 50 | * @return ็ปๆ |
| 52 | 51 | */ |
| 53 | - public int deleteWeeklyByIds(Long[] ids); | |
| 52 | + public int deleteSupervisionSpecialByIds(String[] ids); | |
| 54 | 53 | |
| 55 | 54 | /** |
| 56 | - * ๅ ้คๅจๆฅไฟกๆฏ | |
| 55 | + * ๅ ้คไธ้กน็ฃๆฅไฟกๆฏ | |
| 57 | 56 | * |
| 58 | - * @param id ๅจๆฅID | |
| 57 | + * @param id ไธ้กน็ฃๆฅID | |
| 59 | 58 | * @return ็ปๆ |
| 60 | 59 | */ |
| 61 | - public int deleteWeeklyById(Long id); | |
| 60 | + public int deleteSupervisionSpecialById(String id); | |
| 62 | 61 | } | ... | ... |
trash-workFlow/src/main/java/com/trash/business/service/ISupervisionThreestepService.java
| 1 | 1 | package com.trash.business.service; |
| 2 | 2 | |
| 3 | 3 | import java.util.List; |
| 4 | +import java.util.Map; | |
| 4 | 5 | |
| 5 | 6 | import org.springframework.web.multipart.MultipartFile; |
| 6 | 7 | |
| ... | ... | @@ -63,4 +64,8 @@ public interface ISupervisionThreestepService |
| 63 | 64 | public int deleteSupervisionThreestepById(Long id); |
| 64 | 65 | |
| 65 | 66 | public String upload(MultipartFile file); |
| 67 | + | |
| 68 | + public List<Map> selectDayWorkList(SupervisionThreestep supervisionThreestep); | |
| 69 | + | |
| 70 | + public int activeSupervisionThreestep(SupervisionThreestep supervisionThreestep); | |
| 66 | 71 | } | ... | ... |
trash-workFlow/src/main/java/com/trash/business/service/ITruckActivateService.java
0 โ 100644
| 1 | +package com.trash.business.service; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | +import com.trash.business.domain.TruckActivate; | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * ่ฝฆ่พๆฟๆดปServiceๆฅๅฃ | |
| 8 | + * | |
| 9 | + * @author trash | |
| 10 | + * @date 2023-05-02 | |
| 11 | + */ | |
| 12 | +public interface ITruckActivateService | |
| 13 | +{ | |
| 14 | + /** | |
| 15 | + * ๆฅ่ฏข่ฝฆ่พๆฟๆดป | |
| 16 | + * | |
| 17 | + * @param id ่ฝฆ่พๆฟๆดปID | |
| 18 | + * @return ่ฝฆ่พๆฟๆดป | |
| 19 | + */ | |
| 20 | + public TruckActivate selectTruckActivateById(Long id); | |
| 21 | + | |
| 22 | + /** | |
| 23 | + * ๆฅ่ฏข่ฝฆ่พๆฟๆดปๅ่กจ | |
| 24 | + * | |
| 25 | + * @param truckActivate ่ฝฆ่พๆฟๆดป | |
| 26 | + * @return ่ฝฆ่พๆฟๆดป้ๅ | |
| 27 | + */ | |
| 28 | + public List<TruckActivate> selectTruckActivateList(TruckActivate truckActivate); | |
| 29 | + | |
| 30 | + /** | |
| 31 | + * ๆฐๅข่ฝฆ่พๆฟๆดป | |
| 32 | + * | |
| 33 | + * @param truckActivate ่ฝฆ่พๆฟๆดป | |
| 34 | + * @return ็ปๆ | |
| 35 | + */ | |
| 36 | + public int insertTruckActivate(TruckActivate truckActivate); | |
| 37 | + | |
| 38 | + /** | |
| 39 | + * ไฟฎๆน่ฝฆ่พๆฟๆดป | |
| 40 | + * | |
| 41 | + * @param truckActivate ่ฝฆ่พๆฟๆดป | |
| 42 | + * @return ็ปๆ | |
| 43 | + */ | |
| 44 | + public int updateTruckActivate(TruckActivate truckActivate); | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * ๆน้ๅ ้ค่ฝฆ่พๆฟๆดป | |
| 48 | + * | |
| 49 | + * @param ids ้่ฆๅ ้ค็่ฝฆ่พๆฟๆดปID | |
| 50 | + * @return ็ปๆ | |
| 51 | + */ | |
| 52 | + public int deleteTruckActivateByIds(Long[] ids); | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * ๅ ้ค่ฝฆ่พๆฟๆดปไฟกๆฏ | |
| 56 | + * | |
| 57 | + * @param id ่ฝฆ่พๆฟๆดปID | |
| 58 | + * @return ็ปๆ | |
| 59 | + */ | |
| 60 | + public int deleteTruckActivateById(Long id); | |
| 61 | +} | ... | ... |
trash-workFlow/src/main/java/com/trash/business/service/ITruckCreditService.java
| 1 | 1 | package com.trash.business.service; |
| 2 | 2 | |
| 3 | +import com.trash.business.domain.ConstructionCredit; | |
| 3 | 4 | import com.trash.business.domain.TruckCredit; |
| 4 | 5 | |
| 5 | 6 | import java.util.List; |
| ... | ... | @@ -56,4 +57,6 @@ public interface ITruckCreditService { |
| 56 | 57 | public List<String> getNames(TruckCredit truckCredit); |
| 57 | 58 | |
| 58 | 59 | public List<TruckCredit> selectTruckCreditHistory(TruckCredit truckCredit); |
| 60 | + | |
| 61 | + public List<String> getCompanys(TruckCredit credit); | |
| 59 | 62 | } | ... | ... |
trash-workFlow/src/main/java/com/trash/business/service/impl/CompanyCreditServiceImpl.java
| ... | ... | @@ -116,6 +116,11 @@ public class CompanyCreditServiceImpl implements ICompanyCreditService |
| 116 | 116 | return companyCreditMapper.getNames(companyCredit); |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | + public List<String> getPlaces(CompanyCredit companyCredit){ | |
| 120 | + return companyCreditMapper.getPlaces(companyCredit); | |
| 121 | + } | |
| 122 | + | |
| 123 | + | |
| 119 | 124 | @Override |
| 120 | 125 | public List<CompanyCredit> selectCompanyCreditHistory(CompanyCredit companyCredit) |
| 121 | 126 | { | ... | ... |
trash-workFlow/src/main/java/com/trash/business/service/impl/ConstructionCreditServiceImpl.java
| ... | ... | @@ -67,17 +67,9 @@ public class ConstructionCreditServiceImpl implements IConstructionCreditService |
| 67 | 67 | |
| 68 | 68 | constructionCredit.setTime(new Date()); |
| 69 | 69 | |
| 70 | - int i = constructionCreditMapper.insertConstructionCredit(constructionCredit); | |
| 71 | - | |
| 72 | - sentDataToRemoteServer(constructionCredit); | |
| 73 | - | |
| 74 | - return i; | |
| 70 | + return constructionCreditMapper.insertConstructionCredit(constructionCredit); | |
| 75 | 71 | } |
| 76 | 72 | |
| 77 | - private void sentDataToRemoteServer(ConstructionCredit constructionCredit) { | |
| 78 | - System.out.println("sendData!" + constructionCredit.getObjectId() + "status" + constructionCredit.getStatus() ); | |
| 79 | - } | |
| 80 | - | |
| 81 | 73 | /** |
| 82 | 74 | * ไฟฎๆนไธๆฅๆบๅถ |
| 83 | 75 | * | ... | ... |
trash-workFlow/src/main/java/com/trash/business/service/impl/EarthsitesCreditServiceImpl.java
| ... | ... | @@ -6,6 +6,7 @@ import java.util.List; |
| 6 | 6 | import org.springframework.beans.factory.annotation.Autowired; |
| 7 | 7 | import org.springframework.stereotype.Service; |
| 8 | 8 | import com.trash.business.mapper.EarthsitesCreditMapper; |
| 9 | +import com.trash.business.domain.ConstructionCredit; | |
| 9 | 10 | import com.trash.business.domain.EarthsitesCredit; |
| 10 | 11 | import com.trash.business.service.IEarthsitesCreditService; |
| 11 | 12 | |
| ... | ... | @@ -58,15 +59,9 @@ public class EarthsitesCreditServiceImpl implements IEarthsitesCreditService |
| 58 | 59 | |
| 59 | 60 | int i = earthsitesCreditMapper.insertEarthsitesCredit(earthsitesCredit); |
| 60 | 61 | |
| 61 | - sentDataToRemoteServer(earthsitesCredit); | |
| 62 | - | |
| 63 | 62 | return i; |
| 64 | 63 | } |
| 65 | 64 | |
| 66 | - private void sentDataToRemoteServer(EarthsitesCredit earthsitesCredit) { | |
| 67 | - System.out.println("sendData!" + earthsitesCredit.getObjectId() + "status" + earthsitesCredit.getStatus() ); | |
| 68 | - } | |
| 69 | - | |
| 70 | 65 | /** |
| 71 | 66 | * ไฟฎๆนๆถ็บณๅบๅคฑไฟก |
| 72 | 67 | * |
| ... | ... | @@ -124,6 +119,15 @@ public class EarthsitesCreditServiceImpl implements IEarthsitesCreditService |
| 124 | 119 | public List<String> getNames(EarthsitesCredit earthsitesCredit) { |
| 125 | 120 | return earthsitesCreditMapper.getNames(earthsitesCredit); |
| 126 | 121 | } |
| 122 | + | |
| 123 | + | |
| 124 | + public List<String> getTypes(EarthsitesCredit earthsitesCredit){ | |
| 125 | + return earthsitesCreditMapper.getTypes(earthsitesCredit); | |
| 126 | + } | |
| 127 | + | |
| 128 | + public List<String> getPlaces(EarthsitesCredit earthsitesCredit){ | |
| 129 | + return earthsitesCreditMapper.getPlaces(earthsitesCredit); | |
| 130 | + } | |
| 127 | 131 | |
| 128 | 132 | @Override |
| 129 | 133 | public List<EarthsitesCredit> selectEarthsitesCreditHistory(EarthsitesCredit earthsitesCredit) { | ... | ... |
trash-daily/src/main/java/com/trash/monthly/service/impl/MonthlyReportServiceImpl.java renamed to trash-workFlow/src/main/java/com/trash/business/service/impl/SupervisionSpecialServiceImpl.java
| 1 | -package com.trash.monthly.service.impl; | |
| 1 | +package com.trash.business.service.impl; | |
| 2 | 2 | |
| 3 | -import com.trash.daily.domain.PeriodicReport; | |
| 4 | -import com.trash.monthly.mapper.MonthlyReportMapper; | |
| 5 | -import com.trash.monthly.service.IMonthlyReportService; | |
| 3 | +import java.util.List; | |
| 4 | +import com.trash.common.utils.DateUtils; | |
| 6 | 5 | import org.springframework.beans.factory.annotation.Autowired; |
| 7 | 6 | import org.springframework.stereotype.Service; |
| 8 | - | |
| 9 | -import java.util.List; | |
| 10 | - | |
| 7 | +import com.trash.business.mapper.SupervisionSpecialMapper; | |
| 8 | +import com.trash.business.domain.SupervisionSpecial; | |
| 9 | +import com.trash.business.service.ISupervisionSpecialService; | |
| 11 | 10 | |
| 12 | 11 | /** |
| 13 | - * ๆๆฅServiceไธๅกๅฑๅค็ | |
| 12 | + * ไธ้กน็ฃๆฅServiceไธๅกๅฑๅค็ | |
| 14 | 13 | * |
| 15 | 14 | * @author trash |
| 16 | - * @date 2023-04-21 | |
| 15 | + * @date 2023-05-03 | |
| 17 | 16 | */ |
| 18 | 17 | @Service |
| 19 | -public class MonthlyReportServiceImpl implements IMonthlyReportService | |
| 18 | +public class SupervisionSpecialServiceImpl implements ISupervisionSpecialService | |
| 20 | 19 | { |
| 21 | 20 | @Autowired |
| 22 | - private MonthlyReportMapper monthlyReportMapper; | |
| 21 | + private SupervisionSpecialMapper supervisionSpecialMapper; | |
| 23 | 22 | |
| 24 | 23 | /** |
| 25 | - * ๆฅ่ฏขๆๆฅ | |
| 24 | + * ๆฅ่ฏขไธ้กน็ฃๆฅ | |
| 26 | 25 | * |
| 27 | - * @param id ๆๆฅID | |
| 28 | - * @return ๆๆฅ | |
| 26 | + * @param id ไธ้กน็ฃๆฅID | |
| 27 | + * @return ไธ้กน็ฃๆฅ | |
| 29 | 28 | */ |
| 30 | 29 | @Override |
| 31 | - public PeriodicReport selectMonthlyReportById(Long id) | |
| 30 | + public SupervisionSpecial selectSupervisionSpecialById(String id) | |
| 32 | 31 | { |
| 33 | - return monthlyReportMapper.selectMonthlyReportById(id); | |
| 32 | + return supervisionSpecialMapper.selectSupervisionSpecialById(id); | |
| 34 | 33 | } |
| 35 | 34 | |
| 36 | 35 | /** |
| 37 | - * ๆฅ่ฏขๆๆฅๅ่กจ | |
| 36 | + * ๆฅ่ฏขไธ้กน็ฃๆฅๅ่กจ | |
| 38 | 37 | * |
| 39 | - * @param monthlyReport ๆๆฅ | |
| 40 | - * @return ๆๆฅ | |
| 38 | + * @param supervisionSpecial ไธ้กน็ฃๆฅ | |
| 39 | + * @return ไธ้กน็ฃๆฅ | |
| 41 | 40 | */ |
| 42 | 41 | @Override |
| 43 | - public List<PeriodicReport> selectMonthlyReportList(PeriodicReport monthlyReport) | |
| 42 | + public List<SupervisionSpecial> selectSupervisionSpecialList(SupervisionSpecial supervisionSpecial) | |
| 44 | 43 | { |
| 45 | - return monthlyReportMapper.selectMonthlyReportList(monthlyReport); | |
| 44 | + return supervisionSpecialMapper.selectSupervisionSpecialList(supervisionSpecial); | |
| 46 | 45 | } |
| 47 | 46 | |
| 48 | 47 | /** |
| 49 | - * ๆฐๅขๆๆฅ | |
| 48 | + * ๆฐๅขไธ้กน็ฃๆฅ | |
| 50 | 49 | * |
| 51 | - * @param monthlyReport ๆๆฅ | |
| 50 | + * @param supervisionSpecial ไธ้กน็ฃๆฅ | |
| 52 | 51 | * @return ็ปๆ |
| 53 | 52 | */ |
| 54 | 53 | @Override |
| 55 | - public int insertMonthlyReport(PeriodicReport monthlyReport) | |
| 54 | + public int insertSupervisionSpecial(SupervisionSpecial supervisionSpecial) | |
| 56 | 55 | { |
| 57 | - return monthlyReportMapper.insertMonthlyReport(monthlyReport); | |
| 56 | + supervisionSpecial.setCreateTime(DateUtils.getNowDate()); | |
| 57 | + return supervisionSpecialMapper.insertSupervisionSpecial(supervisionSpecial); | |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | - * ไฟฎๆนๆๆฅ | |
| 61 | + * ไฟฎๆนไธ้กน็ฃๆฅ | |
| 62 | 62 | * |
| 63 | - * @param monthlyReport ๆๆฅ | |
| 63 | + * @param supervisionSpecial ไธ้กน็ฃๆฅ | |
| 64 | 64 | * @return ็ปๆ |
| 65 | 65 | */ |
| 66 | 66 | @Override |
| 67 | - public int updateMonthlyReport(PeriodicReport monthlyReport) | |
| 67 | + public int updateSupervisionSpecial(SupervisionSpecial supervisionSpecial) | |
| 68 | 68 | { |
| 69 | - return monthlyReportMapper.updateMonthlyReport(monthlyReport); | |
| 69 | + supervisionSpecial.setUpdateTime(DateUtils.getNowDate()); | |
| 70 | + return supervisionSpecialMapper.updateSupervisionSpecial(supervisionSpecial); | |
| 70 | 71 | } |
| 71 | 72 | |
| 72 | 73 | /** |
| 73 | - * ๆน้ๅ ้คๆๆฅ | |
| 74 | + * ๆน้ๅ ้คไธ้กน็ฃๆฅ | |
| 74 | 75 | * |
| 75 | - * @param ids ้่ฆๅ ้ค็ๆๆฅID | |
| 76 | + * @param ids ้่ฆๅ ้ค็ไธ้กน็ฃๆฅID | |
| 76 | 77 | * @return ็ปๆ |
| 77 | 78 | */ |
| 78 | 79 | @Override |
| 79 | - public int deleteMonthlyReportByIds(Long[] ids) | |
| 80 | + public int deleteSupervisionSpecialByIds(String[] ids) | |
| 80 | 81 | { |
| 81 | - return monthlyReportMapper.deleteMonthlyReportByIds(ids); | |
| 82 | + return supervisionSpecialMapper.deleteSupervisionSpecialByIds(ids); | |
| 82 | 83 | } |
| 83 | 84 | |
| 84 | 85 | /** |
| 85 | - * ๅ ้คๆๆฅไฟกๆฏ | |
| 86 | + * ๅ ้คไธ้กน็ฃๆฅไฟกๆฏ | |
| 86 | 87 | * |
| 87 | - * @param id ๆๆฅID | |
| 88 | + * @param id ไธ้กน็ฃๆฅID | |
| 88 | 89 | * @return ็ปๆ |
| 89 | 90 | */ |
| 90 | 91 | @Override |
| 91 | - public int deleteMonthlyReportById(Long id) | |
| 92 | + public int deleteSupervisionSpecialById(String id) | |
| 92 | 93 | { |
| 93 | - return monthlyReportMapper.deleteMonthlyReportById(id); | |
| 94 | + return supervisionSpecialMapper.deleteSupervisionSpecialById(id); | |
| 94 | 95 | } |
| 95 | 96 | } | ... | ... |
trash-workFlow/src/main/java/com/trash/business/service/impl/SupervisionThreestepServiceImpl.java
| 1 | 1 | package com.trash.business.service.impl; |
| 2 | 2 | |
| 3 | 3 | import java.io.IOException; |
| 4 | +import java.text.ParseException; | |
| 5 | +import java.text.SimpleDateFormat; | |
| 6 | +import java.util.Date; | |
| 4 | 7 | import java.util.List; |
| 8 | +import java.util.Map; | |
| 5 | 9 | |
| 6 | 10 | import com.trash.common.config.trashConfig; |
| 7 | 11 | import com.trash.common.utils.DateUtils; |
| 8 | 12 | import com.trash.common.utils.SecurityUtils; |
| 9 | 13 | import com.trash.common.utils.file.FileUploadUtils; |
| 14 | +import com.trash.utils.RemoteServerUtils; | |
| 10 | 15 | import com.trash.workflow.service.IWorkflowService; |
| 11 | 16 | |
| 12 | 17 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | ... | @@ -17,6 +22,7 @@ import org.springframework.web.multipart.MultipartFile; |
| 17 | 22 | import com.trash.business.mapper.SupervisionThreestepMapper; |
| 18 | 23 | import com.trash.business.domain.SupervisionThreestep; |
| 19 | 24 | import com.trash.business.service.ISupervisionThreestepService; |
| 25 | +import com.trash.business.service.ITruckActivateService; | |
| 20 | 26 | |
| 21 | 27 | /** |
| 22 | 28 | * ไธๆฅๆบๅถServiceไธๅกๅฑๅค็ |
| ... | ... | @@ -31,6 +37,9 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer |
| 31 | 37 | |
| 32 | 38 | @Autowired |
| 33 | 39 | IWorkflowService workflowservice; |
| 40 | + | |
| 41 | + @Autowired | |
| 42 | + ITruckActivateService tuckService; | |
| 34 | 43 | |
| 35 | 44 | /** |
| 36 | 45 | * ๆฅ่ฏขไธๆฅๆบๅถ |
| ... | ... | @@ -53,9 +62,89 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer |
| 53 | 62 | */ |
| 54 | 63 | @Override |
| 55 | 64 | public List<SupervisionThreestep> selectSupervisionThreestepList(SupervisionThreestep supervisionThreestep) { |
| 65 | + if(supervisionThreestep.getWorkStartTime() == null){ | |
| 66 | + String start,end; | |
| 67 | + | |
| 68 | + Date date = new Date(); | |
| 69 | + | |
| 70 | + if(new Date().getHours() < 8){ | |
| 71 | + end = sdf.format(date); | |
| 72 | + date.setDate(date.getDate()-1); | |
| 73 | + start = sdf.format(date); | |
| 74 | + }else{ | |
| 75 | + start = sdf.format(date); | |
| 76 | + date.setDate(date.getDate()+1); | |
| 77 | + end = sdf.format(date); | |
| 78 | + } | |
| 79 | + | |
| 80 | + end += " 8:00:00"; | |
| 81 | + start += " 8:00:00"; | |
| 82 | + | |
| 83 | + try { | |
| 84 | + supervisionThreestep.setWorkStartTime(sdf.parse(start)); | |
| 85 | + supervisionThreestep.setWorkEndTime(sdf.parse(end)); | |
| 86 | + } catch (Exception e) { | |
| 87 | + // TODO Auto-generated catch block | |
| 88 | + e.printStackTrace(); | |
| 89 | + } | |
| 90 | + } | |
| 91 | + | |
| 56 | 92 | return supervisionThreestepMapper.selectSupervisionThreestepList(supervisionThreestep); |
| 57 | 93 | } |
| 58 | 94 | |
| 95 | + | |
| 96 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | |
| 97 | + | |
| 98 | + @Override | |
| 99 | + public List<Map> selectDayWorkList(SupervisionThreestep supervisionThreestep){ | |
| 100 | + | |
| 101 | + if(supervisionThreestep.getWorkStartTime() == null){ | |
| 102 | + String start,end; | |
| 103 | + | |
| 104 | + Date date = new Date(); | |
| 105 | + | |
| 106 | + if(new Date().getHours() < 8){ | |
| 107 | + end = sdf.format(date); | |
| 108 | + date.setDate(date.getDate()-1); | |
| 109 | + start = sdf.format(date); | |
| 110 | + }else{ | |
| 111 | + start = sdf.format(date); | |
| 112 | + date.setDate(date.getDate()+1); | |
| 113 | + end = sdf.format(date); | |
| 114 | + } | |
| 115 | + | |
| 116 | + end += " 8:00:00"; | |
| 117 | + start += " 8:00:00"; | |
| 118 | + | |
| 119 | + try { | |
| 120 | + supervisionThreestep.setWorkStartTime(sdf.parse(start)); | |
| 121 | + supervisionThreestep.setWorkEndTime(sdf.parse(end)); | |
| 122 | + } catch (Exception e) { | |
| 123 | + // TODO Auto-generated catch block | |
| 124 | + e.printStackTrace(); | |
| 125 | + } | |
| 126 | + } | |
| 127 | + | |
| 128 | + List<Map> list = supervisionThreestepMapper.selectDayWorkList(supervisionThreestep); | |
| 129 | + | |
| 130 | + | |
| 131 | + for(Map m:list){ | |
| 132 | + if(m.get("status") == null){ | |
| 133 | + m.put("status", 0); | |
| 134 | + } | |
| 135 | + | |
| 136 | + if(m.get("ename") == null){ | |
| 137 | + m.put("estatus", -1); | |
| 138 | + m.put("ename", m.get("earthsites_name")); | |
| 139 | + m.put("esub_reason", "-"); | |
| 140 | + m.put("eobject_id", m.get("earthsites_id")); | |
| 141 | + } | |
| 142 | + } | |
| 143 | + | |
| 144 | + | |
| 145 | + return list; | |
| 146 | + } | |
| 147 | + | |
| 59 | 148 | /** |
| 60 | 149 | * ๆฐๅขไธๆฅๆบๅถ |
| 61 | 150 | * |
| ... | ... | @@ -66,12 +155,28 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer |
| 66 | 155 | @Override |
| 67 | 156 | @Transactional |
| 68 | 157 | public int insertSupervisionThreestep(SupervisionThreestep supervisionThreestep) { |
| 158 | + | |
| 159 | + if(supervisionThreestep.getId() != null){ | |
| 160 | + supervisionThreestepMapper.deleteSupervisionThreestepById(supervisionThreestep.getId()); | |
| 161 | + } | |
| 162 | + | |
| 163 | + | |
| 164 | + SupervisionThreestep todayData = supervisionThreestepMapper.selectTodayData(supervisionThreestep); | |
| 165 | + | |
| 166 | + if(todayData != null){ | |
| 167 | + | |
| 168 | + return -1; | |
| 169 | + } | |
| 170 | + | |
| 171 | + | |
| 69 | 172 | supervisionThreestep.setCreateTime(DateUtils.getNowDate()); |
| 70 | 173 | supervisionThreestep.setSelfCheckTime(DateUtils.getNowDate()); |
| 71 | 174 | supervisionThreestep.setCreateBy(SecurityUtils.getUsername()); |
| 72 | - | |
| 175 | + supervisionThreestep.setStatus(0L); | |
| 176 | + | |
| 73 | 177 | supervisionThreestepMapper.insertSupervisionThreestep(supervisionThreestep); |
| 74 | - int i = workflowservice.createThreeSetpWorkFlow(supervisionThreestep); | |
| 178 | + | |
| 179 | + int i = workflowservice.createThreeStepWorkFlow(supervisionThreestep); | |
| 75 | 180 | if (i == 0) { |
| 76 | 181 | supervisionThreestepMapper.deleteSupervisionThreestepById(supervisionThreestep.getId()); |
| 77 | 182 | } |
| ... | ... | @@ -91,6 +196,27 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer |
| 91 | 196 | return supervisionThreestepMapper.updateSupervisionThreestep(supervisionThreestep); |
| 92 | 197 | } |
| 93 | 198 | |
| 199 | + @Override | |
| 200 | + public int activeSupervisionThreestep(SupervisionThreestep supervisionThreestep) { | |
| 201 | + | |
| 202 | + int i = supervisionThreestepMapper.updateSupervisionThreestep(supervisionThreestep); | |
| 203 | + | |
| 204 | + supervisionThreestep = supervisionThreestepMapper.selectSupervisionThreestepById(supervisionThreestep.getId()); | |
| 205 | + | |
| 206 | + String trucks = supervisionThreestep.getCompanyTrucks(); | |
| 207 | + | |
| 208 | +// for(String tid : trucks.split(",")){ | |
| 209 | +// RemoteServerUtils.post(url, obj) | |
| 210 | +// } | |
| 211 | + | |
| 212 | + | |
| 213 | +// tuckService.selectTruckActivateById(id) | |
| 214 | + | |
| 215 | + | |
| 216 | + return i; | |
| 217 | + } | |
| 218 | + | |
| 219 | + | |
| 94 | 220 | /** |
| 95 | 221 | * ๆน้ๅ ้คไธๆฅๆบๅถ |
| 96 | 222 | * | ... | ... |
trash-daily/src/main/java/com/trash/daily/service/impl/DailyServiceImpl.java renamed to trash-workFlow/src/main/java/com/trash/business/service/impl/TruckActivateServiceImpl.java
| 1 | -package com.trash.daily.service.impl; | |
| 1 | +package com.trash.business.service.impl; | |
| 2 | 2 | |
| 3 | -import com.trash.daily.domain.PeriodicReport; | |
| 4 | -import com.trash.daily.mapper.DailyMapper; | |
| 5 | -import com.trash.daily.service.IDailyService; | |
| 3 | +import java.util.List; | |
| 4 | +import com.trash.common.utils.DateUtils; | |
| 6 | 5 | import org.springframework.beans.factory.annotation.Autowired; |
| 7 | 6 | import org.springframework.stereotype.Service; |
| 8 | - | |
| 9 | -import java.util.List; | |
| 7 | +import com.trash.business.mapper.TruckActivateMapper; | |
| 8 | +import com.trash.business.domain.TruckActivate; | |
| 9 | +import com.trash.business.service.ITruckActivateService; | |
| 10 | 10 | |
| 11 | 11 | /** |
| 12 | - * ๆฅๆฅServiceไธๅกๅฑๅค็ | |
| 12 | + * ่ฝฆ่พๆฟๆดปServiceไธๅกๅฑๅค็ | |
| 13 | 13 | * |
| 14 | 14 | * @author trash |
| 15 | - * @date 2023-04-21 | |
| 15 | + * @date 2023-05-02 | |
| 16 | 16 | */ |
| 17 | 17 | @Service |
| 18 | -public class DailyServiceImpl implements IDailyService | |
| 18 | +public class TruckActivateServiceImpl implements ITruckActivateService | |
| 19 | 19 | { |
| 20 | 20 | @Autowired |
| 21 | - private DailyMapper dailyMapper; | |
| 21 | + private TruckActivateMapper truckActivateMapper; | |
| 22 | 22 | |
| 23 | 23 | /** |
| 24 | - * ๆฅ่ฏขๆฅๆฅ | |
| 24 | + * ๆฅ่ฏข่ฝฆ่พๆฟๆดป | |
| 25 | 25 | * |
| 26 | - * @param id ๆฅๆฅID | |
| 27 | - * @return ๆฅๆฅ | |
| 26 | + * @param id ่ฝฆ่พๆฟๆดปID | |
| 27 | + * @return ่ฝฆ่พๆฟๆดป | |
| 28 | 28 | */ |
| 29 | 29 | @Override |
| 30 | - public PeriodicReport selectDailyById(Long id) | |
| 30 | + public TruckActivate selectTruckActivateById(Long id) | |
| 31 | 31 | { |
| 32 | - return dailyMapper.selectDailyById(id); | |
| 32 | + return truckActivateMapper.selectTruckActivateById(id); | |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | - * ๆฅ่ฏขๆฅๆฅๅ่กจ | |
| 36 | + * ๆฅ่ฏข่ฝฆ่พๆฟๆดปๅ่กจ | |
| 37 | 37 | * |
| 38 | - * @param daily ๆฅๆฅ | |
| 39 | - * @return ๆฅๆฅ | |
| 38 | + * @param truckActivate ่ฝฆ่พๆฟๆดป | |
| 39 | + * @return ่ฝฆ่พๆฟๆดป | |
| 40 | 40 | */ |
| 41 | 41 | @Override |
| 42 | - public List<PeriodicReport> selectDailyList(PeriodicReport daily) | |
| 42 | + public List<TruckActivate> selectTruckActivateList(TruckActivate truckActivate) | |
| 43 | 43 | { |
| 44 | - return dailyMapper.selectDailyList(daily); | |
| 44 | + return truckActivateMapper.selectTruckActivateList(truckActivate); | |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | /** |
| 48 | - * ๆฐๅขๆฅๆฅ | |
| 48 | + * ๆฐๅข่ฝฆ่พๆฟๆดป | |
| 49 | 49 | * |
| 50 | - * @param daily ๆฅๆฅ | |
| 50 | + * @param truckActivate ่ฝฆ่พๆฟๆดป | |
| 51 | 51 | * @return ็ปๆ |
| 52 | 52 | */ |
| 53 | 53 | @Override |
| 54 | - public int insertDaily(PeriodicReport daily) | |
| 54 | + public int insertTruckActivate(TruckActivate truckActivate) | |
| 55 | 55 | { |
| 56 | - return dailyMapper.insertDaily(daily); | |
| 56 | + truckActivate.setCreateTime(DateUtils.getNowDate()); | |
| 57 | + return truckActivateMapper.insertTruckActivate(truckActivate); | |
| 57 | 58 | } |
| 58 | 59 | |
| 59 | 60 | /** |
| 60 | - * ไฟฎๆนๆฅๆฅ | |
| 61 | + * ไฟฎๆน่ฝฆ่พๆฟๆดป | |
| 61 | 62 | * |
| 62 | - * @param daily ๆฅๆฅ | |
| 63 | + * @param truckActivate ่ฝฆ่พๆฟๆดป | |
| 63 | 64 | * @return ็ปๆ |
| 64 | 65 | */ |
| 65 | 66 | @Override |
| 66 | - public int updateDaily(PeriodicReport daily) | |
| 67 | + public int updateTruckActivate(TruckActivate truckActivate) | |
| 67 | 68 | { |
| 68 | - return dailyMapper.updateDaily(daily); | |
| 69 | + return truckActivateMapper.updateTruckActivate(truckActivate); | |
| 69 | 70 | } |
| 70 | 71 | |
| 71 | 72 | /** |
| 72 | - * ๆน้ๅ ้คๆฅๆฅ | |
| 73 | + * ๆน้ๅ ้ค่ฝฆ่พๆฟๆดป | |
| 73 | 74 | * |
| 74 | - * @param ids ้่ฆๅ ้ค็ๆฅๆฅID | |
| 75 | + * @param ids ้่ฆๅ ้ค็่ฝฆ่พๆฟๆดปID | |
| 75 | 76 | * @return ็ปๆ |
| 76 | 77 | */ |
| 77 | 78 | @Override |
| 78 | - public int deleteDailyByIds(Long[] ids) | |
| 79 | + public int deleteTruckActivateByIds(Long[] ids) | |
| 79 | 80 | { |
| 80 | - return dailyMapper.deleteDailyByIds(ids); | |
| 81 | + return truckActivateMapper.deleteTruckActivateByIds(ids); | |
| 81 | 82 | } |
| 82 | 83 | |
| 83 | 84 | /** |
| 84 | - * ๅ ้คๆฅๆฅไฟกๆฏ | |
| 85 | + * ๅ ้ค่ฝฆ่พๆฟๆดปไฟกๆฏ | |
| 85 | 86 | * |
| 86 | - * @param id ๆฅๆฅID | |
| 87 | + * @param id ่ฝฆ่พๆฟๆดปID | |
| 87 | 88 | * @return ็ปๆ |
| 88 | 89 | */ |
| 89 | 90 | @Override |
| 90 | - public int deleteDailyById(Long id) | |
| 91 | + public int deleteTruckActivateById(Long id) | |
| 91 | 92 | { |
| 92 | - return dailyMapper.deleteDailyById(id); | |
| 93 | + return truckActivateMapper.deleteTruckActivateById(id); | |
| 93 | 94 | } |
| 94 | 95 | } | ... | ... |
trash-workFlow/src/main/java/com/trash/business/service/impl/TruckCreditServiceImpl.java
| ... | ... | @@ -134,4 +134,9 @@ public class TruckCreditServiceImpl implements ITruckCreditService |
| 134 | 134 | public List<String> getNames(TruckCredit truckCredit){ |
| 135 | 135 | return truckCreditMapper.getNames(truckCredit); |
| 136 | 136 | } |
| 137 | + | |
| 138 | + public List<String> getCompanys(TruckCredit truckCredit){ | |
| 139 | + return truckCreditMapper.getCompanys(truckCredit); | |
| 140 | + } | |
| 141 | + | |
| 137 | 142 | } | ... | ... |
trash-workFlow/src/main/java/com/trash/utils/RemoteServerUtils.java
0 โ 100644
| 1 | +package com.trash.utils; | |
| 2 | + | |
| 3 | +import java.util.concurrent.TimeUnit; | |
| 4 | + | |
| 5 | +import com.alibaba.fastjson.JSON; | |
| 6 | +import com.alibaba.fastjson.JSONObject; | |
| 7 | +import com.trash.common.utils.SecurityUtils; | |
| 8 | + | |
| 9 | +import okhttp3.MediaType; | |
| 10 | +import okhttp3.OkHttpClient; | |
| 11 | +import okhttp3.Request; | |
| 12 | +import okhttp3.RequestBody; | |
| 13 | + | |
| 14 | +public class RemoteServerUtils { | |
| 15 | + | |
| 16 | + String remote = "http://183.66.242.6:6001/"; | |
| 17 | + | |
| 18 | + public static OkHttpClient okHttpClient; | |
| 19 | + | |
| 20 | + public static Object post(String url,Object obj){ | |
| 21 | + if(okHttpClient == null){ | |
| 22 | + okHttpClient = new OkHttpClient.Builder() | |
| 23 | + .connectTimeout(20, TimeUnit.SECONDS) | |
| 24 | + .writeTimeout(20, TimeUnit.SECONDS) | |
| 25 | + .readTimeout(30, TimeUnit.SECONDS) | |
| 26 | + .build(); | |
| 27 | + } | |
| 28 | + | |
| 29 | + String token = SecurityUtils.getLoginUser().getToken(); | |
| 30 | + | |
| 31 | + token = "Bearer auth:token:"+ token; | |
| 32 | + | |
| 33 | + RequestBody body = RequestBody.create(MediaType.parse("application/json"), JSON.parse(obj.toString()).toString()); | |
| 34 | + | |
| 35 | + Request request = new Request.Builder().url(url).addHeader("Authorization",token ).post(body).build(); | |
| 36 | + | |
| 37 | + try { | |
| 38 | + okhttp3.Response response = okHttpClient.newCall(request).execute(); | |
| 39 | + String result = response.body().string(); | |
| 40 | + | |
| 41 | + if(result != null){ | |
| 42 | + JSONObject json = JSON.parseObject(result); | |
| 43 | + if("success".equals(json.getString("message"))){ | |
| 44 | + return json.getJSONObject("result"); | |
| 45 | + } | |
| 46 | + }else{ | |
| 47 | + return null; | |
| 48 | + } | |
| 49 | + | |
| 50 | + }catch (Exception e) { | |
| 51 | + e.printStackTrace(); | |
| 52 | + return null; | |
| 53 | + } | |
| 54 | + | |
| 55 | + return null; | |
| 56 | + } | |
| 57 | + | |
| 58 | + public static Object get(String url,Object obj){ | |
| 59 | + if(okHttpClient == null){ | |
| 60 | + okHttpClient = new OkHttpClient.Builder() | |
| 61 | + .connectTimeout(20, TimeUnit.SECONDS) | |
| 62 | + .writeTimeout(20, TimeUnit.SECONDS) | |
| 63 | + .readTimeout(30, TimeUnit.SECONDS) | |
| 64 | + .build(); | |
| 65 | + } | |
| 66 | + | |
| 67 | + String token = SecurityUtils.getLoginUser().getToken(); | |
| 68 | + | |
| 69 | + token = "Bearer auth:token:"+ token; | |
| 70 | + | |
| 71 | + JSONObject jsonObject = JSON.parseObject(obj.toString()); | |
| 72 | + | |
| 73 | + String params = "?"; | |
| 74 | + for(String key:jsonObject.keySet()){ | |
| 75 | + params += key + "=" + jsonObject.getString(key) + "&"; | |
| 76 | + } | |
| 77 | + | |
| 78 | + params = params.substring(0,params.length()-1); | |
| 79 | + | |
| 80 | + url += params; | |
| 81 | + | |
| 82 | + Request request = new Request.Builder().url(url).addHeader("Authorization",token ).get().build(); | |
| 83 | + | |
| 84 | + try { | |
| 85 | + okhttp3.Response response = okHttpClient.newCall(request).execute(); | |
| 86 | + String result = response.body().string(); | |
| 87 | + | |
| 88 | + if(result != null){ | |
| 89 | + JSONObject json = JSON.parseObject(result); | |
| 90 | + if("success".equals(json.getString("message"))){ | |
| 91 | + return json.getJSONObject("result"); | |
| 92 | + } | |
| 93 | + }else{ | |
| 94 | + return null; | |
| 95 | + } | |
| 96 | + | |
| 97 | + }catch (Exception e) { | |
| 98 | + e.printStackTrace(); | |
| 99 | + return null; | |
| 100 | + } | |
| 101 | + | |
| 102 | + return null; | |
| 103 | + } | |
| 104 | +} | ... | ... |
trash-workFlow/src/main/java/com/trash/workflow/instener/EarthSitesEndStateListener.java deleted
100644 โ 0
| 1 | -package com.trash.workflow.instener; | |
| 2 | - | |
| 3 | -import com.trash.workflow.domain.WorkflowLeave; | |
| 4 | -import com.trash.workflow.service.IWorkflowLeaveService; | |
| 5 | -import com.trash.common.utils.spring.SpringUtils; | |
| 6 | - | |
| 7 | -import org.activiti.engine.delegate.DelegateExecution; | |
| 8 | -import org.activiti.engine.delegate.ExecutionListener; | |
| 9 | -import org.activiti.engine.delegate.Expression; | |
| 10 | - | |
| 11 | - | |
| 12 | -public class EarthSitesEndStateListener implements ExecutionListener { | |
| 13 | - | |
| 14 | - private Expression state; | |
| 15 | - | |
| 16 | - @Override | |
| 17 | - public void notify(DelegateExecution delegateExecution) { | |
| 18 | - System.out.println("ๆต็จ็ถๆๆดๆฐ ๆดๆฐID:" + delegateExecution.getProcessInstanceBusinessKey() + "็ถๆ:" + state.getValue(delegateExecution).toString()); | |
| 19 | - } | |
| 20 | -} |
trash-workFlow/src/main/java/com/trash/workflow/instener/SupervisionStateListener.java deleted
100644 โ 0
| 1 | -package com.trash.workflow.instener; | |
| 2 | - | |
| 3 | -import com.trash.workflow.domain.WorkflowLeave; | |
| 4 | -import com.trash.workflow.service.IWorkflowLeaveService; | |
| 5 | -import com.trash.common.utils.spring.SpringUtils; | |
| 6 | - | |
| 7 | -import org.activiti.engine.delegate.DelegateExecution; | |
| 8 | -import org.activiti.engine.delegate.ExecutionListener; | |
| 9 | -import org.activiti.engine.delegate.Expression; | |
| 10 | - | |
| 11 | - | |
| 12 | -public class SupervisionStateListener implements ExecutionListener { | |
| 13 | - | |
| 14 | - private Expression state; | |
| 15 | - | |
| 16 | - @Override | |
| 17 | - public void notify(DelegateExecution delegateExecution) { | |
| 18 | - System.out.println("Supervisionๆต็จ็ถๆๆดๆฐ ๆดๆฐID:" + delegateExecution.getProcessInstanceBusinessKey() + "็ถๆ:" + state.getValue(delegateExecution).toString()); | |
| 19 | - } | |
| 20 | -} |
trash-workFlow/src/main/java/com/trash/workflow/listener/EarthSitesEndStateListener.java
0 โ 100644
| 1 | +package com.trash.workflow.listener; | |
| 2 | + | |
| 3 | +import com.trash.workflow.domain.WorkflowLeave; | |
| 4 | +import com.trash.workflow.service.IWorkflowLeaveService; | |
| 5 | +import com.trash.workflow.service.IWorkflowService; | |
| 6 | + | |
| 7 | +import okhttp3.MediaType; | |
| 8 | +import okhttp3.OkHttpClient; | |
| 9 | +import okhttp3.Request; | |
| 10 | +import okhttp3.RequestBody; | |
| 11 | + | |
| 12 | +import com.alibaba.fastjson.JSON; | |
| 13 | +import com.alibaba.fastjson.JSONObject; | |
| 14 | +import com.trash.common.core.domain.entity.SysUser; | |
| 15 | +import com.trash.common.core.domain.model.LoginUser; | |
| 16 | +import com.trash.common.utils.SecurityUtils; | |
| 17 | +import com.trash.common.utils.spring.SpringUtils; | |
| 18 | +import com.trash.framework.web.service.TokenService; | |
| 19 | + | |
| 20 | +import java.util.concurrent.TimeUnit; | |
| 21 | + | |
| 22 | +import org.activiti.engine.delegate.DelegateExecution; | |
| 23 | +import org.activiti.engine.delegate.ExecutionListener; | |
| 24 | +import org.activiti.engine.delegate.Expression; | |
| 25 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 26 | +import org.springframework.beans.factory.annotation.Value; | |
| 27 | + | |
| 28 | + | |
| 29 | +public class EarthSitesEndStateListener implements ExecutionListener { | |
| 30 | + | |
| 31 | + private Expression state; | |
| 32 | + | |
| 33 | + @Autowired | |
| 34 | + TokenService tokenService; | |
| 35 | + | |
| 36 | + public final String LOGIN_URL = tokenService.REMOTEPATH + "api/siteservice/cs/earthsites/status"; | |
| 37 | + | |
| 38 | + @Autowired | |
| 39 | + IWorkflowService workflowService; | |
| 40 | + | |
| 41 | + | |
| 42 | + @Override | |
| 43 | + public void notify(DelegateExecution delegateExecution) { | |
| 44 | + | |
| 45 | + LoginUser loginUser = SecurityUtils.getLoginUser(); | |
| 46 | + | |
| 47 | + OkHttpClient okHttpClient = new OkHttpClient.Builder() | |
| 48 | + .connectTimeout(20, TimeUnit.SECONDS) | |
| 49 | + .writeTimeout(20, TimeUnit.SECONDS) | |
| 50 | + .readTimeout(30, TimeUnit.SECONDS) | |
| 51 | + .build(); | |
| 52 | + | |
| 53 | + JSONObject userJson = null; | |
| 54 | + | |
| 55 | + String token = "Bears auth:token:" + loginUser.getToken(); | |
| 56 | + | |
| 57 | + String param = "[{'objectId':"+ delegateExecution.getProcessInstanceBusinessKey().split(":")[0] +",'auditStatus':"+ state.getValue(delegateExecution).toString() +"}]"; | |
| 58 | + | |
| 59 | + RequestBody body = RequestBody.create(MediaType.parse("application/json"),param); | |
| 60 | + | |
| 61 | + Request request = new Request.Builder().url(LOGIN_URL).addHeader("header", token).post(body).build(); | |
| 62 | + | |
| 63 | + try { | |
| 64 | + okhttp3.Response response = okHttpClient.newCall(request).execute(); | |
| 65 | + String result = response.body().string(); | |
| 66 | + | |
| 67 | + if(result != null){ | |
| 68 | + JSONObject json = JSON.parseObject(result); | |
| 69 | + if("success".equals(json.getString("message"))){ | |
| 70 | + userJson = json.getJSONObject("result"); | |
| 71 | + } | |
| 72 | + } | |
| 73 | + | |
| 74 | + }catch (Exception e) { | |
| 75 | + e.printStackTrace(); | |
| 76 | + } | |
| 77 | + | |
| 78 | + | |
| 79 | + System.out.println("ๆต็จ็ถๆๆดๆฐ ๆดๆฐID:" + delegateExecution.getProcessInstanceBusinessKey() + "็ถๆ:" + state.getValue(delegateExecution).toString()); | |
| 80 | + } | |
| 81 | +} | ... | ... |
trash-workFlow/src/main/java/com/trash/workflow/instener/LeaveEndStateListener.java renamed to trash-workFlow/src/main/java/com/trash/workflow/listener/LeaveEndStateListener.java
trash-workFlow/src/main/java/com/trash/workflow/listener/SupervisionStateListener.java
0 โ 100644
| 1 | +package com.trash.workflow.listener; | |
| 2 | + | |
| 3 | +import com.trash.workflow.domain.Workflow; | |
| 4 | +import com.trash.workflow.domain.WorkflowLeave; | |
| 5 | +import com.trash.workflow.mapper.WorkflowMapper; | |
| 6 | +import com.trash.workflow.service.IWorkflowLeaveService; | |
| 7 | +import com.trash.workflow.service.IWorkflowService; | |
| 8 | +import com.trash.activiti.service.IActTaskService; | |
| 9 | +import com.trash.business.domain.SupervisionThreestep; | |
| 10 | +import com.trash.business.mapper.SupervisionThreestepMapper; | |
| 11 | +import com.trash.business.service.ISupervisionThreestepService; | |
| 12 | +import com.trash.common.utils.spring.SpringUtils; | |
| 13 | + | |
| 14 | +import org.activiti.engine.delegate.DelegateExecution; | |
| 15 | +import org.activiti.engine.delegate.ExecutionListener; | |
| 16 | +import org.activiti.engine.delegate.Expression; | |
| 17 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 18 | +import org.springframework.transaction.annotation.Transactional; | |
| 19 | + | |
| 20 | + | |
| 21 | +public class SupervisionStateListener implements ExecutionListener { | |
| 22 | + | |
| 23 | + private Expression state; | |
| 24 | + | |
| 25 | + @Override | |
| 26 | + public void notify(DelegateExecution delegateExecution) { | |
| 27 | + | |
| 28 | + SupervisionThreestep supervisionThreestep = new SupervisionThreestep(); | |
| 29 | + | |
| 30 | + supervisionThreestep.setId(Long.parseLong(delegateExecution.getProcessInstanceBusinessKey().split(":")[1])); | |
| 31 | + | |
| 32 | + supervisionThreestep.setStatus(Long.parseLong(state.getValue(delegateExecution).toString())); | |
| 33 | + | |
| 34 | + SpringUtils.getBean(SupervisionThreestepMapper.class).updateSupervisionThreestep(supervisionThreestep); | |
| 35 | + | |
| 36 | + WorkflowMapper workflowMapper = SpringUtils.getBean(WorkflowMapper.class); | |
| 37 | + | |
| 38 | + Workflow workflow = new Workflow(); | |
| 39 | + | |
| 40 | + workflow.setId(delegateExecution.getProcessInstanceBusinessKey()); | |
| 41 | + | |
| 42 | + workflow.setState(state.getValue(delegateExecution).toString()); | |
| 43 | + | |
| 44 | + workflowMapper.updateWorkflow(workflow); | |
| 45 | + | |
| 46 | + workflow = workflowMapper.selectWorkflowById(workflow.getId()); | |
| 47 | + | |
| 48 | + workflowMapper.insertWorkflowHistory(workflow); | |
| 49 | + | |
| 50 | + workflowMapper.deleteWorkflowById(delegateExecution.getProcessInstanceBusinessKey()); | |
| 51 | + | |
| 52 | + if("2".equals(state.getValue(delegateExecution))){ | |
| 53 | + SpringUtils.getBean(IActTaskService.class).deleteProcessById(delegateExecution.getProcessInstanceId()); | |
| 54 | + } | |
| 55 | + | |
| 56 | + } | |
| 57 | +} | ... | ... |
trash-workFlow/src/main/java/com/trash/workflow/mapper/WorkflowMapper.java
| ... | ... | @@ -51,6 +51,8 @@ public interface WorkflowMapper |
| 51 | 51 | * @return ็ปๆ |
| 52 | 52 | */ |
| 53 | 53 | public int insertWorkflow(Workflow Workflow); |
| 54 | + | |
| 55 | + public int insertWorkflowHistory(Workflow Workflow); | |
| 54 | 56 | |
| 55 | 57 | /** |
| 56 | 58 | * ไฟฎๆน่ฏทๅ |
| ... | ... | @@ -75,4 +77,5 @@ public interface WorkflowMapper |
| 75 | 77 | * @return ็ปๆ |
| 76 | 78 | */ |
| 77 | 79 | public int deleteWorkflowByIds(String[] ids); |
| 80 | + public void deleteWorkflowByName(String str); | |
| 78 | 81 | } | ... | ... |
trash-workFlow/src/main/java/com/trash/workflow/service/IWorkflowService.java
| ... | ... | @@ -47,6 +47,7 @@ public interface IWorkflowService |
| 47 | 47 | * @return ็ปๆ |
| 48 | 48 | */ |
| 49 | 49 | public int insertWorkflow(Workflow Workflow); |
| 50 | + | |
| 50 | 51 | |
| 51 | 52 | /** |
| 52 | 53 | * ไฟฎๆน่ฏทๅ |
| ... | ... | @@ -74,5 +75,7 @@ public interface IWorkflowService |
| 74 | 75 | |
| 75 | 76 | |
| 76 | 77 | public Workflow selectWorkflowByInstanceId(String instanceId); |
| 77 | - int createThreeSetpWorkFlow(SupervisionThreestep supervision); | |
| 78 | + int createThreeStepWorkFlow(SupervisionThreestep supervision); | |
| 79 | + | |
| 80 | + public void deleteWorkflowByName(String string); | |
| 78 | 81 | } | ... | ... |
trash-workFlow/src/main/java/com/trash/workflow/service/impl/WorkflowServiceImpl.java
| ... | ... | @@ -59,8 +59,8 @@ public class WorkflowServiceImpl implements IWorkflowService { |
| 59 | 59 | |
| 60 | 60 | String applyOpinion = map.get("applyOpinion").toString(); |
| 61 | 61 | |
| 62 | - String startTime = ((Map)map.get("site")).get("effectiveFrom").toString(); | |
| 63 | - String endTime = ((Map)map.get("site")).get("effectiveEnd").toString(); | |
| 62 | + String startTime = map.get("effectiveFrom").toString(); | |
| 63 | + String endTime = map.get("effectiveEnd").toString(); | |
| 64 | 64 | |
| 65 | 65 | ProcessInstance processInstance = null; |
| 66 | 66 | |
| ... | ... | @@ -98,7 +98,7 @@ public class WorkflowServiceImpl implements IWorkflowService { |
| 98 | 98 | |
| 99 | 99 | @Override |
| 100 | 100 | @Transactional |
| 101 | - public int createThreeSetpWorkFlow(SupervisionThreestep supervision){ | |
| 101 | + public int createThreeStepWorkFlow(SupervisionThreestep supervision){ | |
| 102 | 102 | ProcessInstance processInstance = null; |
| 103 | 103 | try { |
| 104 | 104 | processInstance = processRuntime.start(ProcessPayloadBuilder |
| ... | ... | @@ -233,6 +233,11 @@ public class WorkflowServiceImpl implements IWorkflowService { |
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | @Override |
| 236 | + public void deleteWorkflowByName(String name) { | |
| 237 | + workflowMapper.deleteWorkflowByName(name); | |
| 238 | + } | |
| 239 | + | |
| 240 | + @Override | |
| 236 | 241 | public Workflow selectWorkflowByInstanceId(String instanceId) { |
| 237 | 242 | |
| 238 | 243 | return workflowMapper.selectWorkflowByInstanceId(instanceId); | ... | ... |
trash-workFlow/src/main/resources/mapper/CompanyCreditMapper.xml
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 | <include refid="selectCompanyCreditVo"/> |
| 25 | 25 | <where> |
| 26 | 26 | <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> |
| 27 | - <if test="time != null "> and time = #{time}</if> | |
| 27 | + <if test="time != null "> and DATE_FORMAT(time,("%y%m%d")) = DATE_FORMAT(#{time},("%y%m%d"))</if> | |
| 28 | 28 | <if test="place != null and place != ''"> and place = #{place}</if> |
| 29 | 29 | <if test="reason != null and reason != ''"> and reason = #{reason}</if> |
| 30 | 30 | <if test="status != null "> and status = #{status}</if> |
| ... | ... | @@ -90,14 +90,22 @@ |
| 90 | 90 | |
| 91 | 91 | <select id="getNames" parameterType="CompanyCredit" resultType="String"> |
| 92 | 92 | |
| 93 | - select DISTINCT name from construction_credit | |
| 93 | + select DISTINCT name from company_credit | |
| 94 | + <where> | |
| 95 | + <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> | |
| 96 | + <if test="status != null "> and status = #{status}</if> | |
| 97 | + <if test="lostCredit != null "> and lost_credit = #{lostCredit}</if> | |
| 98 | + </where> | |
| 99 | + </select> | |
| 100 | + | |
| 101 | + <select id="getPlaces" parameterType="CompanyCredit" resultType="String"> | |
| 102 | + select DISTINCT place from company_credit | |
| 94 | 103 | <where> |
| 95 | 104 | <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> |
| 96 | 105 | <if test="status != null "> and status = #{status}</if> |
| 97 | 106 | <if test="lostCredit != null "> and lost_credit = #{lostCredit}</if> |
| 98 | 107 | </where> |
| 99 | 108 | </select> |
| 100 | - | |
| 101 | 109 | |
| 102 | 110 | <select id="selectCompanyCreditHistory" parameterType="CompanyCredit" resultMap="CompanyCreditResult"> |
| 103 | 111 | ... | ... |
trash-workFlow/src/main/resources/mapper/ConstructionCreditMapper.xml
| ... | ... | @@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 25 | 25 | <where> |
| 26 | 26 | <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> |
| 27 | 27 | <if test="type != null and type != ''"> and type = #{type}</if> |
| 28 | - <if test="time != null "> and time = #{time}</if> | |
| 28 | + <if test="time != null "> and DATE_FORMAT(time,("%y%m%d")) = DATE_FORMAT(#{time},("%y%m%d")) </if> | |
| 29 | 29 | <if test="place != null and place != ''"> and place = #{place}</if> |
| 30 | 30 | <if test="reason != null and reason != ''"> and reason = #{reason}</if> |
| 31 | 31 | <if test="status != null "> and status = #{status}</if> | ... | ... |
trash-workFlow/src/main/resources/mapper/DriverCreditMapper.xml
| ... | ... | @@ -25,7 +25,7 @@ |
| 25 | 25 | <where> |
| 26 | 26 | <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> |
| 27 | 27 | <if test="idNumber != null and idNumber != ''"> and id_number = #{idNumber}</if> |
| 28 | - <if test="time != null "> and time = #{time}</if> | |
| 28 | + <if test="time != null "> and DATE_FORMAT(time,("%y%m%d")) = DATE_FORMAT(#{time},("%y%m%d")) </if> | |
| 29 | 29 | <if test="reason != null and reason != ''"> and reason = #{reason}</if> |
| 30 | 30 | <if test="status != null "> and status = #{status}</if> |
| 31 | 31 | <if test="lostCredit != null "> and lost_credit = #{lostCredit}</if> | ... | ... |
trash-workFlow/src/main/resources/mapper/EarthsitesCreditMapper.xml
| ... | ... | @@ -25,7 +25,7 @@ |
| 25 | 25 | <where> |
| 26 | 26 | <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> |
| 27 | 27 | <if test="type != null and type != ''"> and type = #{type}</if> |
| 28 | - <if test="time != null "> and time = #{time}</if> | |
| 28 | + <if test="time != null "> and DATE_FORMAT(time,("%y%m%d")) = DATE_FORMAT(#{time},("%y%m%d")) </if> | |
| 29 | 29 | <if test="place != null and place != ''"> and place = #{place}</if> |
| 30 | 30 | <if test="reason != null and reason != ''"> and reason = #{reason}</if> |
| 31 | 31 | <if test="status != null "> and status = #{status}</if> |
| ... | ... | @@ -99,6 +99,24 @@ |
| 99 | 99 | <if test="lostCredit != null "> and lost_credit = #{lostCredit}</if> |
| 100 | 100 | </where> |
| 101 | 101 | </select> |
| 102 | + | |
| 103 | + <select id="getTypes" parameterType="EarthsitesCredit" resultType="String"> | |
| 104 | + select DISTINCT type from earthsites_credit | |
| 105 | + <where> | |
| 106 | + <if test="name != null and name != ''"> and type like concat('%', #{type}, '%')</if> | |
| 107 | + <if test="status != null "> and status = #{status}</if> | |
| 108 | + <if test="lostCredit != null "> and lost_credit = #{lostCredit}</if> | |
| 109 | + </where> | |
| 110 | + </select> | |
| 111 | + <select id="getPlaces" parameterType="EarthsitesCredit" resultType="String"> | |
| 112 | + select DISTINCT place from earthsites_credit | |
| 113 | + <where> | |
| 114 | + <if test="name != null and name != ''"> and place like concat('%', #{place}, '%')</if> | |
| 115 | + <if test="status != null "> and status = #{status}</if> | |
| 116 | + <if test="lostCredit != null "> and lost_credit = #{lostCredit}</if> | |
| 117 | + </where> | |
| 118 | + </select> | |
| 119 | + | |
| 102 | 120 | |
| 103 | 121 | <select id="selectEarthsitesCreditHistory" parameterType="EarthsitesCredit" resultMap="EarthsitesCreditResult"> |
| 104 | 122 | ... | ... |
trash-workFlow/src/main/resources/mapper/SupervisionSpecialMapper.xml
0 โ 100644
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> | |
| 2 | +<!DOCTYPE mapper | |
| 3 | +PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |
| 4 | +"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 5 | +<mapper namespace="com.trash.business.mapper.SupervisionSpecialMapper"> | |
| 6 | + | |
| 7 | + <resultMap type="SupervisionSpecial" id="SupervisionSpecialResult"> | |
| 8 | + <result property="id" column="id" /> | |
| 9 | + <result property="type" column="type" /> | |
| 10 | + <result property="title" column="title" /> | |
| 11 | + <result property="content" column="content" /> | |
| 12 | + <result property="signPerson" column="sign_person" /> | |
| 13 | + <result property="signTime" column="sign_time" /> | |
| 14 | + <result property="timeLimit" column="time_limit" /> | |
| 15 | + <result property="state" column="state" /> | |
| 16 | + <result property="createBy" column="create_by" /> | |
| 17 | + <result property="createTime" column="create_time" /> | |
| 18 | + <result property="updateTime" column="update_time" /> | |
| 19 | + <result property="updateBy" column="update_by" /> | |
| 20 | + <result property="resDepart" column="res_depart" /> | |
| 21 | + <result property="resTime" column="res_time" /> | |
| 22 | + <result property="resPerson" column="res_person" /> | |
| 23 | + <result property="resContent" column="res_content" /> | |
| 24 | + <result property="annotations" column="annotations" /> | |
| 25 | + </resultMap> | |
| 26 | + | |
| 27 | + <sql id="selectSupervisionSpecialVo"> | |
| 28 | + select id, type, title, content, sign_person, sign_time, time_limit, state, create_by, create_time, update_time, update_by, res_depart, res_time, res_person, res_content, annotations from supervision_special | |
| 29 | + </sql> | |
| 30 | + | |
| 31 | + <select id="selectSupervisionSpecialList" parameterType="SupervisionSpecial" resultMap="SupervisionSpecialResult"> | |
| 32 | + <include refid="selectSupervisionSpecialVo"/> | |
| 33 | + <where> | |
| 34 | + <if test="type != null and type != ''"> and type = #{type}</if> | |
| 35 | + <if test="title != null and title != ''"> and title = #{title}</if> | |
| 36 | + <if test="content != null and content != ''"> and content = #{content}</if> | |
| 37 | + <if test="signPerson != null and signPerson != ''"> and sign_person = #{signPerson}</if> | |
| 38 | + <if test="signTime != null "> and sign_time = #{signTime}</if> | |
| 39 | + <if test="timeLimit != null "> and time_limit = #{timeLimit}</if> | |
| 40 | + <if test="state != null and state != ''"> and state = #{state}</if> | |
| 41 | + <if test="resDepart != null and resDepart != ''"> and res_depart = #{resDepart}</if> | |
| 42 | + <if test="resTime != null "> and res_time = #{resTime}</if> | |
| 43 | + <if test="resPerson != null and resPerson != ''"> and res_person = #{resPerson}</if> | |
| 44 | + <if test="resContent != null and resContent != ''"> and res_content = #{resContent}</if> | |
| 45 | + <if test="annotations != null and annotations != ''"> and annotations = #{annotations}</if> | |
| 46 | + </where> | |
| 47 | + </select> | |
| 48 | + | |
| 49 | + <select id="selectSupervisionSpecialById" parameterType="String" resultMap="SupervisionSpecialResult"> | |
| 50 | + <include refid="selectSupervisionSpecialVo"/> | |
| 51 | + where id = #{id} | |
| 52 | + </select> | |
| 53 | + | |
| 54 | + <insert id="insertSupervisionSpecial" parameterType="SupervisionSpecial"> | |
| 55 | + insert into supervision_special | |
| 56 | + <trim prefix="(" suffix=")" suffixOverrides=","> | |
| 57 | + <if test="id != null">id,</if> | |
| 58 | + <if test="type != null">type,</if> | |
| 59 | + <if test="title != null">title,</if> | |
| 60 | + <if test="content != null">content,</if> | |
| 61 | + <if test="signPerson != null">sign_person,</if> | |
| 62 | + <if test="signTime != null">sign_time,</if> | |
| 63 | + <if test="timeLimit != null">time_limit,</if> | |
| 64 | + <if test="state != null">state,</if> | |
| 65 | + <if test="createBy != null">create_by,</if> | |
| 66 | + <if test="createTime != null">create_time,</if> | |
| 67 | + <if test="updateTime != null">update_time,</if> | |
| 68 | + <if test="updateBy != null">update_by,</if> | |
| 69 | + <if test="resDepart != null">res_depart,</if> | |
| 70 | + <if test="resTime != null">res_time,</if> | |
| 71 | + <if test="resPerson != null">res_person,</if> | |
| 72 | + <if test="resContent != null">res_content,</if> | |
| 73 | + <if test="annotations != null">annotations,</if> | |
| 74 | + </trim> | |
| 75 | + <trim prefix="values (" suffix=")" suffixOverrides=","> | |
| 76 | + <if test="id != null">#{id},</if> | |
| 77 | + <if test="type != null">#{type},</if> | |
| 78 | + <if test="title != null">#{title},</if> | |
| 79 | + <if test="content != null">#{content},</if> | |
| 80 | + <if test="signPerson != null">#{signPerson},</if> | |
| 81 | + <if test="signTime != null">#{signTime},</if> | |
| 82 | + <if test="timeLimit != null">#{timeLimit},</if> | |
| 83 | + <if test="state != null">#{state},</if> | |
| 84 | + <if test="createBy != null">#{createBy},</if> | |
| 85 | + <if test="createTime != null">#{createTime},</if> | |
| 86 | + <if test="updateTime != null">#{updateTime},</if> | |
| 87 | + <if test="updateBy != null">#{updateBy},</if> | |
| 88 | + <if test="resDepart != null">#{resDepart},</if> | |
| 89 | + <if test="resTime != null">#{resTime},</if> | |
| 90 | + <if test="resPerson != null">#{resPerson},</if> | |
| 91 | + <if test="resContent != null">#{resContent},</if> | |
| 92 | + <if test="annotations != null">#{annotations},</if> | |
| 93 | + </trim> | |
| 94 | + </insert> | |
| 95 | + | |
| 96 | + <update id="updateSupervisionSpecial" parameterType="SupervisionSpecial"> | |
| 97 | + update supervision_special | |
| 98 | + <trim prefix="SET" suffixOverrides=","> | |
| 99 | + <if test="type != null">type = #{type},</if> | |
| 100 | + <if test="title != null">title = #{title},</if> | |
| 101 | + <if test="content != null">content = #{content},</if> | |
| 102 | + <if test="signPerson != null">sign_person = #{signPerson},</if> | |
| 103 | + <if test="signTime != null">sign_time = #{signTime},</if> | |
| 104 | + <if test="timeLimit != null">time_limit = #{timeLimit},</if> | |
| 105 | + <if test="state != null">state = #{state},</if> | |
| 106 | + <if test="createBy != null">create_by = #{createBy},</if> | |
| 107 | + <if test="createTime != null">create_time = #{createTime},</if> | |
| 108 | + <if test="updateTime != null">update_time = #{updateTime},</if> | |
| 109 | + <if test="updateBy != null">update_by = #{updateBy},</if> | |
| 110 | + <if test="resDepart != null">res_depart = #{resDepart},</if> | |
| 111 | + <if test="resTime != null">res_time = #{resTime},</if> | |
| 112 | + <if test="resPerson != null">res_person = #{resPerson},</if> | |
| 113 | + <if test="resContent != null">res_content = #{resContent},</if> | |
| 114 | + <if test="annotations != null">annotations = #{annotations},</if> | |
| 115 | + </trim> | |
| 116 | + where id = #{id} | |
| 117 | + </update> | |
| 118 | + | |
| 119 | + <delete id="deleteSupervisionSpecialById" parameterType="String"> | |
| 120 | + delete from supervision_special where id = #{id} | |
| 121 | + </delete> | |
| 122 | + | |
| 123 | + <delete id="deleteSupervisionSpecialByIds" parameterType="String"> | |
| 124 | + delete from supervision_special where id in | |
| 125 | + <foreach item="id" collection="array" open="(" separator="," close=")"> | |
| 126 | + #{id} | |
| 127 | + </foreach> | |
| 128 | + </delete> | |
| 129 | + | |
| 130 | +</mapper> | |
| 0 | 131 | \ No newline at end of file | ... | ... |
trash-workFlow/src/main/resources/mapper/SupervisionThreestepMapper.xml
| ... | ... | @@ -14,6 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 14 | 14 | <result property="earthsitesId" column="earthsites_id" /> |
| 15 | 15 | <result property="createTime" column="create_time" /> |
| 16 | 16 | <result property="checkTime" column="check_time" /> |
| 17 | + <result property="checkEndTime" column="check_end_time" /> | |
| 17 | 18 | <result property="earthsitesName" column="earthsites_name" /> |
| 18 | 19 | <result property="contract" column="contract" /> |
| 19 | 20 | <result property="companys" column="companys" /> |
| ... | ... | @@ -31,14 +32,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 31 | 32 | <result property="img10" column="img10" /> |
| 32 | 33 | <result property="img11" column="img11" /> |
| 33 | 34 | <result property="img12" column="img12" /> |
| 35 | + <result property="sub_img0" column="sub_img0" /> | |
| 36 | + <result property="sub_img1" column="sub_img1" /> | |
| 37 | + <result property="sub_img2" column="sub_img2" /> | |
| 38 | + <result property="sub_img3" column="sub_img3" /> | |
| 39 | + <result property="sub_img4" column="sub_img4" /> | |
| 40 | + <result property="sub_img5" column="sub_img5" /> | |
| 41 | + <result property="sub_img6" column="sub_img6" /> | |
| 42 | + <result property="sub_img7" column="sub_img7" /> | |
| 43 | + <result property="sub_img8" column="sub_img8" /> | |
| 44 | + <result property="sub_img9" column="sub_img9" /> | |
| 45 | + <result property="sub_img10" column="sub_img10" /> | |
| 46 | + <result property="sub_img11" column="sub_img11" /> | |
| 47 | + <result property="sub_img12" column="sub_img12" /> | |
| 48 | + | |
| 49 | + <result property="subReason" column="sub_reason" /> | |
| 50 | + <result property="earthPipPerson" column="earth_pip_person" /> | |
| 51 | + <result property="enforcePerson" column="enforce_person" /> | |
| 52 | + <result property="subSubReason" column="sub_sub_reason" /> | |
| 53 | + <result property="attchItem1" column="attch_item1" /> | |
| 54 | + <result property="attchItem2" column="attch_item2" /> | |
| 55 | + <result property="attchItem3" column="attch_item3" /> | |
| 56 | + | |
| 34 | 57 | <result property="person" column="person" /> |
| 35 | 58 | <result property="phone" column="phone" /> |
| 36 | 59 | <result property="status" column="status" /> |
| 37 | 60 | <result property="createBy" column="create_by" /> |
| 61 | + | |
| 62 | + | |
| 38 | 63 | </resultMap> |
| 39 | 64 | |
| 40 | 65 | <sql id="selectSupervisionThreestepVo"> |
| 41 | - select id, name, type, place, self_check_time, object_id, earthsites_id, create_time, check_time, earthsites_name, contract, companys, company_trucks, img0, img1, img2, img3, img4, img5, img6, img7, img8, img9, img10, img11, img12, person, phone,status,create_by from supervision_threestep | |
| 66 | + select id, name, type, place, self_check_time, object_id, earthsites_id, create_time, check_time, earthsites_name,check_end_time, contract, companys, company_trucks, img0, img1, img2, img3, img4, img5, img6, img7, img8, img9, img10, img11, img12, sub_img0, sub_img1, sub_img2, sub_img3, sub_img4, sub_img5, sub_img6, sub_img7, sub_img8, sub_img9, sub_img10, sub_img11, sub_img12, person, phone,status,create_by,sub_reason,earth_pip_person,enforce_person,sub_sub_reason,attch_item1,attch_item2,attch_item3 from supervision_threestep | |
| 42 | 67 | </sql> |
| 43 | 68 | |
| 44 | 69 | <select id="selectSupervisionThreestepList" parameterType="SupervisionThreestep" resultMap="SupervisionThreestepResult"> |
| ... | ... | @@ -47,7 +72,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 47 | 72 | <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> |
| 48 | 73 | <if test="type != null "> and type = #{type}</if> |
| 49 | 74 | <if test="place != null and place != ''"> and place = #{place}</if> |
| 50 | - <if test="selfCheckTime != null "> and self_check_time = #{selfCheckTime}</if> | |
| 51 | 75 | <if test="objectId != null and objectId != ''"> and object_id = #{objectId}</if> |
| 52 | 76 | <if test="earthsitesId != null and earthsitesId != ''"> and earthsites_id = #{earthsitesId}</if> |
| 53 | 77 | <if test="checkTime != null "> and check_time = #{checkTime}</if> |
| ... | ... | @@ -72,13 +96,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 72 | 96 | <if test="phone != null and phone != ''"> and phone = #{phone}</if> |
| 73 | 97 | <if test="status != null and status != ''"> and status = #{status}</if> |
| 74 | 98 | <if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if> |
| 99 | + | |
| 100 | + self_check_time BETWEEN #{workStartTime} and #{workEndTime} | |
| 101 | + | |
| 75 | 102 | </where> |
| 103 | + | |
| 104 | + | |
| 105 | + ORDER BY create_time desc | |
| 106 | + </select> | |
| 107 | + | |
| 108 | + <select id="selectDayWorkList" parameterType="SupervisionThreestep" resultType="java.util.HashMap"> | |
| 109 | + select a.*,b.* from( select x.* from (select * from supervision_threestep a where type = 0 | |
| 110 | + and self_check_time BETWEEN #{workStartTime} and #{workEndTime} | |
| 111 | + ORDER BY self_check_time DESC) x GROUP BY object_id) a | |
| 112 | + LEFT JOIN | |
| 113 | + (select name ename,object_id eobject_id,sub_reason esub_reason,place eplace,status estatus,self_check_time eself_check_time from supervision_threestep where type = 1) b | |
| 114 | + on a.earthsites_id = b.eobject_id | |
| 115 | + and DATE_FORMAT(a.self_check_time,("%y%m%d")) = DATE_FORMAT(b.eself_check_time,("%y%m%d")) | |
| 116 | + ORDER BY a.create_time DESC | |
| 76 | 117 | </select> |
| 77 | 118 | |
| 78 | 119 | <select id="selectSupervisionThreestepById" parameterType="Long" resultMap="SupervisionThreestepResult"> |
| 79 | 120 | <include refid="selectSupervisionThreestepVo"/> |
| 80 | 121 | where id = #{id} |
| 81 | 122 | </select> |
| 123 | + | |
| 124 | + | |
| 125 | + <select id="selectTodayData" parameterType="SupervisionThreestep" resultMap="SupervisionThreestepResult"> | |
| 126 | + <include refid="selectSupervisionThreestepVo"/> | |
| 127 | + where object_id = #{objectId} and type = ${type} and DATE_FORMAT(self_check_time,("%y%m%d")) = DATE_FORMAT(NOW(),("%y%m%d")) | |
| 128 | + </select> | |
| 129 | + | |
| 130 | + | |
| 82 | 131 | |
| 83 | 132 | <insert id="insertSupervisionThreestep" parameterType="SupervisionThreestep" useGeneratedKeys="true" keyProperty="id"> |
| 84 | 133 | insert into supervision_threestep |
| ... | ... | @@ -90,7 +139,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 90 | 139 | <if test="objectId != null">object_id,</if> |
| 91 | 140 | <if test="earthsitesId != null">earthsites_id,</if> |
| 92 | 141 | <if test="createTime != null">create_time,</if> |
| 93 | - <if test="checkTime != null">check_time,</if> | |
| 94 | 142 | <if test="earthsitesName != null">earthsites_name,</if> |
| 95 | 143 | <if test="contract != null">contract,</if> |
| 96 | 144 | <if test="companys != null">companys,</if> |
| ... | ... | @@ -121,7 +169,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 121 | 169 | <if test="objectId != null">#{objectId},</if> |
| 122 | 170 | <if test="earthsitesId != null">#{earthsitesId},</if> |
| 123 | 171 | <if test="createTime != null">#{createTime},</if> |
| 124 | - <if test="checkTime != null">#{checkTime},</if> | |
| 125 | 172 | <if test="earthsitesName != null">#{earthsitesName},</if> |
| 126 | 173 | <if test="contract != null">#{contract},</if> |
| 127 | 174 | <if test="companys != null">#{companys},</if> |
| ... | ... | @@ -174,10 +221,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 174 | 221 | <if test="img10 != null">img10 = #{img10},</if> |
| 175 | 222 | <if test="img11 != null">img11 = #{img11},</if> |
| 176 | 223 | <if test="img12 != null">img12 = #{img12},</if> |
| 224 | + <if test="sub_img0 != null">sub_img0 = #{sub_img0},</if> | |
| 225 | + <if test="sub_img1 != null">sub_img1 = #{sub_img1},</if> | |
| 226 | + <if test="sub_img2 != null">sub_img2 = #{sub_img2},</if> | |
| 227 | + <if test="sub_img3 != null">sub_img3 = #{sub_img3},</if> | |
| 228 | + <if test="sub_img4 != null">sub_img4 = #{sub_img4},</if> | |
| 229 | + <if test="sub_img5 != null">sub_img5 = #{sub_img5},</if> | |
| 230 | + <if test="sub_img6 != null">sub_img6 = #{sub_img6},</if> | |
| 231 | + <if test="sub_img7 != null">sub_img7 = #{sub_img7},</if> | |
| 232 | + <if test="sub_img8 != null">sub_img8 = #{sub_img8},</if> | |
| 233 | + <if test="sub_img9 != null">sub_img9 = #{sub_img9},</if> | |
| 234 | + <if test="sub_img10 != null">sub_img10 = #{sub_img10},</if> | |
| 235 | + <if test="sub_img11 != null">sub_img11 = #{sub_img11},</if> | |
| 236 | + <if test="sub_img12 != null">sub_img12 = #{sub_img12},</if> | |
| 237 | + <if test="subReason != null">sub_reason = #{subReason},</if> | |
| 238 | + <if test="earthPipPerson != null">earth_pip_person = #{earthPipPerson},</if> | |
| 239 | + <if test="enforcePerson != null">enforce_person = #{enforcePerson},</if> | |
| 240 | + <if test="subSubReason != null">sub_sub_reason = #{subSubReason},</if> | |
| 241 | + <if test="attchItem1 != null">attch_item1 = #{attchItem1},</if> | |
| 242 | + <if test="attchItem2 != null">attch_item2 = #{attchItem2},</if> | |
| 243 | + <if test="attchItem3 != null">attch_item3 = #{attchItem3},</if> | |
| 177 | 244 | <if test="person != null">person = #{person},</if> |
| 178 | 245 | <if test="phone != null">phone = #{phone},</if> |
| 179 | 246 | <if test="status != null">status = #{status},</if> |
| 180 | - <if test="createBy != null">create_by,</if> | |
| 247 | + <if test="checkEndTime != null">check_end_time = #{checkEndTime},</if> | |
| 181 | 248 | </trim> |
| 182 | 249 | where id = #{id} |
| 183 | 250 | </update> |
| ... | ... | @@ -193,4 +260,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 193 | 260 | </foreach> |
| 194 | 261 | </delete> |
| 195 | 262 | |
| 263 | + | |
| 264 | + | |
| 196 | 265 | </mapper> |
| 197 | 266 | \ No newline at end of file | ... | ... |
trash-workFlow/src/main/resources/mapper/TruckActivateMapper.xml
0 โ 100644
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> | |
| 2 | +<!DOCTYPE mapper | |
| 3 | +PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |
| 4 | +"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 5 | +<mapper namespace="com.trash.business.mapper.TruckActivateMapper"> | |
| 6 | + | |
| 7 | + <resultMap type="TruckActivate" id="TruckActivateResult"> | |
| 8 | + <result property="id" column="id" /> | |
| 9 | + <result property="company" column="company" /> | |
| 10 | + <result property="licensePlate" column="license_plate" /> | |
| 11 | + <result property="time" column="time" /> | |
| 12 | + <result property="construction" column="construction" /> | |
| 13 | + <result property="status" column="status" /> | |
| 14 | + <result property="earthsite" column="earthsite" /> | |
| 15 | + <result property="objectId" column="object_id" /> | |
| 16 | + <result property="createBy" column="create_by" /> | |
| 17 | + <result property="createType" column="create_type" /> | |
| 18 | + <result property="activateTime" column="activate_time" /> | |
| 19 | + <result property="createTime" column="create_time" /> | |
| 20 | + </resultMap> | |
| 21 | + | |
| 22 | + <sql id="selectTruckActivateVo"> | |
| 23 | + select id, company, license_plate, time, construction, status, earthsite, object_id, create_by, create_type, activate_time, create_time from truck_activate | |
| 24 | + </sql> | |
| 25 | + | |
| 26 | + <select id="selectTruckActivateList" parameterType="TruckActivate" resultMap="TruckActivateResult"> | |
| 27 | + <include refid="selectTruckActivateVo"/> | |
| 28 | + <where> | |
| 29 | + <if test="company != null and company != ''"> and company = #{company}</if> | |
| 30 | + <if test="licensePlate != null and licensePlate != ''"> and license_plate = #{licensePlate}</if> | |
| 31 | + <if test="time != null "> and time = #{time}</if> | |
| 32 | + <if test="construction != null and construction != ''"> and construction = #{construction}</if> | |
| 33 | + <if test="status != null "> and status = #{status}</if> | |
| 34 | + <if test="earthsite != null and earthsite != ''"> and earthsite = #{earthsite}</if> | |
| 35 | + <if test="objectId != null and objectId != ''"> and object_id = #{objectId}</if> | |
| 36 | + <if test="createType != null "> and create_type = #{createType}</if> | |
| 37 | + <if test="activateTime != null "> and activate_time = #{activateTime}</if> | |
| 38 | + </where> | |
| 39 | + </select> | |
| 40 | + | |
| 41 | + <select id="selectTruckActivateById" parameterType="Long" resultMap="TruckActivateResult"> | |
| 42 | + <include refid="selectTruckActivateVo"/> | |
| 43 | + where id = #{id} | |
| 44 | + </select> | |
| 45 | + | |
| 46 | + <insert id="insertTruckActivate" parameterType="TruckActivate" useGeneratedKeys="true" keyProperty="id"> | |
| 47 | + insert into truck_activate | |
| 48 | + <trim prefix="(" suffix=")" suffixOverrides=","> | |
| 49 | + <if test="company != null">company,</if> | |
| 50 | + <if test="licensePlate != null">license_plate,</if> | |
| 51 | + <if test="time != null">time,</if> | |
| 52 | + <if test="construction != null">construction,</if> | |
| 53 | + <if test="status != null">status,</if> | |
| 54 | + <if test="earthsite != null">earthsite,</if> | |
| 55 | + <if test="objectId != null">object_id,</if> | |
| 56 | + <if test="createBy != null">create_by,</if> | |
| 57 | + <if test="createType != null">create_type,</if> | |
| 58 | + <if test="activateTime != null">activate_time,</if> | |
| 59 | + <if test="createTime != null">create_time,</if> | |
| 60 | + </trim> | |
| 61 | + <trim prefix="values (" suffix=")" suffixOverrides=","> | |
| 62 | + <if test="company != null">#{company},</if> | |
| 63 | + <if test="licensePlate != null">#{licensePlate},</if> | |
| 64 | + <if test="time != null">#{time},</if> | |
| 65 | + <if test="construction != null">#{construction},</if> | |
| 66 | + <if test="status != null">#{status},</if> | |
| 67 | + <if test="earthsite != null">#{earthsite},</if> | |
| 68 | + <if test="objectId != null">#{objectId},</if> | |
| 69 | + <if test="createBy != null">#{createBy},</if> | |
| 70 | + <if test="createType != null">#{createType},</if> | |
| 71 | + <if test="activateTime != null">#{activateTime},</if> | |
| 72 | + <if test="createTime != null">#{createTime},</if> | |
| 73 | + </trim> | |
| 74 | + </insert> | |
| 75 | + | |
| 76 | + <update id="updateTruckActivate" parameterType="TruckActivate"> | |
| 77 | + update truck_activate | |
| 78 | + <trim prefix="SET" suffixOverrides=","> | |
| 79 | + <if test="company != null">company = #{company},</if> | |
| 80 | + <if test="licensePlate != null">license_plate = #{licensePlate},</if> | |
| 81 | + <if test="time != null">time = #{time},</if> | |
| 82 | + <if test="construction != null">construction = #{construction},</if> | |
| 83 | + <if test="status != null">status = #{status},</if> | |
| 84 | + <if test="earthsite != null">earthsite = #{earthsite},</if> | |
| 85 | + <if test="objectId != null">object_id = #{objectId},</if> | |
| 86 | + <if test="createBy != null">create_by = #{createBy},</if> | |
| 87 | + <if test="createType != null">create_type = #{createType},</if> | |
| 88 | + <if test="activateTime != null">activate_time = #{activateTime},</if> | |
| 89 | + <if test="createTime != null">create_time = #{createTime},</if> | |
| 90 | + </trim> | |
| 91 | + where id = #{id} | |
| 92 | + </update> | |
| 93 | + | |
| 94 | + <delete id="deleteTruckActivateById" parameterType="Long"> | |
| 95 | + delete from truck_activate where id = #{id} | |
| 96 | + </delete> | |
| 97 | + | |
| 98 | + <delete id="deleteTruckActivateByIds" parameterType="String"> | |
| 99 | + delete from truck_activate where id in | |
| 100 | + <foreach item="id" collection="array" open="(" separator="," close=")"> | |
| 101 | + #{id} | |
| 102 | + </foreach> | |
| 103 | + </delete> | |
| 104 | + | |
| 105 | +</mapper> | |
| 0 | 106 | \ No newline at end of file | ... | ... |
trash-workFlow/src/main/resources/mapper/TruckCreditMapper.xml
| ... | ... | @@ -31,7 +31,7 @@ |
| 31 | 31 | <if test="status != null "> and status = #{status}</if> |
| 32 | 32 | <if test="lostCredit != null "> and lost_credit = #{lostCredit}</if> |
| 33 | 33 | <if test="objectId != null and objectId != ''"> and object_id = #{objectId}</if> |
| 34 | - <if test="time != null "> and time = #{time}</if> | |
| 34 | + <if test="time != null "> and DATE_FORMAT(time,("%y%m%d")) = DATE_FORMAT(#{time},("%y%m%d"))</if> | |
| 35 | 35 | </where> |
| 36 | 36 | </select> |
| 37 | 37 | |
| ... | ... | @@ -69,10 +69,7 @@ |
| 69 | 69 | <trim prefix="SET" suffixOverrides=","> |
| 70 | 70 | <if test="companyId != null">company_id = #{companyId},</if> |
| 71 | 71 | <if test="licensePlate != null"> |
| 72 | - | |
| 73 | - license_plate = #{ | |
| 74 | - | |
| 75 | -licensePlate},</if> | |
| 72 | + license_plate = #{licensePlate},</if> | |
| 76 | 73 | <if test="reason != null">reason = #{reason},</if> |
| 77 | 74 | <if test="status != null">status = #{status},</if> |
| 78 | 75 | <if test="lostCredit != null">lost_credit = #{lostCredit},</if> |
| ... | ... | @@ -103,6 +100,16 @@ licensePlate},</if> |
| 103 | 100 | <if test="lostCredit != null "> and lost_credit = #{lostCredit}</if> |
| 104 | 101 | </where> |
| 105 | 102 | </select> |
| 103 | + | |
| 104 | + <select id="getCompanys" parameterType="TruckCredit" resultType="String"> | |
| 105 | + | |
| 106 | + select DISTINCT company_id from truck_credit | |
| 107 | + <where> | |
| 108 | + <if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%')</if> | |
| 109 | + <if test="status != null "> and status = #{status}</if> | |
| 110 | + <if test="lostCredit != null "> and lost_credit = #{lostCredit}</if> | |
| 111 | + </where> | |
| 112 | + </select> | |
| 106 | 113 | |
| 107 | 114 | |
| 108 | 115 | <select id="selectTruckCreditHistory" parameterType="TruckCredit" resultMap="TruckCreditResult"> | ... | ... |
trash-workFlow/src/main/resources/mapper/WorkflowMapper.xml
| ... | ... | @@ -94,6 +94,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 94 | 94 | <if test="updateTime != null">#{updateTime},</if> |
| 95 | 95 | </trim> |
| 96 | 96 | </insert> |
| 97 | + | |
| 98 | + <insert id="insertWorkflowHistory" parameterType="Workflow"> | |
| 99 | + insert into workflow_hi | |
| 100 | + <trim prefix="(" suffix=")" suffixOverrides=","> | |
| 101 | + <if test="id != null">id,</if> | |
| 102 | + <if test="type != null">type,</if> | |
| 103 | + <if test="title != null">title,</if> | |
| 104 | + <if test="reason != null">reason,</if> | |
| 105 | + <if test="startTime != null">start_time,</if> | |
| 106 | + <if test="endTime != null">end_time,</if> | |
| 107 | + <if test="instanceId != null">instance_id,</if> | |
| 108 | + <if test="state != null">state,</if> | |
| 109 | + <if test="createName != null">create_name,</if> | |
| 110 | + <if test="createBy != null">create_by,</if> | |
| 111 | + <if test="createTime != null">create_time,</if> | |
| 112 | + <if test="updateTime != null">update_time,</if> | |
| 113 | + </trim> | |
| 114 | + <trim prefix="values (" suffix=")" suffixOverrides=","> | |
| 115 | + <if test="id != null">#{id},</if> | |
| 116 | + <if test="type != null">#{type},</if> | |
| 117 | + <if test="title != null">#{title},</if> | |
| 118 | + <if test="reason != null">#{reason},</if> | |
| 119 | + <if test="startTime != null">#{startTime},</if> | |
| 120 | + <if test="endTime != null">#{endTime},</if> | |
| 121 | + <if test="instanceId != null">#{instanceId},</if> | |
| 122 | + <if test="state != null">#{state},</if> | |
| 123 | + <if test="createName != null">#{createName},</if> | |
| 124 | + <if test="createBy != null">#{createBy},</if> | |
| 125 | + <if test="createTime != null">#{createTime},</if> | |
| 126 | + <if test="updateTime != null">#{updateTime},</if> | |
| 127 | + </trim> | |
| 128 | + </insert> | |
| 97 | 129 | |
| 98 | 130 | <update id="updateWorkflow" parameterType="Workflow"> |
| 99 | 131 | update workflow |
| ... | ... | @@ -117,6 +149,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 117 | 149 | delete from workflow where id = #{id} |
| 118 | 150 | </delete> |
| 119 | 151 | |
| 152 | + | |
| 153 | + <delete id="deleteWorkflowByName" parameterType="String"> | |
| 154 | + delete from workflow where id like concat('%',#{name,jdbcType=VARCHAR},'%') | |
| 155 | + </delete> | |
| 156 | + | |
| 120 | 157 | <delete id="deleteWorkflowByIds" parameterType="String"> |
| 121 | 158 | delete from workflow where id in |
| 122 | 159 | <foreach item="id" collection="array" open="(" separator="," close=")"> | ... | ... |