diff --git a/src/main/java/com/zcloud/controller/eightwork/AppEightWorkController.java b/src/main/java/com/zcloud/controller/eightwork/AppEightWorkController.java index 3668a03..a7d08ee 100644 --- a/src/main/java/com/zcloud/controller/eightwork/AppEightWorkController.java +++ b/src/main/java/com/zcloud/controller/eightwork/AppEightWorkController.java @@ -29,14 +29,11 @@ public class AppEightWorkController extends BaseController { String errorInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); - if (null != file && !file.isEmpty()) { - String ffile = DateUtil.getDays(); - String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); - smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); - pd.put("FILE_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); - } + String ffile = DateUtil.getDays(); + String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); + map.put("FILE_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); map.put("result",errorInfo); - map.put("pd",pd); return map; } @@ -47,7 +44,7 @@ public class AppEightWorkController extends BaseController { String errorInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); - smb.deleteFile(pd.getString("CORPINFO_ID")); + smb.deleteFile(pd.getString("FILE_PATH")); map.put("result",errorInfo); return map; } diff --git a/src/main/java/com/zcloud/service/eightwork/impl/HotworkServiceImpl.java b/src/main/java/com/zcloud/service/eightwork/impl/HotworkServiceImpl.java index 15c2cb9..07331a6 100644 --- a/src/main/java/com/zcloud/service/eightwork/impl/HotworkServiceImpl.java +++ b/src/main/java/com/zcloud/service/eightwork/impl/HotworkServiceImpl.java @@ -272,16 +272,17 @@ public class HotworkServiceImpl implements HotworkService { } private void saveMeasures(PageData pd) { - List list = (List) JSON.parse(pd.get("PREPARERS").toString()); + List list = (List) JSON.parse(pd.get("MEASURES").toString()); for (JSONObject json : list) { PageData measure = new PageData(); - measure.put("HOTWORKTOMEASURES_ID",json.get("BUS_HOTWORK_MEASURES_ID")); + measure.put("HOTWORKTOMEASURES_ID",json.get("HOTWORKTOMEASURES_ID")); measure.put("STATUS", json.get("STATUS")); measure.put("ANSWER1", json.get("ANSWER1")); measure.put("ANSWER2", json.get("ANSWER2")); measure.put("ANSWER3", json.get("ANSWER3")); measure.put("ANSWER4", json.get("ANSWER4")); measure.put("SIGN_PATH", json.get("SIGN_PATH")); + measure.put("SIGN_TIME", json.get("SIGN_TIME")); measure.put("IMG_PATH", json.get("IMG_PATH")); hotworkToMeasuresMapper.edit(measure); } diff --git a/src/main/java/com/zcloud/util/img.png b/src/main/java/com/zcloud/util/img.png deleted file mode 100644 index d087336..0000000 Binary files a/src/main/java/com/zcloud/util/img.png and /dev/null differ diff --git a/src/main/resources/mybatis/datasource/eightwork/HotworkSignMapper.xml b/src/main/resources/mybatis/datasource/eightwork/HotworkSignMapper.xml index d8b3f09..20780a5 100644 --- a/src/main/resources/mybatis/datasource/eightwork/HotworkSignMapper.xml +++ b/src/main/resources/mybatis/datasource/eightwork/HotworkSignMapper.xml @@ -106,7 +106,7 @@ from f where - f.HOTWORK_ID = #{pd.HOTWORK_ID} + f.HOTWORK_ID = #{HOTWORK_ID} and f.SIGN_TIME is null diff --git a/src/main/resources/mybatis/datasource/eightwork/HotworkToMeasuresMapper.xml b/src/main/resources/mybatis/datasource/eightwork/HotworkToMeasuresMapper.xml index 390e949..271856c 100644 --- a/src/main/resources/mybatis/datasource/eightwork/HotworkToMeasuresMapper.xml +++ b/src/main/resources/mybatis/datasource/eightwork/HotworkToMeasuresMapper.xml @@ -77,7 +77,7 @@ HOTWORKTOMEASURES_ID, CONFIRM_ID ) values - + ( #{item.HOTWORK_ID}, #{item.BUS_HOTWORK_MEASURES_ID}, @@ -106,7 +106,8 @@ ANSWER3 = #{ANSWER3}, ANSWER4 = #{ANSWER4}, SIGN_PATH = #{SIGN_PATH}, - IMG_PATH = #{IMG_PATH} + IMG_PATH = #{IMG_PATH}, + SIGN_TIME = #{SIGN_TIME} where HOTWORKTOMEASURES_ID = #{HOTWORKTOMEASURES_ID} @@ -145,9 +146,11 @@