yue 5 éve
szülő
commit
624eb246ee

+ 21 - 0
src/main/java/com/jeeplus/modules/act/service/ActTaskService.java

@@ -2818,6 +2818,27 @@ public class ActTaskService extends BaseService {
         complete(act.getTaskId(), act.getProcInsId(), act.getComment(), vars);
     }
 
+
+    /**
+     * 结算填写现场使用量
+     */
+    @Transactional(readOnly = false)
+    public void useQuantity(Act act) {
+        String flag = act.getFlag();
+        // 设置意见
+        act.setComment(("yes".equals(flag) ? "[同意] " : "[驳回] ") + act.getComment());
+        act.preUpdate();
+        // 对不同环节的业务逻辑进行操作
+        String taskDefKey = act.getTaskDefKey();
+        // 提交流程任务
+        Map<String, Object> vars = Maps.newHashMap();
+        vars.put("pass", "yes".equals(flag) ? true : false);
+        Project user = MyActiviUtils.findJSUser(act.getProcInsId());
+        String loginName = UserUtils.getByUserName(user.getProjectManageRole()).getLoginName();
+        vars.put("manager", loginName);
+        complete(act.getTaskId(), act.getProcInsId(), act.getComment(), vars);
+    }
+
     /**
      * 保存审核意见
      *

+ 12 - 0
src/main/java/com/jeeplus/modules/act/web/ActTaskController.java

@@ -1471,6 +1471,18 @@ public class ActTaskController extends BaseController {
     }
 
     /**
+     * 结算填写现场使用量
+     */
+    @ResponseBody
+    @RequestMapping(value = "useQuantityTask")
+    public AjaxJson useQuantityTask(Act act) {
+        AjaxJson j = new AjaxJson();
+        actTaskService.useQuantity(act);
+        j.setMsg("审批成功");
+        return j;
+    }
+
+    /**
      * 运行人员审核图纸
      */
     @ResponseBody

+ 2 - 2
src/main/java/com/jeeplus/modules/sg/audit/information/utils/ImportInformation.java

@@ -86,7 +86,7 @@ public  class ImportInformation {
                     isBack = "否";
                     isBackNo = 1;
                 }
-                if (materials.size() >= 5000 && flag == 1) {
+                if (materials.size() >= 1000 && flag == 1) {
                     //更新物料信息
                     materialService.saveMater(materials);
                     //根据插入的物料信息查询项目定义号,sum(判断是否完成领退料(0完成-1为完成)) 并按照项目定义号分组
@@ -422,7 +422,7 @@ public  class ImportInformation {
                     informationList.add(information);
                     successNum++;
              }
-                if (informationList.size() == 5000) {
+                if (informationList.size() == 1000) {
                     informationService.saveInfo(informationList);
                     informationList = new ArrayList<>();
                 }

+ 8 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/activiti/utils/MyActiviUtils.java

@@ -264,6 +264,14 @@ public class MyActiviUtils {
     }
 
     /**
+     * 根据流程实例id查询结算流程项目人员
+     * */
+    public static Project findJSUser(String procInsId){
+        Project user = projectService.findJSUser(procInsId);
+        return user;
+    }
+
+    /**
      * 根据项目id称查询人员
      * */
     public static Project findUserById(String projectId){

+ 2 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/project/mapper/ProjectMapper.java

@@ -36,6 +36,8 @@ public interface ProjectMapper extends BaseMapper<Project> {
 
     Project findWZUser(String procInsId);
 
+    Project findJSUser(String procInsId);
+
     Project sgFindUser(String procInsId);
 
     Project findUserById(String projectId);

+ 24 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/project/mapper/xml/ProjectMapper.xml

@@ -687,6 +687,30 @@
 		WHERE id = (select project_id from md_acquisition_process where proc_ins_id=#{procInsId});
 	</select>
 
+	<select id="findJSUser"  resultType="com.jeeplus.modules.sg.managementcenter.project.entity.Project">
+		select
+			id
+			,demand_unit
+			,project_manage_role
+			,distribution_engineering
+			,distribution_materials
+			,distribution_system
+			,distribution_policy
+			,management_leader
+			,run_unit
+			,run_unit_role
+			,through_research_role
+			,construction_unit
+			,construction_unit_role
+			,construction_unit_manage
+			,construction_unit_leader
+			,design_unit
+			,design_unit_manage
+			,design_unit_leader
+		FROM xm_project_details
+		WHERE require_name = (select requireName from xm_settlement_process where proc_ins_id=#{procInsId});
+	</select>
+
 	<select id="sgFindUser"  resultType="com.jeeplus.modules.sg.managementcenter.project.entity.Project">
 		select
 			id

+ 4 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/project/service/ProjectService.java

@@ -143,6 +143,10 @@ public class ProjectService extends CrudService<ProjectMapper, Project> {
 		return projectMapper.findWZUser(procInsId);
 	}
 
+	public Project findJSUser(String procInsId) {
+		return projectMapper.findJSUser(procInsId);
+	}
+
 	public Project sgFindUser(String procInsId) {
 		return projectMapper.sgFindUser(procInsId);
 	}

+ 245 - 0
src/main/resources/freemarker/jiesuan.ftl

@@ -0,0 +1,245 @@
+<?xml version="1.0"?>
+<?mso-application progid="Excel.Sheet"?>
+<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
+ xmlns:o="urn:schemas-microsoft-com:office:office"
+ xmlns:x="urn:schemas-microsoft-com:office:excel"
+ xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
+ xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
+ xmlns:html="http://www.w3.org/TR/REC-html40">
+ <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
+  <Author>Administrator</Author>
+  <LastAuthor>tree lem</LastAuthor>
+  <Created>2006-09-13T11:21:00Z</Created>
+  <LastSaved>2020-04-16T00:53:03Z</LastSaved>
+  <Version>16.00</Version>
+ </DocumentProperties>
+ <CustomDocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
+  <KSOProductBuildVer dt:dt="string">2052-10.8.2.6613</KSOProductBuildVer>
+ </CustomDocumentProperties>
+ <OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">
+  <AllowPNG/>
+ </OfficeDocumentSettings>
+ <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
+  <WindowHeight>15840</WindowHeight>
+  <WindowWidth>29040</WindowWidth>
+  <WindowTopX>32767</WindowTopX>
+  <WindowTopY>32767</WindowTopY>
+  <ProtectStructure>False</ProtectStructure>
+  <ProtectWindows>False</ProtectWindows>
+ </ExcelWorkbook>
+ <Styles>
+  <Style ss:ID="Default" ss:Name="Normal">
+   <Alignment ss:Vertical="Center"/>
+   <Borders/>
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"/>
+   <Interior/>
+   <NumberFormat/>
+   <Protection/>
+  </Style>
+  <Style ss:ID="s21">
+   <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/>
+   <Borders>
+    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
+   </Borders>
+   <Font ss:FontName="仿宋_GB2312" x:CharSet="134" ss:Bold="1"/>
+   <Interior/>
+  </Style>
+  <Style ss:ID="s42">
+   <Alignment ss:Horizontal="Left" ss:Vertical="Center"/>
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"/>
+  </Style>
+  <Style ss:ID="s43">
+   <Alignment ss:Horizontal="Left" ss:Vertical="Center"/>
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="9" ss:Color="#000000"
+    ss:Bold="1"/>
+   <Interior/>
+  </Style>
+  <Style ss:ID="s44">
+   <Alignment ss:Vertical="Top"/>
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"
+    ss:Bold="1"/>
+  </Style>
+  <Style ss:ID="s45">
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"
+    ss:Bold="1"/>
+  </Style>
+  <Style ss:ID="s46">
+   <Alignment ss:Horizontal="Left" ss:Vertical="Center"/>
+   <Borders>
+    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
+   </Borders>
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"
+    ss:Bold="1"/>
+  </Style>
+  <Style ss:ID="s48">
+   <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/>
+   <Borders>
+    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
+   </Borders>
+   <Font ss:FontName="仿宋_GB2312" x:CharSet="134" ss:Bold="1"/>
+   <Interior ss:Color="#FFFF00" ss:Pattern="Solid"/>
+  </Style>
+  <Style ss:ID="s49">
+   <Alignment ss:Horizontal="Center" ss:Vertical="Center"/>
+   <Borders>
+    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
+   </Borders>
+  </Style>
+  <Style ss:ID="s50">
+   <Borders>
+    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
+    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
+   </Borders>
+  </Style>
+  <Style ss:ID="s53">
+   <Alignment ss:Vertical="Top" ss:WrapText="1"/>
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"
+    ss:Bold="1"/>
+  </Style>
+  <Style ss:ID="s54">
+   <Alignment ss:Horizontal="Left" ss:Vertical="Center"/>
+   <Borders>
+    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
+   </Borders>
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"/>
+  </Style>
+  <Style ss:ID="s59">
+   <Alignment ss:Horizontal="Center" ss:Vertical="Center"/>
+   <Borders/>
+   <Font ss:FontName="宋体" x:CharSet="134" ss:Size="14" ss:Color="#000000"
+    ss:Bold="1"/>
+  </Style>
+ </Styles>
+ <Worksheet ss:Name="甲供材核对表">
+  <Names>
+   <NamedRange ss:Name="_FilterDatabase" ss:RefersTo="=甲供材核对表!R3C1:R3C13"
+    ss:Hidden="1"/>
+  </Names>
+  <Table ss:ExpandedColumnCount="11" ss:ExpandedRowCount="9999999" x:FullColumns="1"
+   x:FullRows="1" ss:DefaultColumnWidth="54" ss:DefaultRowHeight="13.5">
+   <Column ss:AutoFitWidth="0" ss:Width="72"/>
+   <Column ss:Width="40.5"/>
+   <Column ss:Width="98.25"/>
+   <Column ss:Width="30"/>
+   <Column ss:Width="71.25"/>
+   <Column ss:Width="98.25"/>
+   <Column ss:AutoFitWidth="0" ss:Width="48"/>
+   <Column ss:Width="84.75"/>
+   <Column ss:Width="40.5" ss:Span="1"/>
+   <Column ss:Index="11" ss:Width="51"/>
+   <Row ss:Height="18.75">
+    <Cell ss:MergeAcross="9" ss:StyleID="s59"><Data ss:Type="String">镇江本部配网工程竣工甲供材核对表</Data></Cell>
+   </Row>
+   <Row ss:StyleID="s42">
+    <Cell ss:StyleID="s46"><Data ss:Type="String">项目编号:${projectId}</Data></Cell>
+    <Cell ss:StyleID="s46"/>
+    <Cell ss:StyleID="s46"><Data ss:Type="String">项目名称:${projectName}</Data></Cell>
+    <Cell ss:StyleID="s46"/>
+    <Cell ss:StyleID="s46"/>
+    <Cell ss:StyleID="s46"><Data ss:Type="String">施工项目经理:${manager}</Data></Cell>
+    <Cell ss:StyleID="s46"/>
+    <Cell ss:StyleID="s46"/>
+    <Cell ss:StyleID="s46"/>
+    <Cell ss:StyleID="s54"/>
+   </Row>
+   <Row  ss:Height="41.0625">
+    <Cell ss:StyleID="s21"><Data ss:Type="String">序号</Data><NamedCell
+      ss:Name="_FilterDatabase"/></Cell>
+    <Cell ss:StyleID="s21"><Data ss:Type="String">物料编码</Data><NamedCell
+      ss:Name="_FilterDatabase"/></Cell>
+    <Cell ss:StyleID="s21"><Data ss:Type="String">物料名称</Data><NamedCell
+      ss:Name="_FilterDatabase"/></Cell>
+    <Cell ss:StyleID="s21"><Data ss:Type="String">单位</Data><NamedCell
+      ss:Name="_FilterDatabase"/></Cell>
+    <Cell ss:StyleID="s21"><Data ss:Type="String">出库单价(元)</Data><NamedCell
+      ss:Name="_FilterDatabase"/></Cell>
+    <Cell ss:StyleID="s21"><Data ss:Type="String">出库总价(元)</Data><NamedCell
+      ss:Name="_FilterDatabase"/></Cell>
+    <Cell ss:StyleID="s21"><Data ss:Type="String">出库数量</Data><NamedCell
+      ss:Name="_FilterDatabase"/></Cell>
+    <Cell ss:StyleID="s48"><Data ss:Type="String">现场使用数量</Data><NamedCell
+      ss:Name="_FilterDatabase"/></Cell>
+    <Cell ss:StyleID="s48"><Data ss:Type="String">审计现场复核数量</Data><NamedCell
+      ss:Name="_FilterDatabase"/></Cell>
+    <Cell ss:StyleID="s21"><Data ss:Type="String">施工单位备注</Data><NamedCell
+      ss:Name="_FilterDatabase"/></Cell>
+   </Row>
+   <#list list as item>
+   <Row>
+		<Cell ss:StyleID="s49"><Data ss:Type="String">${item.id}</Data></Cell>
+		<Cell ss:StyleID="s49"><Data ss:Type="String">${item.materialEncoding}</Data></Cell>
+		<Cell ss:StyleID="s49"><Data ss:Type="String">${item.materialName}</Data></Cell>
+		<Cell ss:StyleID="s49"><Data ss:Type="String">${item.company}</Data></Cell>
+		<Cell ss:StyleID="s49"><Data ss:Type="String">${item.unitPrice}</Data></Cell>
+       <Cell ss:StyleID="s49"><Data ss:Type="String">${item.totalPrice}</Data></Cell>
+		<Cell ss:StyleID="s49"><Data ss:Type="String">${item.outgoingQuantity}</Data></Cell>
+		<Cell ss:StyleID="s49"><Data ss:Type="String">${item.usedQuantity}</Data></Cell>
+		<Cell ss:StyleID="s49"><Data ss:Type="String">${item.reviewQuantity}</Data></Cell>
+		<Cell ss:StyleID="s49"><Data ss:Type="String">${item.settMark}</Data></Cell>
+   </Row>
+   </#list>
+   <Row  ss:Height="14.0625" ss:StyleID="s43">
+    <Cell><Data ss:Type="String">说明:钢管杆出库数量单位为吨,各单位填写数量时请填写基数,并在备注中写明钢管杆使用是否带甲供基础。</Data></Cell>
+   </Row>
+   <Row  ss:Height="27" ss:StyleID="s44">
+    <Cell><Data ss:Type="String">施工单位:</Data></Cell>
+    <Cell ss:Index="3"><Data ss:Type="String">项目管理单位:</Data></Cell>
+    <Cell ss:Index="5"><Data ss:Type="String">审计人员:</Data></Cell>
+    <Cell ss:Index="8"><Data ss:Type="String">现场确认人:</Data></Cell>
+   </Row>
+   <Row  ss:Height="36.9375" ss:StyleID="s45">
+    <Cell ss:StyleID="s53"><Data ss:Type="String">日期:</Data></Cell>
+    <Cell ss:StyleID="s44"/>
+    <Cell ss:StyleID="s53"><Data ss:Type="String">日期:</Data></Cell>
+    <Cell ss:Index="5" ss:StyleID="s53"><Data ss:Type="String">日期:</Data></Cell>
+    <Cell ss:StyleID="s44"/>
+    <Cell ss:StyleID="s44"/>
+    <Cell ss:StyleID="s53"><Data ss:Type="String">日期:</Data></Cell>
+   </Row>
+  </Table>
+  <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
+   <PageSetup>
+    <Layout x:Orientation="Landscape"/>
+    <Header x:Margin="0.3"/>
+    <Footer x:Margin="0.3"/>
+    <PageMargins x:Bottom="0.75" x:Left="0.69930555555555596"
+     x:Right="0.69930555555555596" x:Top="0.75"/>
+   </PageSetup>
+   <Print>
+    <ValidPrinterInfo/>
+    <PaperSizeIndex>9</PaperSizeIndex>
+    <HorizontalResolution>200</HorizontalResolution>
+    <VerticalResolution>300</VerticalResolution>
+   </Print>
+   <Selected/>
+   <FreezePanes/>
+   <FrozenNoSplit/>
+   <SplitHorizontal>3</SplitHorizontal>
+   <TopRowBottomPane>3</TopRowBottomPane>
+   <ActivePane>2</ActivePane>
+   <Panes>
+    <Pane>
+     <Number>3</Number>
+    </Pane>
+    <Pane>
+     <Number>2</Number>
+     <ActiveRow>8</ActiveRow>
+     <ActiveCol>7</ActiveCol>
+    </Pane>
+   </Panes>
+   <ProtectObjects>False</ProtectObjects>
+   <ProtectScenarios>False</ProtectScenarios>
+  </WorksheetOptions>
+ </Worksheet>
+</Workbook>